LOC of different version control systems

Gerard Korsten soonkia77 at gmail.com
Fri Nov 28 23:28:10 UTC 2008


mpm is very tight on what code goes into Mercurial with the main idea of
keeping the quality of code very high. There also tends to be a lot of
re-looking of old code in Hg, with optimization, stability  and backward
compatibility being the order of the day and adding features being
secondary.

Also, I believe Matt spent a lot of time in the begining with getting the
design right, which in the long term means that adding features becomes
easier with less work-arounds are needed.

I did a comparison between the current code base of bzr and hg. This is only
counting the python files.

Bzr (Total): 225896
Bzr (excluding tests): 119856
Bzr (excluding tests and comments): 36830 lines of code that actually do
something

Hg (Total): 45014
Hg (excluding tests): 41891
Hg (excluding tests and comments): 21817

--------
Bzr does all of it's testing code in Python. Hg takes a different approach
and does it's tests using shell scripts. Hg's actual testing scripts are
then about 48000 lines, so the total lines should be closer to 96000.

Bzr's code has more comments: Almost 3 lines of comments for every 1 line of
code. Mercurial is a bit more stingy on that side with only a 2 to 1 ratio.

So, in reality, bzr only has about 15000 more lines of code.

Does it say or mean anything ? Not really. Bzr code could be a bit more
crufty because of all the repo changes they've undergone, but then again
maybe not. Hg's code could do with a bit more comments in some areas (but
that's debatable)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20081129/4d811d12/attachment-0001.html>


More information about the Mercurial mailing list