Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Understandability of git, mercurial, bazaar source code bases

I'd like to read the source code of one of the popular revision control tools to learn how revision control works. I'd like to read the one that is most readable.

I don't know of an objective, quantitative measure of this, so in the spirit of the WTFs/min comic, I'd like to ask those who have read the source codes of these tools, how many WTFs/min do you estimate each project has?

like image 742
Muchin Avatar asked Mar 17 '11 05:03

Muchin


People also ask

Does Facebook use Git or Mercurial?

In 2013, Facebook adopted Mercurial and began work on scaling it to handle their large, unified code repository. Google also uses Mercurial client as a front-end on their cloud-based 'Piper' monorepo back-end.

What is the difference between Mercurial and Git?

Mercurial is a distributed revision control tool for software developer and it support Microsoft window. Git is distributed system which track the change in source code in which each developer has his repository.

Is Mercurial easier than Git?

While it has its limitations, using Mercurial is way easier than Git, and users of Subversion will find it easy to transition over to Mercurial. This tool also has better documentation, so should you have any issues using Mercurial, you're sure to find an answer to your question soon.


2 Answers

If you read C well (and some Perl and bash too), adymitruk is right. Git is a good choice.

However, if you're more comfortable with Python, read Mercurial's source. Many of the WTFs/min are going to come from your familiarity with the language and style that the DVCS is written in. Git is written in C, Perl, and Bourne shell, Mercurial is Python (with a bit of C IIRC), and Bzr is written in Python, Pyrex, and C.

You'll also want to take into account what your tool of choice is. If you use Git, you'll understand what each file is implementing. Likewise with Mercurial or Bzr.

Basically, when choosing what tool or language to use (or study), a good axiom is this: go with what you know. You're trying to learn how to implement a DVCS, not how to use a particular system or language :)

like image 94
Rafe Kettler Avatar answered Nov 04 '22 19:11

Rafe Kettler


What can be much better than Python in the context of understandable and beautiful code?

Go for Mercurial. I have done it and It's absolutely lovely :)

like image 38
tamizhgeek Avatar answered Nov 04 '22 21:11

tamizhgeek