"‘Bazaar’ rename is the feature I miss in any other VCS"

Date:June 10th, 2014
Comments: 1
  • Join date: 11-30-99
  • Posts: 23
View Counter:
Rate it
  • What computer language you specialize in?

    View Results

    Loading ... Loading ...
  • bodytext bodytext bodytext

We were just discussing with my colleague, Marc, why Git is a great and capable tool and how it can do almost anything.

– “But, it cannot do the rename“, said Marc.

– “Why, of course it can“, I said.

No, it would probably handle things wrongly. And here is a classic example:

✔ You cloned (checked out) some repository and maybe branch your code line.
The only change you made is you edited one file. Let us call it “OldName.java”.

✔ You peer also branched the main code line.
He renamed the file “OldName.java” to “NewName.java” and created an empty file “OldName.java” in the same directory.

✔ Now you want to merge the changes from his branch into yours. Actually, you want to have your edited content of “OldName.java” transferred into “NewName.java”. That would be the correct merge of renamed file.

On git, svn or mercurial you will probably get a message, stating that there are two conflicting versions of “OldName.java” and you should resolve the conflict manually. And that is just wrong. You have no conflict because “OldName.java” created by your peer has nothing to do with your “OldName.java”. And the “NewName.java” has no conflicts with your version, your local version is just “ahead of it” .

And I would expect that scenario to be handled properly by my VCS tool.

Here is more… http://www.markshuttleworth.com/archives/123

Be Sociable, Share!
Interesting entry?
VN:F [1.8.5_1061]
Rating: 0 (from 0 votes)
0 votes 'YES'  0 votes 'NO'

No tags for this post.


Be Sociable, Share!



One Response to “‘Bazaar’ rename is the feature I miss in any other VCS”

  1. Paul Sanchez says:

    Good blog post, nice efforts. It couldn’t appear to have been penned any better. Reading this article piece of writing reminds me about my old boss! He usually kept babbling about this. I will email this post to him. Pretty confident he will probably have a high-quality read. Appreciate your posting!