[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

How does Undoing Change Show Up in History

From: David Weintraub <qazwart_at_gmail.com>
Date: Mon, 4 May 2009 17:10:01 -0400

I have a question about how does undoing a change show up in the history:

I created a new repository and added a single file into that repository:

$ vi foo.txt
$ cat foo.txt
this is line #1
this is line #2
this is line #3 (DELETE)

$ svn add foo.txt
A foo.txt

$ svn commit -m

$ svn commit
Adding foo.txt
Transmitting file data .
Committed revision 1.
$ svn log foo.txt
------------------------------------------------------------------------
r1 | dweintraub | 2009-05-04 17:02:21 -0400 (Mon, 04 May 2009) | 2 lines

Adding file foo.txt

------------------------------------------------------------------------

I then removed the third line:
$ cat foo.txt
this is line #1
this is line #2
$ svn commit -m"Removing third line"
Sending foo.txt
Transmitting file data .
Committed revision 2.

Now, I decided I want to revert the change:

$ svn merge -rHEAD:1 foo.txt
--- Reverse-merging r2 into 'foo.txt':
U foo.txt
$ svn commit -m"Reverting to revision 1"
Sending foo.txt
Transmitting file data .
Committed revision 3.

Change reverted. What does my log show?

$ svn log -v foo.txt
------------------------------------------------------------------------
r3 | dweintraub | 2009-05-04 17:03:26 -0400 (Mon, 04 May 2009) | 1 line
Changed paths:
   M /foo.txt

Reverting to revision 1
------------------------------------------------------------------------
r2 | dweintraub | 2009-05-04 17:02:54 -0400 (Mon, 04 May 2009) | 1 line
Changed paths:
   M /foo.txt

Removing third line
------------------------------------------------------------------------
r1 | dweintraub | 2009-05-04 17:02:21 -0400 (Mon, 04 May 2009) | 2 lines
Changed paths:
   A /foo.txt

Adding file foo.txt

------------------------------------------------------------------------

Why doesn't my log show the merge. It only shows the change and not
the fact I removed change #2 from my file.

The reason I am asking is we have a bit more complex version of this:
Someone commited a bunch of changed, someone else reverted the
changes, and then they merged changes from another branch.

I can't tell if they backed out the changes, or if they did a reverse
merge. I would think it is important for Subversion to know that
revision "X" was backed out of the file, and when you merge from a
branch, you shouldn't look at changes from revision "X".
$ cat foo.txt

-- 
David Weintraub
qazwart_at_gmail.com
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2060162
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-05-04 23:11:28 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.