[Bug 6248] New: [graft] outputs "nothing to merge" when I would expect changes

mercurial-bugs at mercurial-scm.org mercurial-bugs at mercurial-scm.org
Tue Dec 31 08:01:53 EST 2019


            Bug ID: 6248
           Summary: [graft] outputs "nothing to merge" when I would expect
           Product: Mercurial
           Version: 5.2.1
          Hardware: PC
                OS: Linux
            Status: UNCONFIRMED
          Severity: bug
          Priority: wish
         Component: rebase
          Assignee: bugzilla at mercurial-scm.org
          Reporter: cchamberlain at janestreet.com
                CC: mercurial-devel at mercurial-scm.org
    Python Version: ---

Here is a small reproduction of the issue:

    $ hg init

    $ echo a > a.txt && hg commit -Am 'a'

    $ echo b > b.txt && hg commit -Am 'b'

    $ hg graft --base 1 --rev 0                                                 
    grafting 0:91cf7708b4de "a"                                                 
    abort: nothing to merge                                                     
    (use 'hg update' or check 'hg heads')

    $ hg commit -m empty --config ui.allowemptycommit=True

    $ hg graft --base 1 --rev 0                                              
    grafting 0:91cf7708b4de "a"

    $ hg log -r . -p
    changeset:   3:5d568de202de
    tag:         tip
    user:        Charles Chamberlain <cchamberlain at janestreet.com>
    date:        Tue Dec 31 12:46:28 2019 -0500
    summary:     a

    diff --git a/b.txt b/b.txt
    deleted file mode 100644
    --- a/b.txt
    +++ /dev/null
    @@ -1,1 +0,0 @@

I would have expected the first graft to have the same behaviour as the second
graft, which is on a different commit but working directory should be in the
same state. Note that the --rev that I'm passing is an ancestor of the --base:
I'm hoping to be able to use graft to apply the reverse of the diff between
commits. Do you have any insight? Thanks very much and happy new year!

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

More information about the Mercurial-devel mailing list