[geeklog-devel] Upgrade CVS to a distributed repository

Nick Andrew nick at nick-andrew.net
Mon Apr 14 22:23:59 EDT 2008


I'd like to propose that geeklog moves from the current CVS
system into a modern, distributed repository like
Mercurial: http://www.selenic.com/mercurial/wiki/
or Git: http://git.or.cz/

This suggestion comes from a thread on Groklaw where Ted Powell
suggests making an improvement to Groklaw's website and would
happily "send code" but he cannot because Groklaw's installation
of geeklog is possibly heavily modified; he has no way to know
if his change against geeklog's published source code is likely
to work against Groklaw.

Thread: http://www.groklaw.net/comment.php?mode=display&sid=20080412215022427&title=PLEASE%20use%20Preview&type=article&order=&hideanonymous=0&pid=689006#c689030

There are probably a large number of people who would contribute
to the Groklaw site because they support Groklaw, but who
cannot because the source code is not published.

This problem has been completely solved in the last few years.
The solution is to use a distributed SCM which allows cross-merging
of changes. There are several capable systems existing, including
arch, bzr, darcs, git, mercurial, monotone, and so on. I'd like to
propose specifically either Git or Mercurial because I believe
these are the two most popular, functional and stable systems.

Wikipedia has a huge comparison table:

  http://en.wikipedia.org/wiki/Comparison_of_revision_control_software

Git is the repository originally written for the Linux kernel; I see
it as a bit more "technical" whereas Mercurial is a bit more user
friendly. Both systems are fast and scale well with large numbers of
managed files and large numbers of developers. There are web
interfaces and development support tools; it's possible to convert
a repository between various formats (although I doubt either of
these systems are going to go away any time soon) and even
interchange commits between them.

I'll show how this process can work for geeklog. I'll use Mercurial
as my example because I find it a bit more user friendly than git.

First, geeklog would convert the existing CVS repository to Mercurial
(also known as Hg for short). Publish the master Hg repository online,
such as:  http://linuxtv.org/hg/v4l-dvb

A developer or user would obtain a local copy of the repository
by cloning it:

    hg clone http://linuxtv.org/hg/v4l-dvb

The developer can work on their local copy, committing as they go
(commit is a purely local operation) and when they want to submit
code back to the project they can email a patch to the master
developer, or if they are a master developer themselves they can
push changes (using "hg push") to the master repository. Alternately
any developer can pull ("hg pull") changes from any other
repository.

These changes don't interfere with local changes because Hg automatically
makes new branches based on the latest common revision. Branches are
closed by merging two parent revisions together (Hg implements a
three-way merge operation). This is the usual way that inputs from
multiple developers are combined into a master repository.

Meanwhile Groklaw will clone the master repository, make local changes
(and commit them locally) and sometimes pull from the master repository
to upgrade (e.g. to the next point-release tag). Groklaw would also
publish its repository.

Some Groklaw users would clone Groklaw's repository and make commits
to add functionality to Groklaw. These commits can be sent (emailed or
pushed) to Groklaw, and from there on to Geeklog to improve the master
code base, or they can be sent directly to Geeklog.

I believe that moving to a modern distributed SCM can increase the rate
of development by enabling more developers to contribute and keeping
the online repositories active with new changes.

Just as an experiment, I have converted the geeklog 2.x CVS tree to
git and published it:

	http://github.com/nickandrew/geeklog-2-x-sample/commits/master

As I'm not familiar with the geeklog codebase I can't check the
integrity of the conversion, except that I did a 'diff' between the
latest checked-out CVS and the resulting git repository and the files
were all the same, with one minor difference. Git and Mercurial do not
manage empty directories, and geeklog has a handful of them.

In short I think that it will be a benefit to geeklog to convert; the
effort will be repaid quickly with increased productivity and involvement.

Nick.
-- 
PGP Key ID = 0x418487E7                      http://www.nick-andrew.net/
PGP Key fingerprint = B3ED 6894 8E49 1770 C24A  67E3 6266 6EB9 4184 87E7



More information about the geeklog-devel mailing list