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

"Revert" seems broken with multiple (mistaken) merge/add

From: R Gibson <rxgrxg_at_gmail.com>
Date: 2005-12-06 17:56:56 CET

Hi,
  We recently upgraded from CVS to SVN and are having fun with our new
toy. But today one of my colleagues called for help because he had
got his working copy into an unmanageable state. Here's how the
problem came about:
1) Developer is working on version 5 of the repository
2) In version 10, a file was renamed Fle.java -> File.java
3) Developer decides that he wants *just* the rename
> svn merge -r9:10 .
D Fle.java
A File.java
> svn st
A + File.java
D Fle.java
4) Developer realise that he made a mistake and he doesn't actually
want to merge just the rename, so he attempts to undo what he has just
done (developer hasn't discovered the revert command yet)
> svn merge -r10:9 .
Skipped 'File.java'
A Fle.java
> svn st
A + File.java
R + Fle.java
5) Developer is really confused and tries to roll back
> svn revert *
Reverted 'File.java'
Reverted 'Fle.java'
> svn st
? File.java
> svn info Fle.java
Revision: 0
Copied From URL: https://svn/trunk/java/Fle.java
Copied From Rev: 9
Last Changed Rev: 7
 And it looks like the file contents correspond to version 10 of the repository.
 So the revert command that we would expect to bring us back to
version 2 (where we were before the merges) actually brings us to a
later version. It gets worse:
> svn up -r 2 Fle.java
svn: Failed to add file 'Fle.java': object of the same name already exists

I eventually managed to get his working copy into a normal(-ish) state
by manually editing the .svn/entries file and removing the
"copyfrom-rev", "copyfrom-url" and "copied" attributes, but I sweated
quite a bit while doing it and that's never pleasant ;)

We are using svn 1.2.1. Is this a known client bug? Is there a
better workaround than manually editing the .svn/entries file?

 Thanks,
 R

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Dec 6 18:01:40 2005

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.