0

I'm apparently not understanding SVN.

I'm at revision 15140:

$ svn info
Revision: 15140

$ svn diff -r 15092:HEAD MyFile.pm
Index: MyFile.pm
===================================================================
--- MyFile.pm   (revision 15092)
+++ MyFile.pm   (revision 15140)
@@ -34,7 +34,7 @@

 sub myMethod {
     my ( $self, $args ) = @_;
-
+    
     my $prog_obj = $self->prog_obj;
     my $session  = $prog_obj->session;

Now I don't like that my revision contains the worthless whitespace modification, so I want to get rid of that change entirely.

svn merge -c 15092 MyFile.pm
svn commit -m "Removing whitespace update"
svn update

Now if I do the diff again, it should be gone, right?

$ svn diff -r 15092:HEAD MyFile.pm
Index: MyFile.pm
===================================================================
--- MyFile.pm   (revision 15092)
+++ MyFile.pm   (revision 15140)
@@ -34,7 +34,7 @@

 sub myMethod {
     my ( $self, $args ) = @_;
-
+    
     my $prog_obj = $self->prog_obj;
     my $session  = $prog_obj->session;

Nope.

What am I misunderstanding?

1 Answer 1

1

You probably meant to do:

svn merge -c -15092 MyFile.pm

Note the minus before the revision number, which specifies this is a reverse merge.

Trying to merge a revision on a branch (or trunk) that was committed directly to that branch (or trunk) doesn't do anything.

Your commit command then does nothing because there's nothing to commit.

Sign up to request clarification or add additional context in comments.

1 Comment

Sadly that didn't work for me either, and I eventually gave up

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.