retractboundary: add dryrun parameter
Needs ReviewPublic

Authored by khanchi97 on May 30 2018, 6:25 AM.

Details

Reviewers
None
Group Reviewers
hg-reviewers
Summary

Added the logic to find those csets whose phase will be changed
without --dry-run and return those csets.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped
khanchi97 created this revision.May 30 2018, 6:25 AM
khanchi97 updated this revision to Diff 8948.Jun 1 2018, 2:59 AM
khanchi97 edited the summary of this revision. (Show Details)
pulkit added a subscriber: pulkit.Jun 1 2018, 5:32 AM
pulkit added inline comments.
mercurial/phases.py
407–411

Add documentation about dry-run and the return value.

433

Why are we not using this affected set here to find the changesets whose phase is changed?

446

(Not sure which line I should put this comment on)

Just like D3671, here also, the function should return the correct set of changes whose phase have been changed irrespective of the dryrun value passed.

535

This should better be:

`If dryrun is True, no actions will be performed

returns a set of revs whose phase is changed or should be changed`

khanchi97 added inline comments.Jun 1 2018, 8:50 AM
mercurial/phases.py
407–411

okay

433

Because I think this affected set is calculated after performing actions, when phases are changed. And calculating affected using new phaseroots. Am I missing something here?

446

yeah, I got it.

535

okay, will do this for 'advanceboundry' too

khanchi97 updated this revision to Diff 8959.Jun 3 2018, 9:51 AM
khanchi97 updated this revision to Diff 8960.Jun 3 2018, 9:55 AM
pulkit added a subscriber: yuja.Jul 11 2018, 5:24 PM
pulkit added inline comments.
mercurial/phases.py
433

I think affected can be used here. Maybe @yuja might know better.

@yuja we want to return a set of revs whose phase is changed by this function. Does affected looks like the correct set to you?