tags:

views:

56

answers:

1

I have a file foo.py with some history. I want to rename it bar.py but see the history with "hg log".

I tried "hg rename". It does not seem to maintain the history.

FYI. I only browsed the man page.

Thanks in advance!


Thanks for the answer.

As an addendum, if foo.py is 500 KB, will a rename increase the size of the repository by at least 500 KB? Is there any way where it can not do this and simply store a name mapping?

+5  A: 

Use hg log --follow. From hg help log:

-f --follow follow changeset history, or file history across copies and renames

Niall C.
This is something that is not intuitive with mercurial as you have to ask it to follow the renames/moves for the history display. It will automatically understand the move when merging branches but not for history.
Eric-Karl