0

I was curious to know more about how different version control systems track renaming files in a repository, especially in the case of a merge. On this question, comparing Git, SVN and Mercurial's strategies for file renaming, someone posted this blog post from an author claiming that Bazaar's file rename strategy is much more robust than any other VCS. The author states that Bazaar "treats renames as a first class operation".

What the author didn't explain was how this works, what it means to treat renames as a first class operation, and why its strategy is better than, e.g. Git's "best guess" rename detection algorithm.

I have no experience of Bazaar, but I'd like to know:

  1. How does it handle file renaming?
  2. What makes its algorithm more reliable than other popular VCS (if anything)?

I couldn't find this information easily from Bazaar's own docs.

Lou
  • 2,200
  • 2
  • 33
  • 66

1 Answers1

-2

Preface

Bzr is dead

Text without facts from 2007 is just a piece of shit

Face

In bzr or hg, you have two things: the fileobject (doesn’t change across rename) and the filename (change across rename). Both applications are keeping this information, but the difference is in the implementation. The primary storage of a fileobject in hg depends of the filename (with a pointer to the previous fileobject if the previous fileobject doesn’t have the same filename, that is the couple (filename, revision)). In bzr the fileobject is stored directly on disk.

Source: https://www.markshuttleworth.com/archives/123#comment-110483

Answers

  1. Bzr record(ed) renames at repo as single transaction "rename", in hg it's (still) "remove"+"add", also recorded in revlog and give the same result: traceability of the whole history of every object)
  2. In 2022 Bzr's rename isn't "more reliable" than Hg, but better Git's guessing (just because every guessing instead of recorded event may be wrong in edge cases)

Resume

In 2022 you haven't reasons to prefer Bzr (or its successor Breezy) or Darcs or Pijul over Hg pure due to rename possibilities

Lou
  • 2,200
  • 2
  • 33
  • 66
Lazy Badger
  • 94,711
  • 9
  • 78
  • 110