views:

364

answers:

2

Has anyone had the experience of moving a file in tortoise and committing successfully, only to later commit a different change and be told of a tree conflict where:

  1. the file in its original location has been deleted, but in tortoise is marked as missing
  2. the file in its new location is there, but marked as already added.

(I use tortoise SVN, and we have client and server > 1.60)

Nobody else changed either the directory or the file (according to svn log).

  1. Why is this happening?
  2. Is there a way to avoid it happening?
  3. If it does happen, is there a more elegant way of fixing the problem than by deleting the whole folder and updating again?
+2  A: 
  1. Sounds like maybe you moved the file using the Windows Explorer "Move" command rather than the Tortoise "Move" command. The former just moves the file in the filesystem without updating the subversion tree (removing the old file from version control and linking the old file's history to the new one).

  2. Always use the TortoiseSVN "Move" command, or if you want a to move the file without history, then copy the file using Windows Explorer, add the new version with Tortoise, and then delete the old version with Tortoise.

  3. You can right-click on the parent folder of the old file, choose "Check for Modifications," and then delete the file marked as missing from version control.

Nick Meyer
No. Wrong. I use right-click drag "move with svn". 3. solves only half the problem as I still can't commit due to the file awaiting checkin that the repos thinks has already been checked in. The only way I can work out around this apparent bug is to delete the folder and update.
Jesse Pepper
@Jesse, when you commit successfully after the move, what level are you committing from? The top level of your working copy, a subdirectory, or what?
Nick Meyer
@Nick I commit from the root of my source tree.
Jesse Pepper
A: 

Sounds like you committed the file, but not the directories it was moved to/from. You need to commit the directories too.

zvolkov
No. I commit from the root of my source tree. As per usual.
Jesse Pepper
Thanks for the -1. I appreciate the effort.
zvolkov
+1 cos it could help others :-)
Brian