Future SCM Technology

Jesse Keating jkeating at redhat.com
Thu Jun 7 19:12:22 UTC 2007


On Thursday 07 June 2007 15:01:12 Axel Thimm wrote:
> I think it is more like "copy, then remove", which is all you really
> want as the history can be propagated back through the copy/rename
> operation (-f option to any relevant hg command will do the trick).

Maybe you know something that I don't, but the last time I looked at this, 
there was no way in HG to rename a file, but keep change history of that 
file.  When changing the name you suddenly have no history of that file.


[jkeating at reducto test]$ hg init
[jkeating at reducto test]$ echo "hi" > file1
[jkeating at reducto test]$ hg add file1 
[jkeating at reducto test]$ vim file1 
[jkeating at reducto test]$ hg commit
[jkeating at reducto test]$ hg log
changeset:   0:be1bfb05d4e3
tag:         tip
user:        Jesse Keating <jkeating at redhat dot com>
date:        Thu Jun 07 15:11:57 2007 -0400
summary:     Add changes

[jkeating at reducto test]$ vim file1 
[jkeating at reducto test]$ hg commit -m 'more changes'
[jkeating at reducto test]$ hg rename -f file1 file2
[jkeating at reducto test]$ hg log
changeset:   1:330279523a87
tag:         tip
user:        Jesse Keating <jkeating at redhat dot com>
date:        Thu Jun 07 15:12:16 2007 -0400
summary:     more changes

changeset:   0:be1bfb05d4e3
user:        Jesse Keating <jkeating at redhat dot com>
date:        Thu Jun 07 15:11:57 2007 -0400
summary:     Add changes

[jkeating at reducto test]$ hg commit
[jkeating at reducto test]$ hg log
changeset:   2:6aebe1d981ee
tag:         tip
user:        Jesse Keating <jkeating at redhat dot com>
date:        Thu Jun 07 15:12:39 2007 -0400
summary:     File rename

changeset:   1:330279523a87
user:        Jesse Keating <jkeating at redhat dot com>
date:        Thu Jun 07 15:12:16 2007 -0400
summary:     more changes

changeset:   0:be1bfb05d4e3
user:        Jesse Keating <jkeating at redhat dot com>
date:        Thu Jun 07 15:11:57 2007 -0400
summary:     Add changes

[jkeating at reducto test]$ log log file2 
-bash: log: command not found
[jkeating at reducto test]$ hg log file2 
changeset:   2:6aebe1d981ee
tag:         tip
user:        Jesse Keating <jkeating at redhat dot com>
date:        Thu Jun 07 15:12:39 2007 -0400
summary:     File rename

No history in that file before the rename.

-- 
Jesse Keating
Release Engineer: Fedora
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-devel-list/attachments/20070607/f74179d8/attachment.sig>


More information about the fedora-devel-list mailing list