Added the logic to find those csets whose phase will be changed
(while running without --dry-run). And show the list of those csets.
Details
- Reviewers
pulkit baymax - Group Reviewers
hg-reviewers
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Event Timeline
mercurial/commands.py | ||
---|---|---|
3943 | "cannot use --dry-run without target phase" |
mercurial/commands.py | ||
---|---|---|
3962 | Since all the logic is copy-pasted from phases.advanceboundary and phases.retractboundary, why not we just pass the --dry-run option there and get the count from those functions only. | |
tests/test-phases.t | ||
990 | This is not very much helpful. In such cases, how about showing the range of changesets, something like: f7b1eb17ad24::925d80f479bb public -> draft b385d13d5ed4::fdc0253c25cf secret -> draft |
okay, but I have some queries like
- How about showing revision no. instead of cset id?
- And in this https://pastebin.com/raw/kWcr9xVK example if I change revision 2 phase to --secret then how it should print the range, I mean now we have branches in this range?
Can we show that range like this:
0316ce92851d : : b385d13d5ed4 draft -> secret
0316ce92851d : : 4ccc844d5454 draft -> secret
I think we should show cset ids. If you want to with rev numbers, go with that. This should not be a blocker to get the initial patch in.
- And in this https://pastebin.com/raw/kWcr9xVK example if I change revision 2 phase to --secret then how it should print the range, I mean now we have branches in this range?
Can we show that range like this:
0316ce92851d : : b385d13d5ed4 draft -> secret
0316ce92851d : : 4ccc844d5454 draft -> secret
There are two ways you can show the range in this case:
- 0316ce92851d::b385d13d5ed4 and f19b7f89f44e::4ccc844d5454
- 0316ce92851d::4ccc844d5454 and b385d13d5ed4
Look into hg help revsets to understand what :: means.
@pulkit Now I moved the logic for finding revs (those phase will change) to advanceboundry and retractboundry function and for now it shows all nodes. I am working to show range instead. Take a look at this when you are free :)
Nice work! I like where how you simplified things from previous version.
If you look at the patch, this seems to do multiple things at once which are:
- adding dry-run argument to advanceboundary and retractboundary functions
- adding a new --dry-run flag to hg phase
Let's break things up in individual patches so that we can improve more on individual pieces. Can you split this into a separate patch for adding dryrun argument to each function, i.e. one patch for adcanceboundary, one for retractboundary, and then one last patch which adds the new flag? That will be very much helpful in reviewing this work and also making incremental changes and moving forward step by step.
There seems to have been no activities on this Diff for the past 3 Months.
By policy, we are automatically moving it out of the need-review state.
Please, move it back to need-review without hesitation if this diff should still be discussed.
:baymax:need-review-idle:
"cannot use --dry-run without target phase"