0

I currently have a source file with two classes in it. I'd like to move one of them into a separate file. Is there any way to do this in a way similar to "hg mv" where Mercurial realizes the relationship between the new file and the part of the old file? Or does it have to look to Mercurial like a big chunk of one file was deleted and a brand new file was created? Is there some other best-practice I should be following here?

I will be very impressed if this kind of tracking actually exists, but it wouldn't be the first time Mercurial has pleasantly surprised me.

mcstrother
  • 6,867
  • 5
  • 22
  • 18

1 Answers1

2

You may do it via copy (hg copy) command. Just create a copy, change each copy and commit.

foal
  • 693
  • 7
  • 20
  • Upvote and accept for brevity :) And, of course, for being the correct answer in many ways: while it's clear from the other question that there is no real official way to do this, and it perfectly address merging, it's a heck of a lot better than creating a new file and copying and pasting, especially for functions like `hg blame`. – mcstrother Jul 19 '11 at 04:20