How to revert a change in svn

Stefan Sperling stsp at stsp.name
Sat Mar 1 16:20:19 CET 2008


On Sat, Mar 01, 2008 at 04:09:09PM +0100, Stefan Sperling wrote:
> On Sat, Mar 01, 2008 at 02:19:54PM +0000, Ewan Meadows wrote:
> > http://mailman.dslinux.in-berlin.de/pipermail/dslinux-commit-dslinux.in-berlin.de/2008-February/002598.html
> > 
> > It turns out the changes I made in r 2138 causes perl not to compile
> > properly.  Does anyone know the command to revert this in svn?
> 
> First:
> 
> 	svn diff -r 2138:2137 user/perl/perl.c
> 
> should produce the diff you need to revert the change,
> i.e. the reverse diff of the commit made in r2138.
> 
> Apply it with:
> 
> 	svn merge -r 2138:2137 user/perl/perl.c

Sorry, that merge command is wrong. It does not specify a working copy target,
which means that svn will subsitute a '.' (current directory) for it.

Trying to aplly the differences between two files (perl.c at 2138 and
perl.c at 2137) into a working copy directory '.' does not make sense.

So use either:

  svn merge -r 2138:2137 user/perl/perl.c user/perl/perl.c

Or more explicitely (this illustrates better what actually happens):

  svn merge -r 2138:2137 \
	svn+ssh://dslinux-svn/svn/dslinux/trunk/user/perl/perl.c \
	user/perl/perl.c

> 
> Run:
> 
> 	svn diff user/perl/perl.c
> 
> to verify the diff again.
> 
> Compile. Test. Commit.
> 
> Hope this helps,
> -- 
> stefan
> http://stsp.name                                         PGP Key: 0xF59D25F0


-- 
stefan
http://stsp.name                                         PGP Key: 0xF59D25F0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url : http://mailman.dslinux.in-berlin.de/pipermail/dslinux-devel-dslinux.in-berlin.de/attachments/20080301/ed219f2b/attachment.pgp 


More information about the dslinux-devel mailing list