Does hg mv a bar/ discard a's history?
Aurelien Jacobs
aurel at gnuage.org
Mon Jul 16 20:58:29 UTC 2007
On Mon, 16 Jul 2007 22:35:36 +0200
Matthias Luedtke <matthias-luedtke at gmx.de> wrote:
> Hi all,
>
> first, I owe you a big 'thank you'! From what I've seen so far,
> Mercurial is a damn nice piece of software. I hope you can explain to a
> newbie what's going on here:
>
> When I create a new repository and add two files
>
> hg init foo
> cd foo/
> echo a > a
> mkdir bar
> echo b > bar/b
> hg add a bar/b
> hg commit -m 'Added two lovely files, a and bar/b'
>
> and then do a
>
> hg log a
>
> it yields a's history as expected, like
>
> changeset: 0:4b105d266186
> user: Matthias Luedtke <email at matthias-luedtke.de>
> date: Mon Jul 16 22:14:06 2007 +0200
> summary: Added two lovely files, a and bar/b
>
> However, when I move a to bar/
>
> hg mv a bar/
> hg commit -m 'Moved a to bar/'
>
> and fetch a's history at its new place with
>
> hg log bar/a
Instead, try:
hg log -f bar/a
(by default hg log doesn't follow copy/rename for speed reason)
Aurel
More information about the Mercurial
mailing list