在Mercurial中,"hg重命名"表示可以,但是历史记录不遵循文件? [英] In Mercurial, "hg rename" works but the history doesn't follow the file?
问题描述
我记得在SVN中,我可以将文件从foo.txt重命名为foo2.txt,所有历史记录都将跟随(foo2.txt的日志文件也将显示foo.txt的所有历史记录).但是在Mercurial上似乎并非如此.完成hg rename
后,hg log foo2.txt
将不显示任何以前的foo.txt
历史记录吗?有办法解决吗?
I remember in SVN, I can rename a file from foo.txt to foo2.txt and all the history will follow (log file of foo2.txt will show all history of foo.txt as well). But on Mercurial, seems like that's not the case. When a hg rename
is done, then hg log foo2.txt
will not show any previous history of foo.txt
? Is there a way around it?
推荐答案
使用hg log --follow foo2.txt
或hg log -f foo2.txt
(缩写形式)向您显示hg rename
Use hg log --follow foo2.txt
or hg log -f foo2.txt
(short form) to show you the entire history of the file before the hg rename
这篇关于在Mercurial中,"hg重命名"表示可以,但是历史记录不遵循文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!