[Bug 3480] New: several mq failure modes make it likely to lose data on next qrefresh

bugzilla-daemon at bz.selenic.com bugzilla-daemon at bz.selenic.com
Fri Jun 1 03:50:04 CDT 2012


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

          Priority: normal
            Bug ID: 3480
                CC: mercurial-devel at selenic.com
          Assignee: bugzilla at selenic.com
           Summary: several mq failure modes make it likely to lose data
                    on next qrefresh
          Severity: bug
    Classification: Unclassified
                OS: All
          Reporter: patrick at mezard.eu
          Hardware: All
            Status: UNCONFIRMED
           Version: unspecified
         Component: mq
           Product: Mercurial

If qpush fails to rename a file because the file is no longer there, the call
aborts and remaining hunks are not applied, are not written as .rej and the
user is not notified about them not being applied while being told to fix the
.rej and qrefresh. This easily lead to qrefreshing and losing these changes.

  $ echo "[extensions]" >> $HGRCPATH
  $ echo "mq=" >> $HGRCPATH

  $ hg init repo
  $ cd repo
  $ echo a > a
  $ echo b > b
  $ hg ci -Am addfiles
  adding a
  adding b
  $ echo b >> b
  $ hg mv a c
  $ hg qnew movea
  $ hg qpop
  popping movea
  patch queue now empty
  $ hg rm a
  $ hg ci -m rma
  $ hg qpush -v
  applying movea
  [Errno 2] No such file or directory: '$TESTTMP/repo/a'
  patch failed, rejects left in working dir
  errors during apply, please fix and refresh movea
  [2]
  $ ls
  b
  $ cat b
  b

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


More information about the Mercurial-devel mailing list