D3818: scmutil: make cleanupnodes optionally also fix the phase

mharbison72 (Matt Harbison) phabricator at mercurial-scm.org
Wed Jun 20 22:31:37 EDT 2018


mharbison72 added a comment.


  In https://phab.mercurial-scm.org/D3818#59706, @martinvonz wrote:
  
  > Anyway, I like the idea of being able to use cleanupnodes() for amend as well. Perhaps something like this:
  >
  > fixphase=False, targetphase=None => leave phases alone (used by rebase and histedit)
  >  fixphase=True, targetphase=None => set phases based just on the precursors' phase (used by most other commands)
  >  fixphase=True, targetphase=<phase> => set phase to targetphase unless parent has higher phase (used by `hg amend --secret`)
  >  fixphase=False, targetphase=<phase> => assertion error
  
  
  It always bugs me when an API can allow a bad combination of arguments, but I don't see a better way, and I think the consistent use of cleanupnodes() is more important.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D3818

To: martinvonz, #hg-reviewers
Cc: mharbison72, yuja, mercurial-devel


More information about the Mercurial-devel mailing list