[issue780] qpush doesn't remove undo.dirstate

Marti mercurial-bugs at selenic.com
Fri Oct 12 06:21:12 CDT 2007


New submission from Marti <intgr at juffo.org>:

The mq 'qpush' command does not currently remove the undo.dirstate file which
can corrupt the repository when rolled back.

However, I'd like to state that I would much prefer simply denying rollback when
and *only* when patches are applied, rather than removing the rollback
information. That's because I find rollback a very useful feature of hg: instead
of checking everything before a commit, I can simply commit without thinking
twice, knowing that rolling back and re-committing is a breeze.

mq commands break all that. To fix a single commit, I now need to clone an
earlier revision, rename the repository and manually copy over hgignored files,
which is tedious and annoying. (Should I create a separate feature request for
this?)

Here's a testcase to create a corrupted repository:

export MAILTO=none
hg init; echo 'hello, world' > hello.txt; hg add hello.txt; hg commit -m.
hg qnew hello.patch
echo 'hello, world' > hello2.txt; hg add hello2.txt
hg qref; hg qpop
echo 'hello, world' > hello3.txt; hg add hello3.txt
hg commit -m.
hg qpush
ls -la .hg/undo.dirstate # shouldn't be present at this point
hg rollback
hg log                   # fails, repo is broken by rollback

----------
messages: 4130
nosy: intgr
priority: bug
status: unread
title: qpush doesn't remove undo.dirstate
topic: mq

____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://www.selenic.com/mercurial/bts/issue780>
____________________________________________________



More information about the Mercurial-devel mailing list