Report inadequate content

Nautilus subversion integration tool. Execute SVN commands with Gnome scripts

{
}

I have been using subversion (svn) for years from the command line... But some months ago I changed my job and I started using windows environments. And I must admit TortoiseSVN is the best GUI SVN client i've seen ever before. While my needs are satisfied in Windows with TortoiseSVN and in Mac OS X with SCPlugin and SvnX, I was lacking a subversion tool to manage my files while exploring files in my Ubuntu (nautilus file explorer). That's why i decided to create my own set of scripts to integrate them on Nautilus contextual menu for a quick access without opening SVN programs or shell. I took the icons from the SVN Workbench since that is the client that I mostly use in Ubuntu and my eye finds the actions faster.

I created these scripts  in 2007. You'd rather  read this article about TortoiseSVN for Linux before setting any of the following scripts if you want a poslished package without manual tuning.

 

This is how it looks like

96355-83174.jpg

96355-124410.jpg

96355-124414.jpg

96355-83173.jpg

The following actions are supported by now:

  • svn status
  • svn update
  • svn add
  • svn commit

It takes no more than 5 minutes to implement, for example, the svn checkout. I leave it to you. I post this quickly because there is people around willing to test it. This is not tested anywhere other than in my own machine, but these are easy scripts, I don't think you cope any problems with them.

Installation

Requeriments, not much, really:

  • nautilus-actions sudo apt-get install nautilus-actions
  • Zenity (already shipped with your Ubuntu)
  • Subversion of course, sudo apt-get install subversion

Steps:

  • Uncompress the TarGz in your home folder
  • Execute nautilus-actions-config (or go to System -> Preferences -> Nautilus Actions Configuration )
    96355-124413.jpg
  • Import every file inside the schemas directory. I deleted the Schemas, since users were having trouble.
  • Press "Add" in the Nautilus Actions, and fill the information as follows:
    Label: Commit (Name you'll see in the menu)
    Icon: ~/nautilus-actions/blah/blah/commit.png (Select the ICON you want to show in the menu)
    Path: ~/nautilus-actions/blah/blah/commit.sh (Path to the commits.sh script)
    Parameters: %M
    96355-124411.jpg
  • Go to Conditions tab and select Both in the "Appears if selection contains" section.
    96355-124412.jpg
  • Press OK and repeat for the rest of scripts.
  • Logout your gnome session and log in again.

Download nautilus subversion integration tool (free)

UPDATE, 02 March 2009: Scripts and instructions modified for Ubuntu 8.10 Intrepid Ibex

Get the files in Github

Possible problems and solutions

  • The script doesn't launch: Check the scripts are executable (chmod 755), and launch them from the terminal to see errors.
{
}
{
}

Comments Nautilus subversion integration tool. Execute SVN commands with Gnome scripts

no puc esperar per provar-lo!
el bigoti de TomSelleck el bigoti de TomSelleck 25/10/2007 at 11:11
Té bona pinta. També ho provaré :)
Come on boy, what about we poor Thunar users? Will you leave us in the cold?

