Famous last words about the perfect set of SCM commands

Well, you won’t hear them from me:-) But here is some background on my choice of commands in IsiSetup.

The CVS legacy

I’ve used quite a few SCM implementations. When CVS was the only viable tool, we were able to hate it’s interface, but weren’t able to dismiss it… Things have changed to the better. There’s healthy competition, nowadays.

Subversion sees itself as a successor to CVS. It tries to build on the experience developers and admins build with CVS. The command line mimmicks CVS’. As a dedication to CVS’ legacy, IsiSetup provides the following CVS style command aliases: add, remove, import, commit, update, diff, history, log.

I admit liking Darcs

Darcs was the first distributed, changeset based SCM I got to now. It was also the tools of choice in early IsiSetup versions. But some restrictions (mainly performance, missing link and permission tracking support and the fact that some commands couldn’t be run non-interactive) made the switch to Git/Cogito necessary.

But I’m still using Darcs to manage the source code of IsiSetup. Now, what exactly do I like about Darcs command line interface?

  • It makes me feel good
  • The command set feels coherent
  • For most actions, there exists an ‘undo’ version
  • It is interactive where it makes sense

And here’s the list of commands supported by IsiSetup: initialize, add, remove, mv, whatsnew, record, rollback, changes, pull, and get.

Use a porcelain

Git is promoted as providing only a low-level SCM command line interface. While Git comes with a few commands which let you manage your sources/configs, Git isn’t designed to give a userfriendly experience. In Git-speak, this is left to a porcelain. One such wrapper is Cogito. You may have already guessed so: IsiSetup another one.

IsiSetup is designed with configuration files in mind. This is what it seperates from other revision control tools. But this post is about the classic, low-level SCM operations. These are provided by the isisetup-module script.

Interactivity

The feature I miss most when working with one of Darcs’ competitors is the interactivity of recording commits, moving around patches and dropping changesets. I’ll try to provide some interactivity with IsiSetup, too. I’ve implemented it today for isisetup-module rollback:

shuerlimann@lappi:/etc$ sudo isisetup-module rollback
Author: root 
Date:   Sun Jun 11 16:50:29 2006 +0200

    Mark package 'exim4-base' to install

Do you want to rollback this change? [y/N]n

Author: root 
Date:   Sun Jun 11 16:50:29 2006 +0200

    Imported package configuration version 4.60-3ubuntu3 for 'exim4-base'

Do you want to rollback this change? [y/N]y
First trying simple merge strategy to revert.
Simple revert fails; trying Automatic revert.
Removing cron.daily/exim4-base
Removing init.d/exim4
Removing logrotate.d/exim4-base
Finished one revert.
shuerlimann@lappi:/etc$ isisetup-module history
Author: root 
Date:   Sun Jun 11 17:53:46 2006 +0200

    Revert "Imported package configuration version 4.60-3ubuntu3 for 'exim4-base'"

    This reverts 0be946f6be2f5b79574a6dafe1eb9ef2abd7b6d0 commit.

    000000 D    cron.daily/exim4-base
    000000 D    init.d/exim4
    000000 D    logrotate.d/exim4-base
Advertisements

One thought on “Famous last words about the perfect set of SCM commands

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s