Mercurial Queues 0.8 bug
Radoslaw AstralStorm Szkodzinski
astralstorm at gorzow.mm.pl
Wed Jul 27 05:06:59 UTC 2005
I've found a bug in Mercurial Queues. It'll break the repo if the patch file
dissappears and one tries to push to it (at least with mq push -a).
The same problem could happen in any case in which repository throws an
unhandled exception. It would then rollback to the state recorded in the
changelog, removing the needed repository keys, including one representing
current dirstate and its parent.
Testcase:
mkdir test
cd test
hg init
mq init
echo 1 > test1
mq new 1.patch
mq refresh
echo 2 > test2
mq new 2.patch
mq refresh
mq pop -a
rm .hg/patches/2.patch
mq push -a # Wrong transaction handling!
applying 1.patch
applying 2.patch
Traceback (most recent call last):
File "/usr/local/bin/mq", line 536, in ?
func(u, q, *args, **cmdoptions)
File "/usr/local/bin/mq", line 459, in push
q.push(patch, force=opts['force'])
File "/usr/local/bin/mq", line 266, in push
self.apply(s)
File "/usr/local/bin/mq", line 62, in apply
for l in file(pf):
IOError: [Errno 2] No such file or directory: '/usr/src/test/.hg/patches/2.patch'
transaction abort!
rollback completed !!!!!!!!! THIS SHOULDN'T HAPPEN !!!!!!!!!
mq diff # DEADBEEF
hg update -C # DEADBEEF
hg log # Wrong!
hg undo
hg id # Wrong!
--
AstralStorm
GPG Key ID = 0xD1F10BA2
GPG Key fingerprint = 96E2 304A B9C4 949A 10A0 9105 9543 0453 D1F1 0BA2
Please encrypt if you can.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20050727/c1654d28/attachment-0001.asc>
More information about the Mercurial
mailing list