[issue1441] MQ fails when moving existing files in a patch
Gary Bernhardt
mercurial-bugs at selenic.com
Tue Dec 16 14:24:00 CST 2008
New submission from Gary Bernhardt <gary.bernhardt at gmail.com>:
When a file is added in a patch, then renamed, then qrefreshed, an exception
will be raised. To reproduce (verified on 1.1, tip, and crew rev 4acf5f24912b):
hg init
hg qnew patch_to_break
> first_file
hg add first_file
hg qrefresh
hg mv first_file second_file
hg qrefresh
The second qrefresh will raise an exception (attached as
qrefresh_exception.txt).
A brief look at the localrepository.filecommit method (circa line 718) shows
that when a file is moved, it tries to find the most recent revision containing
the original file. But, when qrefreshing, mq strips the old revision of the
patch, then commits the new revision. So if the file was created by the first
qrefresh, and renamed in the second qrefresh, there's no ancestor for
localrepository to find. I briefly tried to figure out how to fix it, but I
don't really understand mercurial's guts, so I don't feel competent to fix
something this subtle. :)
----------
files: qrefresh_traceback.txt
messages: 8251
nosy: garybernhardt
priority: bug
status: unread
title: MQ fails when moving existing files in a patch
topic: mq
____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://www.selenic.com/mercurial/bts/issue1441>
____________________________________________________
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: qrefresh_traceback.txt
Url: http://selenic.com/pipermail/mercurial-devel/attachments/20081216/b0e2a7f1/attachment.txt
More information about the Mercurial-devel
mailing list