[Bug 6089] New: `hg pick` doesn’t update branch of working directory

mercurial-bugs at mercurial-scm.org mercurial-bugs at mercurial-scm.org
Fri Feb 22 18:46:26 UTC 2019


https://bz.mercurial-scm.org/show_bug.cgi?id=6089

            Bug ID: 6089
           Summary: `hg pick` doesn’t update branch of working directory
           Product: Mercurial
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: UNCONFIRMED
          Severity: feature
          Priority: wish
         Component: evolution
          Assignee: bugzilla at mercurial-scm.org
          Reporter: me at manueljacob.de
                CC: mercurial-devel at mercurial-scm.org,
                    pierre-yves.david at ens-lyon.org

Steps to reproduce:
hg init

touch test1
hg add test1
hg ci -m 'first commit on default'

hg branch foo
touch test2
hg add test2
hg ci -m 'first commit on foo'

hg up default
echo test > test1
hg ci -m 'second commit on default'

hg grab 1
hg log --template '{branch}\n' -r tip
hg branch

Expected behavior:
The branch of the working directory is `foo`, the same as the branch of the new
changeset.  This would be consistent with the description of the command in the
help: "move a commit on the top of working directory parent and updates to it".

Actual behavior:
The branch of the working directory is `default`.

Analysis:
The implementation of the `hg pick` command, function `cmdpick` in
`hgext3rd/evolve/cmdrewrite.py`, passes the `extra` dictionary of the original
changeset to `repo.commit()`.  However, it doesn’t update the branch of the
working directory.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list