nexoBlogs network
Anonymous Anonymous

Nautilus subversion integration tool. Execute SVN commands with Gnome scripts

Thursday, 25 de October del 2007

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.

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

Download (right click and save): Download nautilus-svn scripts

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.

Related posts

Images album - Viendo 1 a 4 de 9

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

See photo album »

Comments

el bigoti de TomSelleck el bigoti de TomSelleck
no puc esperar per provar-lo!
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>
edu edu
ets un geni, company xD
instal·lant-se ^^
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. :)
Hiran Hiran
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.
Enlace recibido desde saulvargas.es » Blog Archive ...
[...]="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.

Josiah Josiah

Thanks for the sweet tip!

Using Ubuntu as a work environment now that I have some decent SVN shell integration!

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.

Camilo Bravo Camilo Bravo

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!

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.

Have a look at: http://code.google.com/p/nautilussvn

This is a "real" project ;)

Peter Peter

> Have a look at: http://code.google.com/p/nautilussvn

Is this better though?

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

Enlace recibido desde Nautilus subversion ...
[...]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[...]

Leave your comment

Leave your comment
You need javascript to be activated on irder to leave comments

Login in OboLog, or create free blog if you don't have one yet.

Then we'll remember your data and show your avatar in your comments.

Sponsors

Login

Otros blogs de nexoBlogs: