Tailor

Thomas Arendsen Hein thomas at intevation.de
Sat Jul 2 05:08:12 CDT 2005


* Lele Gaifax <lele at nautilus.homeip.net> [20050702 00:21]:
> Investigating, I seem to understand that hg does not track
> directories; nowhere in the the manual there is a mention of them, and
> "hg add directory" gives me "directory does not exist". Is this right?

Correct.

> If so, I'm undecided on which is the right way of replaying a patch
> that moves a directory, between "hg addremove" and traversing the
> whole subtree doing "hg add" as appropriate...

I think doing mv + 'hg copy olddir/foo newdir/foo' for every file is
the only supported way at the moment, the bash equivalent is:

mv "$olddir" "$newdir" && \
find "$newdir" -type f -print | while read name
do hg copy "$olddir/${name:${#newdir}+1}" "$name"; done

> Mercurial recorded the above patch as
> 
> changeset:   5:d02ca3eb31a3b5d03002cf16e6cf8454ca9e8e1c
> files:
> 
> which is double wrong, since a) it seems wrong having a patch that
> does not touch any file,

Try 'hg -d log -r5', otherwise removes may not show up.

> expecially when b) it should (at least) have
> committed the removes that hg seemed to accept.

Showing removes is currently very expensive with Mercurial, so it's
not enabled by default.

Thomas

-- 
Email: thomas at intevation.de
http://intevation.de/~thomas/


More information about the Mercurial mailing list