D1047: tweakdefaults: add restack command

quark (Jun Wu) phabricator at mercurial-scm.org
Fri Oct 13 13:41:02 EDT 2017


quark added a comment.


  In https://phab.mercurial-scm.org/D1047#17465, @dlax wrote:
  
  > As an end user, I'd probably not use this; it's too much magic.
  
  
  `restack` is used pretty frequently by internal users. I think it could be hard for some users (ex. designers) to understand the DAG, or know what to do after `hg amend` in the middle of a stack. So this command is pretty handy.
  
  I also think it's at least less magic than `evolve` since the it's just a plain rebase with a fancy revset (displayed when you run `--help`). Users understanding revsets could follow its logic and understand what it's doing.

INLINE COMMENTS

> dlax wrote in ui.py:56
> Maybe also explain what `ALLSRC` and `SRC` are.
> Also, it's not clear from reading this which "orphaned changesets" would be rebased. All of them?

This will be explained in rebase command help text (by the time experimental flag gets removed).

> dlax wrote in ui.py:86
> Do we want to activate an experimental option in tweakdefaults?

I think it's fine since this is invisible to end-user. I also plan to remove the experimental flag soon(tm).

> dlax wrote in test-tweakdefaults-restack.t:28
> It's not obvious where wordking directory is, so maybe issue a `hg log -r .`

Working directory is `null`. Since `rebase` is expected to take care of working directory movement and that is covered by rebase tests, I think it's okay to not care about working directory here.

REPOSITORY
  rHG Mercurial

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

To: quark, #hg-reviewers
Cc: dlax, mercurial-devel


More information about the Mercurial-devel mailing list