Based on the CVS Nautilus Scripts written by Gavin Brown I wrote a set of scripts for subversion. You can right click on a subversion managed file or folder (you can also multiple select) and then select a command from the Subversion submenu. All scripts will give feedback using a zenity message box.
The most important commands are right in the Subversion menu. Not so often used commands are in the Subversion/More... submenu and property related commands are in Subversion/Properties....


Download: nautilus-svn-scripts-0.9.tar.gz nautilus-svn-scripts-0.9.2.tar.gz
All commands are implemented as bash shell scripts, which is good enough for basic commands. For anything fancier than this I would probably use Python. The current commands cover all the functionality I need at the moment. The only thing I would add right now is a diff command, but my knowledge of bash is too limited to be able to write a diff wrapper for subversion.
Update 2005-10-01: version 0.9.2 is out:
- packaging script to eliminate backup files (pointed out by Trond Andersen)
- using mktemp to create temporary log files (suggested by Miek Gieben)
- added 3 new commands: Checkout, Diff and Rename (created by Alexandre Rocha Lima e Marcondes)
Update 2006-07-07: The script is now available in the Ubuntu Dapper universe repository:
http://packages.ubuntu.com/dapper/devel/nautilus-script-collection-svn
Technorati Tags: 



http://www.mailtoaman.com/2008/02/29/nautilus-svn-context-menu-almostlik...
http://brainstorm.ubuntu.com/idea/169/
I added export too. I am not very familiar with bash script, so didnt add error conditions but it should be easy for you to add it in.
#!/bin/sh
#
# Distributed under the terms of GNU GPL version 2
#
# http://marius.scurtescu.com/?p=102
# http://gnomefiles.org/app.php?soft_id=1059
LOGFILE=`mktemp -t svn_export.XXXXXX`
zenity --entry --title="Export" --text="Please enter the svn path to export" > EXPORT_DIR
svn export `cat EXPORT_DIR` > $LOGFILE
zenity --text-info --title="Subversion: Export" --filename=$LOGFILE --width=600 --height=400 --window-icon="`dirname $0`/svn.xpm"
rm -f $LOGFILE
rm -f EXPORT_DIR
Nice Scripts.
I changed the Commit. You can now choose which File you want to commit
Hi!
I use svn over ssh ("svn+ssh"-URL) and it is annoying to repeatedly have to give the ssh-password so I added this script which adds ssh-agent to the menu:
Arne
Nice work!
I prefer a real time update version which is obtained by removing the temporary files entirely and piping the svn command into zenity. Here is the Update script sample:
This single line lets you see the update progress in real time into the zenity window, including errors. This can be done for all the Subversion scripts.
For the password problem in the Checkout script i suggest checking if an exit code of "svn co" is reserved for failed authentication and, if so, ask the user for an username and pasword if the above code is returned before retrying the command a second time.
Great update!
One small problem I see with this real time log window is that unless you are very familiar with the output from svn then you are not sure when svn has completed. You then risk closing the window too soon.
Is it possible to pipe a text to the log window when the svn command has completed?
One way could be to open a smal "finish" window after the svn command has completed.
Other suggestions?
Arne
It looks like the commit script doesnt work?
It doesn't ask for username and password so I don't see how it can.
The username and password normally are cached by subversion when you first checkout the project and after that you are not prompted for them anymore.
You can prevent this caching, but then I am not sure how the whole flow would work, you may need a richer user interface to cover that case.
Any suggestions?
I see what my problem is:
The checkout script doesn't ask for a password - since anyone is allowed to read my repository this works. It seems that subversion itself is at fault as it just silently does nothing if you try and check-in without it having a username and password cached.
I would say the checkout script needs the ability to specify a username and password, for which probably something more advanced than bash/zenity would be needed. All of this would be very easy in python/gtk.
Good point. The Checkout script works only for anonymous checkouts, you need to drop to command line if you need to specify a username and password.
At a minimum the Checkout script should say this in the dialog where it prompts you for the URL.
As an improvement it could ask for the username right after asking for the URL, and for the password right after that (unless the username is empty).
I agree the ideal implementation would use GTK and tighter integration with Nautilus, but that is beyond the scope of these scripts.
Added to list of issues:
http://code.google.com/p/mariuss-nautilus-scripts/issues/detail?id=6
Thanks,
Marius
About the password issue: One could just replace the svn update plus zenity call with xterm -e "svn update". Doesn't look nice but works nicely
Thanks for this, Marius, I found these scripts incredibly useful.
I also added the "Lock" and "Unlock" commands (I'm working on graphical files and office documents a lot at the moment). I also tracked down a problem with stderr not being redirected. If you want to integrate my changes, you can pick them up from from my blog.
Cheers,
Joe
I'm glad you find the scripts useful. I created a bug report with your patch:
http://code.google.com/p/mariuss-nautilus-scripts/issues/detail?id=5
Thanks,
Marius
Very nice tool. Maybe you should just add a hint to the Ubuntu version that each user has to execute the "nautilus-script-manager enable Subversion" command to activate the script.
TYVM for the hint on Nautilus Manager.
I just need basic SVN to go along with Aptana and this helps out a lot. I don't mind manually doing things outside Aptana/Eclipse since it isn't fully functional for PHP yet and trying to install Subclipse without a clue is ridiculous.
Hi, I'm using your great scripts on ubuntu Edgy Eft and Nimbus Theme.
On Nautilus, when I try Properties on a file, in the tab Emblems i can select CVS status emblem.
Is in your mind aply emblems to the files afected by your scripts?
Thanks for made Linux more friendly :-)
Yes, I was thinking of that. It can be done, but not using Nautilus Scripts, you need a much tighter integration with Nautilus.
I have also added a script which I find useful. I have a post about it here. It lets you add recursively all new files below a certain directory.
You can include it in your release if you want.
/Fredrik Espinoza
If you select a directory and then apply Add to it then it should do a recursive add be default. This is how subversion works. Did you try the existing Add command and it did not behave like that?
Marius
I've been using these scripts for some time. I actually needed some locking commands for Subversion (pretty much a requirement for my company to use Subversion), so I've created a couple of new commands: lock and unlock.
I've made a post on my blog about releasing these, but feel free to add them to your package.
Direct link to archive file: nautilus-svn-scripts-locking-0.1.tar.gz
-Nicholas Istre
of tortoise, currently I'm living with rapidSVN, while writting this post I found about some set of svn scripts for the gnome thru something call G-Script. PermalinkLeave a CommentName E-mail URI
links for 2006-05-01
Filed Under: Selectives
mariuss' weblog » Nautilus Scripts for Subversion
A set of nautilus scripts to use Subversion
.I probably haven't searched enough, but I can't find a TortoiseSVN like tool for Gnome. There are Nautilus scripts, but they definitely can't stand the comparison with TortoiseSVN.No Suspend nor
newest web technologies available to allow webmasters to offer dynamic content for free to their mariuss weblog Blog Archive Nautilus Scripts forYour scripts were very hekpful but they didn t work
titles provided in rss scripts utf-8 encoding error for titles provided in rss scripts Status: new mariuss weblog Blog Archive Nautilus Scripts forYour scripts were very hekpful but they didn t work
be automatically notified any time new scripts are added to the Community-Submitted Scripts Center.mariuss weblog Blog Archive Nautilus Scripts forYour scripts were very hekpful but they didn t work
hmm... there was a small bug in the script ... here comes the corrected version
find . -type f -perm -100 -exec sh -c "sed 's/\"\$@\"/\$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS/g' '{}' > /tmp/tmp123; chmod 750 /tmp/tmp123; mv /tmp/tmp123 {}" \;
I forgot overwrite the "s surrounding $@
Your scripts were very hekpful but they didn't work when you switch the view to listmode, expand the directory hierarchy in the same window and try to apply them on one of the subitems. The reason was that the $@ argument does only contain the selected filename without any path prefix. So I exchanged the $@ in every script with $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS.
IMPORTANT: Don't surround it with ", they are already contained in the variable.
'cd' into the script directory and execute
find . -type f -perm -100 -exec sh -c "sed 's/\$@/\$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS/g' '{}' > /tmp/tmp123; chmod 750 /tmp/tmp123; mv /tmp/tmp123 {}" \;
all in one line to accomplish this.
[...] The script and related info can be found at this site, Nautilus Scripts for Subversion. [...]
Thanks for sharing those. I use the CLI of SVN, but sometimes when i am already viewing stuff from nautilus, i don't like to switch back to the console.
Any plans for the next release?
I see that the tar.gz includes the temporary backup files. I you use a script to package these scripts, please ensure that the backup/temp files doesn't get included.
Well, these are really simple scripts, nothing like TortoiseSVN.
Nice stuff man. I am much used to command line, however now, I can point those guys that always bitch about not having a TortoiseSVN-like tool in nautilus to your tools ;)
Thanks for the good work.
Chap.
Subversion for Nautilus
Some days after the Bazaar extension for Nautilus we see a Subversion Extension for Nautilus . It is not a full-blown extension, but only a set of Nautilus scripts, but it works.
Great iniciative, congratulations, I will use and try to help...