Now seriously, keep up with the good work _netle_!
For Thunar users (I won't leave you in the cold) ;)

You can use the scripts in the tar.gz since they are bash scripts. In order to add them to te contextual menu add them in the Thunar menu file:

mousepad ~/.config/Thunar/uca.xml

An example of what you have to paste would be:

<action>
<icon>~/path/to/icon</icon>
   <name>Commit</name>
   <command>bash ~/.nautilus-svn/scripts/commit.sh %f</command>
 <description>Commit</description>
   <patterns>*</patterns>
<directories /></action>
ets un geni, company xD
instal·lant-se ^^
edu edu 26/10/2007 at 17:15
Hohoho, big thanks Albert! I will test it out tomorrow, and see if it works with Thunar and CVS.
Just el que estava buscant, vaig a provar-ho. :)
Seems as there is some problem on Ubuntu Hardy.
There is no nautilus-config-actions, however nautilus-actions-config exists.
Sadly it will not import the schemas file.
Hiran Hiran 25/11/2008 at 15:36
[...]="http://tortoisesvn.tigris.org/">TortoiseSVN, el que usa Windows, pero sigue siendo utilísimo. Para más información seguid a este link: http://www.harecoded.com/nautilus-subversion-integration-tool-execute-svn-commands-with-gnome-scripts-96355. Desde aquí agradezo al autor, alombarte, este trabajo. Categoría: General,[...]
Hi Hiran,
I corrected the reference. Thanks.
Thanks for the sweet tip!
Using Ubuntu as a work environment now that I have some decent SVN shell integration!
Josiah Josiah 20/03/2009 at 01:46
Hi
Did maguilar get this working with Thunar? I prefer thunar even though I'm in Ubuntu. In fact I prefer the entire XFCE4 Panel.
Thanks much,
Hey Simon,
the scritps work in any environment. Maybe Thunar has changed along time, but that should work for you.
Hey, I made a small modification to each .sh, so it now displays what happens as it happens, as opposed to when it finishes. It works now more like TortoiseSVN :)
add.sh:
#!/bin/bash
# Albert Lombarte <alombarte AT harecoded DOT com>

RESPONSE=`date "+%Y-%b-%d_add".txt`

if [ $? -eq 0 ] ; then

    (
    svn add "$@"
    echo "end."
    ) |
    zenity --text-info --title="Adding files to repository" --width=600 --height=400
    #rm -f $RESPONSE
fi
commit.sh:
#!/bin/bash
# Albert Lombarte <alombarte AT harecoded DOT com>

RESPONSE=`date "+%Y-%b-%d_commit".txt`
#MESSAGE=`zenity --entry --title="Commiting svn changes" --text="Specify log message:" --width=500 2>&1`
MESSAGE=""

if [ $? -eq 0 ] ; then

    (
    echo "Commiting files:$@"
    svn commit -m "$MESSAGE" "$@"
    echo "end."
    ) |
    zenity --text-info --title="SVN commit $1" --width=600 --height=400
    #rm -f $RESPONSE
fi
status.sh:
#!/bin/bash
# Albert Lombarte <alombarte AT harecoded DOT com>

RESPONSE=`date "+%Y-%b-%d".txt`

if [ $? -eq 0 ] ; then

    (
    svn status "$@"
    echo "end."
    ) |
    zenity --text-info --title="Checking status..." --width=600 --height=400
    #rm -f $RESPONSE
fi
update.sh:
#!/bin/bash
# Albert Lombarte <alombarte AT harecoded DOT com>

RESPONSE=`date "+%Y-%b-%d_update".txt`
if [ $? -eq 0 ] ; then

    (
    echo "Updating $@"
    svn update "$@"
    echo "end."
    ) |
    zenity --text-info --title="Updating resource to latest revision" --width=600 --height=400
    #rm -f $RESPONSE
