Report inadequate content

Svn in Harecoded

Move a SVN repository to Git with the whole commit history

It is in your mind, like a worm that eats away the apple, "I have to switch to Git". And one day it happens and you realize that it was not that diffcult.

I started using Git as my local repository, but still using SVN as the central repository with git itself thanks to the git svn set of commands. After some time I decided to entirely move the vast majority of projects from SVN to Git but of course not by creating a new fresh and empty repository but importing the whole svn commit history, as if the commits were made using Git itself ten years ago.

This is how you can do it:

Read more

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.

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.