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

            Bug ID: 5545
           Summary: histedit with interrupted merge -> empty status causes
                    dataloss
           Product: Mercurial
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: bug
          Priority: wish
         Component: histedit
          Assignee: bugzi...@mercurial-scm.org
          Reporter: s...@fb.com
                CC: mercurial-devel@mercurial-scm.org

Repro against ed42e00a5c4ec7a3bebaec699ef934429cdc2ddd (current @).

  $ cat >>$HGRCPATH <<EOF
  > [extensions]
  > histedit=
  > EOF

  $ hg init foo
  $ cd foo
  $ echo one >> alpha
  $ hg addr
  adding alpha
  $ hg ci -m one
  $ echo two >> alpha
  $ hg ci -m two
  $ echo three >> alpha
  $ hg ci -m three

  $ hg log --style compact --graph
  @  2[tip]   a3884f37e029   1970-01-01 00:00 +0000   test
  |    three
  |
  o  1   c06dfaaa4216   1970-01-01 00:00 +0000   test
  |    two
  |
  o  0   7bed31acdb1e   1970-01-01 00:00 +0000   test
       one



  $ hg histedit 0 --commands - 2>&1 << EOF
  > pick 7bed31acdb1e one
  > roll a3884f37e029 three
  > roll c06dfaaa4216 two
  > EOF
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
  merging alpha
  warning: conflicts while merging alpha! (edit, then use 'hg resolve --mark')
  Fix up the change (roll a3884f37e029)
  (hg histedit --continue to resume)
  [1]

  $ hg histedit --continue
  abort: unresolved merge conflicts (see 'hg help resolve')
  [255]

Make it so that 'hg status' is empty
  $ echo one > alpha
  $ hg status
  ? alpha.orig

Note we run hg histedit --continue without running hg resolve -ma
  $ hg histedit --continue
  a3884f37e029: empty changeset
  abort: outstanding merge conflicts
  [255]

Note the changeset this time is different
  $ hg histedit --continue
  c06dfaaa4216: empty changeset
  abort: outstanding merge conflicts
  [255]

Note no changeset
  $ hg histedit --continue
  abort: outstanding merge conflicts
  [255]

  $ hg resolve -ma
  (no more unresolved files)
  continue: hg histedit --continue
  $ hg histedit --continue
  saved backup bundle to
$TESTTMP/foo/.hg/strip-backup/c06dfaaa4216-ae0859b0-backup.hg (glob)

The third action got lost
  $ echo alpha
  alpha
  $ hg log --style compact --graph
  @  0[tip]   7bed31acdb1e   1970-01-01 00:00 +0000   test
       one

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to