Report inadequate content

Subversion in Harecoded

Cómo revertir los cambios de una revisión en SVN

Si eres usuario de subversion te habrá pasado alguna vez que después de hacer commit y probar posteriormente el código has visto que debes volver a una versión anterior y dejar el código tal y como estaba en una versión anterior. No todos los clientes gráficos disponen de la opción de "reverse merge", pero en la terminal es muy sencillo de hacer...

Read more

How to create a patch and apply it with subversion

If you want to create a patch with svn you only have to type in the terminal something like:

svn diff yourproject > yourproject.patch

Where yourproject is the folder containing the modified source code.

Then, to restore the patch (apply the changes stored in patch in a new working copy), copy the patch file yourproject.patch in the machine where you want apply the patch and "cd "to the parent folder containing the yourproject folder (not inside yourproject). Then type:

patch -p0 -i /path/to/yourproject.patch

If you do not respect the same hierarchy when creating and applying the patch then you'll have to play around with the "p0" parameter (gives the entire file name unmodified). Of course the patch command is not related to SVN and you can use it in many other environments.

TortoiseSVN for Ubuntu Linux: The real alternative

RabbitVCS logoI have posted several articles regarding subversion in this blog. If you ask me one thing I like in Windows, then I only have one answer: Tortoise SVN client. This small application is the only thing I love in Windows, for anything else, I'd rather user Mac or Linux.

But now, there is a Linux alternative to Tortoise SVN called RabbitVCS. I've tried it and it works pretty well. This project, formerly NautilusSVN, looks really well and is inspired in the windows tool. By now, it offers a good support for SVN but the aim is to cover other Version Control Systems (VCS), like Git.

RabbitVCS is integrated smartly in the Nautilus context menu, like Tortoise does, and contains all the options you might need. Logs, updates, merge, commit, full checkout... anything... plus you can play in the terminal and create your own scripts!

If you are a developer and you work in a Linux environment, then you need this tool.

 

Rabbit VCS Log viewer

There is still a long way to walk for RabbitVCS but I am sure that in short will be a perfect replacement. We don't have to forget that TortoiseSVN offers many many advanced features (not just the common commands), but if you are a regular developer who works with a small group of developers and you don't have a lot of branches that need to merge, reintegrate and so on, this is definetelly a perfect option.

SVN merge for Mac OS X

If you want to merge branches in your projects using a Mac OS X, you'll probably miss how straightforward is to do that with the TortoiseSVN client.

Mac has many SVN-fashioned clients where you can fall in love when you see the GUI, but when it comes to do a merge it seems that all they have forgotten to include support for it. I haven't seen any free or comercial application for Mac that integrates all the subversion commands in the same tool without pain. You need always a couple of tools and sometimes use the terminal commands (I do this the most in Mac).

Returning to the specific svn command merge, here are the only tools that you can use to accomplish that task:

Subcommander:

Graphical subversion client with diff and merge tool. http://subcommander.tigris.org/

DiffMerge

Multiplatform utility for merging and comparing: http://www.sourcegear.com/diffmerge/ (not SVN specific)

Guiffy:

Guiffy is a normal diff/merge application, you don't need to use Subversion, but it comes with support for CVS/SVN. http://www.guiffy.com/

And that's all. I've spent many hours looking for more apps, but I haven't found any helping me with the merge integrated with SVN. If you find anything let me know and I'll add it to the list.

UPDATE (Added SmartSVN)

SmartSVN (commercial)

SmartSVN is the most complete solution for Mac I've seen. It runs on Windows and Linux as well. Although it is not a Cocoa application and doesn't accept things like drag and drop it does everything you might need, and speaking about merge:

  • Merge
  • Merge from 2 sources
  • Reintegrate branches

The application allows to create several projects, browse them (very clean and neat), see the logs inside the context, see diffs, resolve conflicts, tags, branches, logs, filters... everything!!!

I don't understand how this application isn't more popular, since is the missing app for advanced mac developers and works on any platform.

If you find anything interesting please let me know and I'll add it in the list.

Subversion (svn) 1.5 para Mac OS X

SCPluginSi utilizas distintos sistemas operativos y en ellos utilizas versiones distintas de subversion te habrás encontrado alguna vez con el mensaje de error:

svn: This client is too old to work with working copy '.'; please get a newer Subversion client

Si eres usuario de Mac y te ha pasado esto, o simplemente necesitas un cliente svn 1.5 para mac puedes descargarte la última versión de SCPlugin que ya incluye soporte para la 1.5, no es como TortoiseSVN, pero que le vamos a hacer :)

Con SCPlugin no vas cambiar la versión de command line, pero también puedes hacerlo utilizando el package de Martin Ott. Si utilizas algun sistema de ports en MacPorts puedes descargar también la versión de command line y si utilizas Fink, igualmente.

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.