This is as days pass by, by Stuart Langridge

And this is Extremely noddy TortoiseSVN for the Gnome desktop, written , and concerning Software, Howtos, and Linux

I use the Nautilus Subversion scripts to manage my Subversion working copies all the time. The big thing that they're missing is TortoiseSVN's pretty icons that get displayed on each file so you can tell at a glance whether a file has been changed or not. Well, that sort of thing is also possible, because you can write Nautilus extensions in Python. Grab my svnemblem script and drop it in .nautilus/python-extensions in your home directory. You'll need to restart Nautilus to make this work (which basically means logging back out and in again) and you'll need the Python Subversion bindings (package python-subversion in Ubuntu: not pysvn, which is package python-svn) and the Python Nautilus bindings (Ubuntu: python-nautilus). You can test it's working by running TMPDIR=<some temporary directory, not /tmp> nautilus --no-desktop <path to an SVN working copy dir>. (thanks to Xalior for help with testing) Update: there is something of a problem, in that the emblems don't update if you change anything. This seems to be because once Nautilus has been into a folder once, it doesn't call the extension when you go in there a second or subsequent times, even if you hit Reload. I don't know whether this is fixable or not at the moment; I'll try and look into it. Any suggestions gratefully accepted!

Comments

D

Before installing "your stuff"

On dapper:

sudo apt-get install nautilus-script-collection-svn nautilus-script-manager python2.4-subversion python-subversion

nautilus-script-manager enable Subversion

Now you're as close to TortoiseSVN as it's possible to be on Linux; AFAIK.

The extra apt-get install bits enable right-click context svn based menus and work around a bug in dappers packaging that causes circular dependancies....

Hope this helps someone....

-Dx

Volker

Is there a special version of any related program needed for this script to work?

I really would like to use my Ubuntu as I did Windows, but the Subclipse extension has failed on me and rapidSVN is ugly as it's bunny logo.

I installed everything, maybe not in the same order as posted on this site, but it's all installed. The Subversion scripts seem to work, but no icons. :(

Volker

sil

Volker: I have the icons on my machine, but I'm not totally sure where they came from, so this would be a very useful test: can you please choose any file you like in Nautilus, right-click and say Properties, and then look in the Emblems tab for icons called things like cvs-updated, cvs-new-file, that sort of thing? Those are the icons that it uses. If you don't have them, we'll work out where they come from and list that as a dependency of the package!

Volker

All icons seem to be installed. There are:

- cvs-Konflikt (conflict)

- cvs-kontrolliert (controlled)

- cvs-verändert (changed)

- cvs-sticky-Tag (sticky-tag)

- cvs-hinzugefügt (added)

- cvs-entfernt (deleted)

- cvs-neue-Datei (new file)

As you can see, I'm using a German system. Maybe that has to do something with it?

Strange part was, that even after the commands offered by "D" (first comment) it didn't create a directory .nautilus/python-extensions. I created it myself and dropped your script in there, still...

I really appreciate your help on this case.

Volker

sil

Volker: ahaha! It opens the icons by name, so that'll be the problem. Hm. How do I work around that, I wonder?

I shall look into it!

sil

Volker: as a workaround, you may want to edit svnemblem.py and change the EMBLEMS bit at the top: where it says, for example

svn.wc.svn_wc_status_conflicted: 'cvs-conflict',

you'd change that to

svn.wc.svn_wc_status_conflicted: 'cvs-Konflikt',

and restart Nautilus. If that works, then I'll look at how to best add internationalised names to this script.

Volker

I hate to tell you, but I already tried to rename the icons in your script. No effect.

Then I wondered, where the files are in my filesystem and it turned out, they were named differently, too. The syntax-scheme was like "emblem-cvs-conflict" and so on. I changed your script to that but no effect either.

Now I'm wondering wether I restarted my Nautilus correct:

I usually type

nautilus -q

This really turns into some localization issue... :)

Volker

sil

Damn, I was hoping that just renaming them would work :)

the "restarting Nautilus" thing; have you tried the --no-desktop approach from above?

I really, really hope I don't have to take my 2k script and ship ninety different localisations with it ;)

Volker

What exactly does the "-no-desktop" do? I'm not that much into the bash, so I don't know what this TMPDIR command is doing. Nevertheless, here's the output (Nautilus opened, but still no icons):

volker@workbox:~$ TMPDIR=/home/volker/temp/ nautilus --no-desktop /media/Entwicklung/campingplatz_div/

(nautilus:19059): Nautilus-Python-WARNING **: g_module_open libpython failed: libpython2.4.so: cannot open shared object file: No such file or directory

ImportError: /usr/lib/python2.4/site-packages/gtk-2.0/gobject.so: undefined symbol: _Py_TrueStruct