fi
Cheers!
Camilo Bravo Camilo Bravo 25/03/2009 at 15:04
Thank you Camilo!
I've added the capture of the messages to the scripts. Now your change is included in the download.
Gracias Albert! Llevaba mucho tiempo buscando sustituto para Tortoise. L e echaré un ojo al código a ver si puedo aportar mi granito. ¿Por qué no abres un proyecto Sourceforge o algo así? ¿Has pensado en los iconos superpuestos como hace Tortoise? ¿Sería posible con shell scripts? Quizá con Python no sea muy complicado, incluso se podrían utilizar estos mismos shell scripts.
Isra Isra 16/04/2009 at 11:38
Have a look at: http://code.google.com/p/nautilussvn
This is a "real" project ;)
> Have a look at: http://code.google.com/p/nautilussvn
Is this better though?
Peter Peter 30/04/2009 at 23:34
Hi Peter,
Yes use Nautilussvn instead. I put here those scripts long time ago, but Nautilussvn is the way to go.
First off - thanks for your tutorial and code! I have downloaded the scripts, and installation seems to have worked out fine. However, I maybe missing a huge chunk of info here, and wonder if you can advise: How / where do I define my repository, where my files should be checked out from? On Windows Tortoise, it's also set within the right-click menu. Sorry if this seems to be a silly one, I am a recent "Windows-refugee", still learning the ropes on Linux.
Many thanks in advance,
michal
Hi there,  I discvoered this site while again searching for some nautilus integration for svn and directly include them. The scripts work much bettern than other nautilus integrations I've found.  Thanks to Albert Lombarte.
After installing the scripts i was looking for some folder embleme stuff to get visual feedback on connected folders. I found this tool http://code.google.com/p/nautilussvn/. It looks much like the Subversion Client for Windows.  Adding icons to Folders of local working copies and providing key commands to the user by adding them to the context menu. I didn't test it complete just installed it and it looks great.
Ben
Beni Beni 18/06/2009 at 09:57
[...]buntu" rel="category tag">Ubuntu Found a cool Nautilus Subversion Integration tool that allows one to execute SVN commands using Gnome scripts. sudo apt-get install nautilus-actions Requires Zenity and Subversion. Link to download the scripts Also, found the SVN Workbench  from Tigri[...]
So are these scripts depricated? 
If so, maybe you should place a big visible notice at the top of the page, so that people do not waste time reading through the whole thing and doing the steps just to find out that it is a discontinued project...
If nautilussvn is the way to go, maybe a link to this in the same notice at the top would be a good idea.
Just my two cents. :)
[...]ing SVN on Nautilus: Nautilus SVN integration project page. Nautilus subversion integration tool. Execute SVN commands with Gnome scripts A tutorial on how to integrate and use SVN on Nautilus. Nautilus File Manager Scripts A page with a good collection of Nautilus scripts. Nautilus on GNOME Live Nautilus page on GNOME Live.[...]
[...]pageTracker._trackPageview('/outbound/article/code.google.com');">SVN on Nautilus: Nautilus SVN integration project page. Nautilus subversion integration tool. Execute SVN commands with Gnome scripts A tutorial on how to integrate and use SVN on Nautilus. Nautilus File Manager Scripts A page with a good[...]
[...]pageTracker._trackPageview('/outbound/article/code.google.com');">SVN on Nautilus: Nautilus SVN integration project page. Nautilus subversion integration tool. Execute SVN commands with Gnome scripts A tutorial on how to integrate and use SVN on Nautilus. Nautilus File Manager Scripts A page with a good[...]
[...]pageTracker._trackPageview('/outbound/article/code.google.com');">SVN on Nautilus: Nautilus SVN integration project page. Nautilus subversion integration tool. Execute SVN commands with Gnome scripts A tutorial on how to integrate and use SVN on Nautilus. Nautilus File Manager Scripts A page with a good[...]
[...]pageTracker._trackPageview('/outbound/article/code.google.com');">SVN on Nautilus: Nautilus SVN integration project page. Nautilus subversion integration tool. Execute SVN commands with Gnome scripts A tutorial on how to integrate and use SVN on Nautilus. Nautilus File Manager Scripts A page with a good[...]
[...]pageTracker._trackPageview('/outbound/article/code.google.com');">SVN on Nautilus: Nautilus SVN integration project page. Nautilus subversion integration tool. Execute SVN commands with Gnome scripts A tutorial on how to integrate and use SVN on Nautilus. Nautilus File Manager Scripts A page with a good[...]
[...]pageTracker._trackPageview('/outbound/article/code.google.com');">SVN on Nautilus: Nautilus SVN integration project page. Nautilus subversion integration tool. Execute SVN commands with Gnome scripts A tutorial on how to integrate and use SVN on Nautilus. Nautilus File Manager Scripts A page with a good[...]

Leave your comment Nautilus subversion integration tool. Execute SVN commands with Gnome scripts

Log in to Obolog, or create your free blog if you are not registered yet.

User avatar Your name