[Bug 4593] New: Deleting when there's an incomplete merge leads to inconsistent state

mercurial-bugs at selenic.com mercurial-bugs at selenic.com
Sat Apr 11 01:31:03 UTC 2015


http://bz.selenic.com/show_bug.cgi?id=4593

          Priority: normal
            Bug ID: 4593
                CC: mercurial-devel at selenic.com
          Assignee: bugzilla at selenic.com
           Summary: Deleting when there's an incomplete merge leads to
                    inconsistent state
          Severity: bug
    Classification: Unclassified
                OS: All
          Reporter: 14exom+du626z7jl4c34 at sharklasers.com
          Hardware: All
            Status: UNCONFIRMED
           Version: 3.1.2
         Component: Mercurial
           Product: Mercurial

This script leaves the working directory in an inconsistent state.

mkdir bug
cd bug
hg init
echo 1 > file
hg add file
hg commit -u blah -m r0
echo 2 > file
hg commit -u blah -m r1
hg up 0
echo 3 > file
hg up -t false
hg strip -k -r tip

Now when trying to do hg commit, we get:

abort: unresolved merge conflicts (see hg help resolve)

and when running hg resolve --all:

abort: unknown revision '<long hash>'!

The same happens if using hg rollback rather than hg strip (doing hg revert -a
; hg up ; hg rollback instead of hg strip).

The working dir can be brought back to a consistent state by first backing up
the changes if necessary with hg diff or maybe hg shelve (I haven't tried),
then running hg up -C. I'm grateful to smf from IRC for this solution.

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


More information about the Mercurial-devel mailing list