Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We are doing a major refactor of the layout of our source tree. Masses of files are being moved, folders are being renamed, etc. etc. We currently have everything in SVN.

We're going to move to either GIT or HG in the future.

However, now we're thinking that maybe we should move to GIT or HG first and then do the refactor. We're worried that work in progress on svn branches aren't going to be able to merge the refactoring changes into their branch NOR are they going to be able to merge any changes to files that have been moved and/or renamed back into the trunk.

  1. Which between GIT and HG would better handle this type of refactoring?
  2. If we do move to GIT/HG and then do the refactor, what will be merging be like for the work in progress branches once they move to GIT/HG?

migration rejected from Aug 23 '15 at 23:58

This question came from our site for professional and enthusiast programmers. Votes, comments, and answers are locked due to the question being closed here, but it may be eligible for editing and reopening on the site where it originated.

closed as off-topic by GlenH7, MichaelT, durron597, gnat, Snowman Aug 23 '15 at 23:58

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions asking us to recommend a tool, library or favorite off-site resource are off-topic for Programmers as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – GlenH7, Community, durron597, gnat, Snowman
If this question can be reworded to fit the rules in the help center, please edit the question.

Go for it, switch to Mercurial/Git before you start to refactor! – Oben Sonne Aug 22 '11 at 21:01

Yes, you must migrate to DCVS-of-choice before refactoring, merging refactored in SVN is big headache

  1. For ordinary refactoring (only move in commit) both Git and Mercurial are at the same level of usability ("very good") They differ in situations, then you'll move part of code between files in refactoring, because GIT uses auto-guessing on renames with some heuristic, Mercurial, in contrast, expect user's intervention and flagging renames explicitly (but Mercurial also uses "similarity level" for guessing pair under the hood)
I've done big refactorings of Java and C++ code in SVN without problems. Really, when refactoring a codebase, VCS is the least of your problems. Just do things in steps, check in frequently, and you'll be fine. – quant_dev Sep 18 '11 at 19:43

Not the answer you're looking for? Browse other questions tagged or ask your own question.