开发者

How to get complete history of a file, including deletes, renames and the source of copy/rename?

The --removed and --follow switches seem to be incompatible so I 开发者_如何转开发can get either deletions or copy / renames.

I also want to find the source of the rename or copy.


That --removed doesn't work with --follow seems like a bug. You get file copies using:

hg --verbose -C -f <file>

or use a custom template using {file_copies}:

hg log --template "changeset: {node|short}\nuser: {author}\ndate: {date|rfc822date}\nfile+: {file_adds}\nfilem: {file_mods}\nfile-: {file_dels}\nfilec: {file_copies}\nsummary: {desc|firstline}\n\n" -f file2


You can use a custom template to display and also to format the file-copy messages properly:

hg log --template "{rev}\n{file_copies % '  {file_copy}\n'}\n" --follow <file_name>    

More about custom templates:

hg help -v templates
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