[RFC] remove/copy enhancements

Jordan Breeding jordan.breeding at mac.com
Thu Sep 15 12:30:27 CDT 2005


On Thursday, September 15, 2005, at 12:14PM, Bryan O'Sullivan <bos at serpentine.com> wrote:

>On Thu, 2005-09-15 at 12:00 -0500, Jordan Breeding wrote:
>> Hello for the rest of the email I will reference this output
>
>Sorry, but that's way too long to read, especially without a description
>of the problems first.
>
>> 1) If, during a remove, a directory tree becomes empty and the remove
>> command was issued using that directory (eg. `hg remove three` above),
>> I think that we should prune the empty directory tree as we do for
>> updates.
>
>I wrote code to do that, but ended up yanking it before the commit.  If
>other people would like that behaviour, it's easy to put back in.
>Opinions, anyone?
>
>> 2) It seemed to me that `hg cp -p` would work like `cp -R` and that it
>> would create the new directory structure for me.
>
>That's what it does.
>
>	<b

I will summarize my problem with copy and then give a shorter example than last time.  The problem I see is that `hg cp -p <dir> <new_name>` fails, `hg cp -p <dir> .` fails, `mkdir <new_name>; hg cp -p <dir> <new_name>` works but I end up with <new_name>/<dir>.

Here is a short example:

50 jbb at cloves /tmp/jbb_test > hg cp -p three ten
abort: with --parents, destination must be a directory
51 jbb at cloves /tmp/jbb_test > mkdir ten
52 jbb at cloves /tmp/jbb_test > hg cp -p three ten
copying three/four/seven to ten/three/four/seven
53 jbb at cloves /tmp/jbb_test > rm -rf ten
54 jbb at cloves /tmp/jbb_test > hg status
R ten/three/four/seven
57 jbb at cloves /tmp/jbb_test > hg forget
forgetting ten/three/four/seven
58 jbb at cloves /tmp/jbb_test > hg status
59 jbb at cloves /tmp/jbb_test > hg cp -p three .
abort: with --parents, destination must be a directory
60 jbb at cloves /tmp/jbb_test > hg cp -p three ./
abort: with --parents, destination must be a directory

Jordan


More information about the Mercurial mailing list