Handling renames: svn vs. git vs. mercurial

  • Git doesn’t track renames at all, but uses heuristic to re-discover them during merge etc.
  • Mercurial tracks renames (the origin version and origin file is recorded) and uses that information during merges. So you have to explicitly tell hg about renames with hg mv, or use hg addremove --similarity for auto-discovery. There has been some talk about adding heuristics during merge too.
  • Svn tracks renames, but I don’t know how good it deals with them during merges (never actually tested that).

Leave a Comment