D1074: branch: add a --rev flag to change branch name of given revisions

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Fri Jan 19 09:31:29 EST 2018


pulkit added inline comments.

INLINE COMMENTS

> cmdutil.py:739
> +        if repo.revs('(%ld::head()) - %ld', revs, revs):
> +            raise error.Abort(_("cannot change branch in middle of a stack"))
> +

After some more testing, I found this is not correct and raise the error even in cases when it should not. For example:

o  3

| o  2 |
| /    |
|

o  1
o  0

Here if I want to change the branch of 1::2, this will raise error however this should be completely fine if we have allowunstable enabled. So in next version, I am going to add a test for allowunstable and if that's enabled, allow to change branch of 1::2.

REPOSITORY
  rHG Mercurial

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

To: pulkit, #hg-reviewers, dlax, ryanmce, lothiraldan
Cc: martinvonz, lothiraldan, ryanmce, dlax, mercurial-devel


More information about the Mercurial-devel mailing list