Using mq as shelve

Hans Meine meine at informatik.uni-hamburg.de
Thu May 20 08:59:39 UTC 2010


On Thursday 20 May 2010 10:23:07 Martin Geisler wrote:
> Does hgattic handle the case of removing a file that I have scheduled
> for addition? This case:
> 
>   touch foo
>   hg add foo
>   hg shelve
>   # foo should now be stored in the shelf and removed from working copy
> 
> I seem to remember that one of the shelve extensions did not handle
> this, meaning that foo would be left behind in the working copy and now
> be an unknown file.

Right, I just tried it and the file remains.  Nevertheless, it is still 
contained in the patch.

> The next time I unshelve, things break since foo is in the way.

No problems with unshelving.  Oh yes, you're right.  If the file actually 
contains something (touch is not enough), you're getting a failing patch 
(foo.rej) and unshelve breaks.  (Attached is a minimal test script for *nix; 
alas, the hgattic repo contains .bat files only.)

That's clearly a bug that should be fixed.

Have a nice day,
  Hans
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_shelving_of_added.sh
Type: application/x-shellscript
Size: 83 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20100520/54b1c07d/attachment-0002.bin>


More information about the Mercurial mailing list