Question

I am using VisualSVN (which uses Tortoise). I accidentally move a folder to a different location. When tries to move it back, SVN pukes with this error. It happened once before and I managed to do some random updates/commits, not knowing what I was doing and it was "fixed". I cannot pull the same magic again, so I need to know how to get my files and directory and of tree-conflict.

Thanks!

Was it helpful?

Solution

I had the same error (tree conflict), but from a different workflow.

Find what process has the lock. Download Handle.exe, and open to the folder you extracted to. Then run "C:\path\handle.exe" "C:\path\FileOrFolder".

https://technet.microsoft.com/en-us/sysinternals/bb896655.aspx

Workflow to reproduce:

- delete folder (having one of the files locked by a program that is within this folder)
- commit parent folder of folder you deleted, and look for red text of the folder you deleted (it should be brown, not red if there aren't issues in SVN)

To fix:

- forcefully kill the lock (or close the program so it releases the lock)
- run cleanup command on folder you deleted
- revert folder you deleted
- delete folder you deleted
- commit parent folder of folder you deleted

OTHER TIPS

I'm not sure what state it's in now, but your best bet would probably be to:

  1. Move the folder out of your repository completely
  2. Do an svn cleanup
  3. Do an svn update
  4. Copy the files from the folder back (without the .svn files) overwriting the old source files that were just svn updated.

http://rubyjunction.us/subversion-hell-sh

Edit

Here's the shell script from the link, which could be useful to Linux/Unix users...

#!/bin/sh

if [ "" == "$1" ] ; then
  echo "Usage: subversion-hell.sh A_PROJECT"
  echo "A_PROJECT should be a Subversion folder you are having problems with,"
  echo "and you should be in the folder above A_PROJECT"
fi

DIR=`pwd`
PWD=$DIR
DIR=`echo $DIR | sed s/^.*\\\/trunk/trunk/`

mkdir ~/tmp/       2>/dev/null
rm -Rf ~/tmp/$1   2>/dev/null
mv ~/$DIR/$1 ~/tmp/
find ~/tmp/$1/ -iname '.svn*' -exec rm -Rf {} \; 2>/dev/null
cd $PWD
echo svn co YOUR_URL_HERE/$DIR/$1 $1
svn co YOUR_URL_HERE/$DIR/$1 $1
cp -Rf ~/tmp/$1/* $PWD/$1/

# YOUR_URL_HERE can be found by looking in file .svn/entries, near the top

I had the same problem when tried to delete a branch on linux enviroment. What I did was:

  1. svn revert branch
  2. svn up
  3. svn cleanup
  4. svn remove branch - mark the branch again for removal
  5. svn ci

I don't know what the problem was but I experienced it twice in two weeks.

Keep a backup of the folder that you have moved. Now in SVN, click on TortoiseSVN>>Resolved. Select the files/folder and resolve. Now update/commit the svn data.

Note that this can occur even if you "didn't do anything" - i.e. someone moves around folders on you in the repository and you don't know about it. Happened to me. If this is the case, delete the problem folder from your repository and svn update.

A tree conflict occurs when a developer moved/renamed/deleted a file or folder, which another developer either also has moved/renamed/deleted or just modified. There are many different situations that can result in a tree conflict, and all of them require different steps to resolve the conflict.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top