[issue2367] qrefresh with filelist is dangerous

David Bruton bugs at mercurial.selenic.com
Wed Sep 8 04:24:39 CDT 2010


New submission from David Bruton <dave.bruton at imgtec.com>:

Attempting to refresh only certain files in a patch gives surprising
results, and is dangerous.

hg qrefresh <filename>

If the patch previously contained edits to other files, these edits will no
longer be part of the patch after this command.  IMO, it would be preferable
(and less surprising) if the patch remained as it was w.r.t. the files not
mentioned.

This is particularly dangerous if there are edits in the working directory
to files that are affected by the patch, as two sets of edits will be
combined.  This is almost certainly not the desired result.

As a minimum, I'd like to see a documentation change to clarify this
behaviour, and a "-f" required if local edits exist to a file that has mods
in the patch.

Better, would be that the behaviour of the qrefresh command be changed to
leave alone the files not mentioned, so that local edits stay local and
in-patch edits stay in-patch.

-djlb.

----------
messages: 13579
nosy: imgdjlb
priority: bug
status: unread
title: qrefresh with filelist is dangerous

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


More information about the Mercurial-devel mailing list