[cairo] Plans (and motivation) for moving cairo from CVS to git

Michael Sweet mike at easysw.com
Tue Feb 7 12:59:01 PST 2006

As a fairly recently converted Subversion user (from CVS), I just
thought I'd throw in some comments, in case you haven't considered
Subversion and the various add-ons that are available...

Carl Worth wrote:
> ...
> CVS cannot do "disconnected operation"
> --------------------------------------
> CVS has an inseparable notion of a central server that it always wants
> to connect to. I work around this bug by regularly making an rsync
> copy of the central CVS repository, then using the local copy for
> things like "cvs update" and "cvs diff", and switching to the central
> repository for "cvs commit". That's pretty awkward, but I've got my
> hacked up scripts to simplify it.

Subversion can do off-line adds, deletes, renames, and diffs
all on its own...

> What I'm still missing with CVS is the ability to do offline
> commits. This means that if I code for several hours on a plane, say,
> I end up with one big patch instead of the sequence of commits that I
> would prefer to have.

There is a well-supported add-on to Subversion called "svk" which
allows you to maintain local copies of a repository (even read
access is OK) and locally commit your changes for later commits to
the master repo or generation of patches against the current code
in the master repo.

Essentially, svk makes Subversion look like a distributed system
while maintaining some of the advantages of a centralized system.

 > ...
> CVS requires central granting of commit access
> ----------------------------------------------
> With CVS, new coders don't get access to source control management
> tools until they are granted commit access to a central
> repository. Before this, even things like "cvs diff" don't work
> correctly. This impedes collaboration, and as in the "disconnected"
> case above, leads to bigger patches that are harder to
> review/integrate later.
> I haven't had a workaround for this, and delays in the granting of
> commit access have caused a fair amount of pain to new programmers.
> Either git or mercurial would solve this problem quite well. New
> coders can easily clone any repository and start working/committing
> immediately. Full access to the tools is readily available without any
> central grant of permission.

Subversion makes it easy to provide read-only access to the master
repo, and of course you can use svk on top of Subversion to maintain
your own local mirror of the master repo.  Thus far we've found it
to be much easier for contributors to provide us with diffs against
the current Subversion code vs. the old CVS repository that wasn't
generally accessible through firewalls or proxies (Subversion
supports HTTP as one of the standard remote access methods...)

> CVS branches are "hard"
> -----------------------
> Within cairo's history it's quite evident that CVS branches are
> entirely inadequate. We've been through several periods of temporary
> destabilization or side-development, (API shakeup, new font support,
> new font support again, etc.), yet we've never used CVS branches for
> any of that. The only branch we have is the branch for 1.0 maintenance
> releases, (and even then, CVS "support" for branching is so limited
> that we do painful, simultaneous commits to both branches rather than
> ever using any assisted merging). What a pain!
 > ...

This is one place where Subversion shines - branching and merging are
so much easier and faster than with CVS.  If you also use svk, then
you can manage both local and remote branches transparently, and even
push local branches to the master repo for others to play with.

> This final CVS defect is one in which I think git does a much better
> job than mercurial at providing what I want. Either one would be much
> better than the current limitations of CVS. But with git, users would
> be able to pull down "Carl's current cairo" and examine all of the
> stuff I currently have in flight within git itself, (with things like
> graphical repository browsers gitk or gitview, "git branch" to list
> the available branches, or with query tools like "git grep" that can
> quickly(!) search through all branches in the repository).

This is another freebee with Subversion - branches are just
another directory in the repository, and there are some
pretty amazing tools for visualizing how all of the branches

> ...
> Finally, there are questions regarding the user-interface and how
> easy-to-learn each tool is. Mercurial is definitely easy to learn, but
> as I mentioned above, I've found things I'd like to do with mercurial
> that I can't do. And at that point, I'm stuck.
 > ...

The Subversion command-line interface is intentionally similar to CVS,
and there are several good GUI add-ons, both standalone and for use
with IDEs and the Windows Explorer.

Michael Sweet, Easy Software Products           mike at easysw dot com
Internet Printing and Document Software          http://www.easysw.com

More information about the cairo mailing list