engineerchuan
engineerchuan

Reputation: 2708

Is there an hg equivalent to git-mv?

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?

Upvotes: 0

Views: 253

Answers (1)

Niall C.
Niall C.

Reputation: 10908

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

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

Upvotes: 5

Related Questions