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

Probable bug with svn copy

From: Alan Spencer <alan.spencer_at_rockalltech.com>
Date: Thu, 17 Dec 2009 10:37:23 +0000

Hi All,

I've been asked to analyse a problem we have had with subversion and
come to the conclusion there is a bug in at least the client.

 

The scenario was someone committed a new directory that made a build
fail and in order to free up the build this commit was reverse merges
(merge -c -RRRR)

The individual in question wanted their changes back and the opportunity
to fix the problem. This was done by reverse merging the reverse merge.

They then fixed the problems, which included renaming a file.

They then committed these changes and updated and all looked OK.

Updating on other working copy showed that both the original and renamed
file existed, but the working copy used did not show this.

 

I wanted to find out if this is user error or a bug and if it has been
logged already.

And is there a way to achieve this without hitting this problem.

 

 

Here is a log of my reproducing this:

 

 

SETUP:

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

 

C:\dev\projects\build\build>mkdir svn-experiments

 

C:\dev\projects\build\build>svn add svn-experiments

A svn-experiments

 

C:\dev\projects\build\build>cd svn-experiments

 

C:\dev\projects\build\build\svn-experiments>mkdir experiment-1

 

C:\dev\projects\build\build\svn-experiments>cd experiment-1

 

C:\dev\projects\build\build\svn-experiments\experiment-1>notepad
readme.txt

 

C:\dev\projects\build\build\svn-experiments\experiment-1>mkdir
systemtest

 

C:\dev\projects\build\build\svn-experiments\experiment-1>cd ..

 

C:\dev\projects\build\build\svn-experiments>svn add experiment-1

A experiment-1

A experiment-1\readme.txt

A experiment-1\systemtest

 

C:\dev\projects\build\build\svn-experiments>cd ..

 

C:\dev\projects\build\build>svn commit -m "SVN experimentation area"
svn-experiments

Adding svn-experiments

Adding svn-experiments\experiment-1

Adding svn-experiments\experiment-1\readme.txt

Adding svn-experiments\experiment-1\systemtest

Transmitting file data .

Committed revision 16664.

 

C:\dev\projects\build\build>cd svn-experiments\experiment-1\systemtest

 

INITIAL CHANGE:

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

 

C:\dev\projects\build\build\svn-experiments\experiment-1\systemtest>mkdi
r audit

 

C:\dev\projects\build\build\svn-experiments\experiment-1\systemtest>cd
audit

 

C:\dev\projects\build\build\svn-experiments\experiment-1\systemtest\audi
t>notepad FirstName.txt

 

C:\dev\projects\build\build\svn-experiments\experiment-1\systemtest\audi
t>cd ..

 

C:\dev\projects\build\build\svn-experiments\experiment-1\systemtest>svn
status

? audit

 

C:\dev\projects\build\build\svn-experiments\experiment-1\systemtest>svn
add audit

A audit

A audit\FirstName.txt

 

C:\dev\projects\build\build\svn-experiments\experiment-1\systemtest>cd
..

 

C:\dev\projects\build\build\svn-experiments\experiment-1>svn commit -m
"First Add"

Adding experiment-1\systemtest\audit

Adding experiment-1\systemtest\audit\FirstName.txt

Transmitting file data .

Committed revision 16665.

 

NOW REVERSE MERGE CHANGE

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

 

C:\dev\projects\build\build\svn-experiments\experiment-1>svn merge -c
-16665 .

svn: Cannot reverse-merge a range from a path's own future history; try
updating first

 

C:\dev\projects\build\build\svn-experiments\experiment-1>svn up

At revision 16665.

 

C:\dev\projects\build\build\svn-experiments\experiment-1>svn merge -c
-16665 .

--- Reverse-merging r16665 into '.':

D systemtest\audit

 

C:\dev\projects\build\build\svn-experiments\experiment-1>svn commit -m
"Reverting svn merge -c -16665 ." systemtest\audit

Deleting systemtest\audit

 

Committed revision 16666.

 

NOW REVERSE MERGE THE REVERSE MERGE

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

---
 
C:\dev\projects\build\build\svn-experiments\experiment-1>svn merge -c
-16666 .
svn: Cannot reverse-merge a range from a path's own future history; try
updating first
 
C:\dev\projects\build\build\svn-experiments\experiment-1>svn up
At revision 16666.
 
C:\dev\projects\build\build\svn-experiments\experiment-1>svn merge -c
-16666 .
--- Reverse-merging r16666 into '.':
A    systemtest\audit
A    systemtest\audit\FirstName.txt
 
RENAME THE ADDED FILE
------------------------------------------
 
C:\dev\projects\build\build\svn-experiments\experiment-1>svn move
systemtest\audit\FirstName.txt systemtest\audit\SecondName.txt
A         systemtest\audit\SecondName.txt
D         systemtest\audit\FirstName.txt
 
C:\dev\projects\build\build\svn-experiments\experiment-1>dir
systemtest\audit\
 Volume in drive C has no label.
 Volume Serial Number is 24AC-D508
 
 Directory of
C:\dev\projects\build\build\svn-experiments\experiment-1\systemtest\audi
t
 
17/12/2009  09:53    <DIR>          .
17/12/2009  09:53    <DIR>          ..
17/12/2009  09:53                31 SecondName.txt
               1 File(s)             31 bytes
               2 Dir(s)  410,323,771,392 bytes free
 
C:\dev\projects\build\build\svn-experiments\experiment-1>svn commit -m
"Revert revert and renaming svn merge -c -16666 . svn move
systemtest\audit\FirstName.txt systemtest\audit\SecondName.txt" .
Adding         experiment-1\systemtest\audit
Adding         experiment-1\systemtest\audit\SecondName.txt
 
Committed revision 16667.
 
C:\dev\projects\build\build\svn-experiments\experiment-1>
 
 
UPDATE ELSEWHERE
----------------------------------
 
C:\dev\CO\trunk>svn up build\svn-experiments\experiment-1\
A    build\svn-experiments\experiment-1\systemtest\audit
A    build\svn-experiments\experiment-1\systemtest\audit\FirstName.txt
A    build\svn-experiments\experiment-1\systemtest\audit\SecondName.txt
Updated to revision 16667.
 
 
 
 
Many Thanks,
Alan.
 
 
Received on 2009-12-17 16:17:20 CET

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

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