Jul 09 2008

Gnome screensaver and Clearcase revert

Published by Dougal at 5:00 pm under Computing

Little snippets of information that I’ve been meaning to write up…

Screensaver images in Ubuntu

The XScreensaver configuration application was always a bit ugly and not sensibly laid out — but one thing it definitely did was provide easy access to all the options you’d need to fiddle with.

Now that GNOME supply their own GUI for screensavers they have decided that simple configuration of your screensaver is not allowed.

If you’re using some of the XScreensaver hacks you can put this in a file called .xscreensaver in your home directory.

imageDirectory: /path/to/screensaver/images/

Otherwise you have to make a “theme” (ugh), most easily by copying one that already exists. For example, to make your own slideshow:

$ cp /usr/share/applications/screensavers/cosmos-slideshow.desktop ~/.local/share/applications/screensavers/my-slideshow.desktop
$ $EDITOR ~/.local/share/applications/screensavers/my-slideshow.desktop

and change the --location= to point to your preferred image directory. It’s all quite pitifully backward compared to how it used to be.

Clearcase revert command

This has driven me nuts for ages, and it’s only recently dawned on me what a doofus I have been.

Clearcase is a centralised version control system which requires you to “check out” a file before you can edit it. If you edit the file you’ve checked out, it seemed there was no way of reverting it to the unchecked state. There is no cleartool revert command.

Of course, the unique thing about Clearcase is that all work is done in a DB-backed “view” which provides full access to the version history using special path syntax. If you append @@version to a filename then the filesystem will delve into the versioned history and pull out the right one. So you can use standard diff tools to compare different versions like so:

$ diff foo.c@@/mainline/branch/twig/3 foo.c@@/experimental/LATEST

Quite clever (though notoriously flaky and unwieldy to use). And you have to learn to think differently. If you create a task branch off /main/branch that’s called /main/branch/task_branch and so on down the version tree. Each individual revision in a branch is numbered (where LATEST is a synonym for the highest number).

So, after all that explanation, one can revert a file by just copying!

$ cp foo.c@@/mainline/branch/task_branch/0 .

If you want to automate this a bit, it’s easy to find the version of a particular component by running:

$ cleartool describe -predecessor foo.c

You can pull out the right value from that easily enough and make your own cleartool revert!

6 responses so far

6 Responses to “Gnome screensaver and Clearcase revert”

  1. Lizzieon 09 Jul 2008 at 9:44 pm

    there are no responses yet because only 0.0037 % of the population have a clue what you are on about :-)

  2. Dougalon 09 Jul 2008 at 10:20 pm

    Maybe they’ll have a slightly better understanding about cocktails then!

  3. Bookmarks about Guion 24 Sep 2008 at 7:07 am

    […] - bookmarked by 5 members originally found by mdemaz on 2008-08-30 Gnome screensaver and Clearcase revert http://www.dougalstanton.net/blog/index.php/2008/07/09/gnome-screensaver-and-clearcase-revert - […]

  4. ianon 14 Jan 2009 at 7:40 pm

    this was a useful post, thanks! you’re helping someone out there!

  5. toddon 16 Nov 2009 at 6:16 am

    What about unco? ct unco -rm file

  6. Dougalon 16 Nov 2009 at 8:37 am

    Hi Todd, unco also un-checks-out the code! Hence the need for revert! :-)