SVN merger errors: Working copy path '*' does not exist in repo
So recently I was merging a working version, of a web site and when I checked the status I received an error "Working copy path 'file.foo' does not exist in repository".
I don't know what that means so I searched for the error on my fav. search engine and asked for help on this #svn channel and received very little information. After a while I found this blog entry. It was good and simple to fix. But I had a few issues with the script that they providing there. One the server I was working on (not my hosting) did not have ruby installed. Two, I am working with Subversion 1.5.7 and that script was written for 1.2 or 1.3. But the information was there.
All I had to do is find and change:
revision=”0″
with
revision=”$correctRevsionNumber″
Easy enough to do right? open vim the file with vim and run :%s/revision="0"/revision="16"/g right? Well what happens when I have a huge amount of sub folders that have the same issue? that turns in to hour of work.
I made a shell script to help you fix this issue in bulk
here is the code and you can download it below. I should be run from the root of your working directory.
#!/bin/bash
echo -e "Waring please make sure you know what you are doing you can severely ruin your svn file structure if you don't know what your doing.\n Press crtl-c to exit this script and back up your files."
echo "What revision are you trying to fix?"
read revNum;
echo -e "Replacing all instances of:\n revision=\"0\" \n with \n revision=\"$revNum\""
find . -path '*/.svn/*' -name entries -exec chmod 644 {} \; -exec sed -i "s/revision=\"0\"/revision=\"$revNum\"/" {} \; -exec chmod 444 {} \; -print
exit;
Please remember to be careful when running a script like this and know that any damage you do you your files from running it is not my fault. Backing up is a good thing.

Comments
Hi if the blog containing a ruby script is not used, how did u manage to find a way to search for revision=0.
Can you tell me so that i can also follow it.
Thanks
Post new comment