(nautilus:19059): Nautilus-Python-WARNING **: could not import gobject

It doesn't have to do anything with the folder under subversion control being a smbfs-mounted share of a local fileserver, does it?

Volker

sil

If you just do "nautilus", then it won't start up a new nautilus; it'll just pop up a new window which is part of th eexisting nautilus (the one running your desktop). --no-desktop means that the Nautilus window that pops up is a genuinely new process. You need to explicitly define TMPDIR because otherwise your new nautilus will use the same temporary directory as the existing nautilus, and they'll argue over it.

It looks rather like there's a problem with you running nautilus extensions at all, rather than just with my extension. Which distribution are you using? Can you try another Nautilus Python extension and see if that works?

Volker

I can't get any information in German help forums about "python extensions", seems like nobody ever uses that. Also it's like there is no one in need of a Tortoise-like interface to Subversion, guess they all use rapidSVN or some other client. Bummer.

Anywho, I tried to get another python extension, but I can't find any. The only one I did find was a smbmount script, but guess what? It doesn't want to work. Maybe that is because of me not using it correctly (like I said, there was no folder "python-extensions" after the installation of python-subversion and so on). I'm using Dapper 6.06.01 with all updates.

And for the TMPDIR story: Wouldn't that be solved by a reboot? I mean if it doesn't work right away at least a reboot should do the trick, right?

sil

The TMPDIR problem will be solved by a reboot, because then your main "system" Nautilus will be using the extension (rather than you running a separate Nautilus that has the extension and your main system one not having it). However, that means rebooting to test stuff, which is really annoying.

http://www.gnome.org/~gjc/digest-property-page.py is a simple Nautilus extension; give that a try?

Volker

I managed to get rid of the python-related error messages when starting nautilus with the TMPDIR directive by adding a symbolic link (sudo ln -s /usr/lib/libpython2.4.so.1 /usr/lib/libpython2.4.so), but with the German Umlaute (ä, ü) in the emblem-titles the script failed again. I tried the thing with "emblem-cvs-controlled" (the filenames of the icons in /usr/share/icons/gnome/48x48/emblems/) but no luck with that either. But I think it was a step in the right direction.

Volker

I just managed to get the digest-property-page.py script to run. I first didn't noticed, but it added another tab to the "property" dialogue of a file. He who can read is clearly in advance. ;)

Still no icons, but getting closer, I guess.

Volker

Sweet dancing Jehova! I DID IT!!!

There was no use to rename the icons in your script after all!

Seems like there was only one missing symbolic link.

Thanks for your patience and all your help. Gotta go back to work now! ;)

sil

volker: what was the missing link? It could do with being listed here so other people can make it work :)

Volker

I already posted that (September 28th, 8:40am):

sudo ln -s /usr/lib/libpython2.4.so.1 /usr/lib/libpython2.4.so

I found out by looking a bit harder at the error message, part of it read:

Nautilus-Python-WARNING **: g_module_open libpython failed: libpython2.4.so: cannot open shared object file: No such file or directory

Like I said: "He, who can read..." :)

I think I'm going to edit the icons, though. I find it kind of hard to make out differences or recognize, which icon is for which status.

Volker

Jason Field

Hi Aq,

I finally got round to polishing up my code for a more complete Nautilus SVN integration ,and have packaged it up on my site (http://jasonfield.com/freebies/).

It adds a load a of menu items to do common useful things like check in/out, diff, log etc., and also now updates the menu items correctly as their state changes over time. I'd have never got round to it if I hadn't seen this post, so thanks for the original script! :)

Cheers,

Jason

A TortoiseSVN replacement for Ubuntu « SOS

[...] See http://www.kryogenix.org/days/2006/09/12/extremely-noddy-tortoisesvn-for-the-gnome-desktop for details on this. Share this post:digg it|kick it|Email it|bookmark it|reddit|liveIt [...]

Moving to Freedom: NautilusSvn and New Emblems

[...] I originally found Jason’s page via Stuart Langridge’s: Extremely noddy TortoiseSVN for the Gnome desktop [...]

NautilusSVN: Linux TortoiseSVN Equivalent « PHP::Impact ( [str Blog] )

[...] 4, 2009 Inspired by a post written by Stuart Langridge’s a couple of years ago, Jason Field and Bruce van der Kooij created a set of Python scripts which [...]

Michael Cole

http://wiki.rabbitvcs.org/wiki/download

sudo apt-get install rabbitvcs

(for karmic Ubuntu 9.10)

RabbitVCS for the FTW!

This website belongs to Stuart Langridge. Contact details are available. Don't eat yellow snow. Valid HTML5, at least in theory, except for the bits that aren't because I'm that futuristic that I'm ahead of the spec, oh yes. HTML5 help from Bruce Lawson, among others. Fonts from the superb FontSquirrel. End.