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

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
1 + 2 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.

Recent Tweets

I search every day, but I rarely google — 32 weeks 1 day ago
@rickmanelius http://t.co/NrZB8Z3z the tab issue is helped a bit — 32 weeks 2 days ago
note to self, one has to use variable replacements when adding serialized data to a table using db_query() #drupal — 32 weeks 2 days ago
there are times, when saying "I told you so" makes me more angry than satified — 32 weeks 6 days ago
thanks for the update @JacobSingh33 weeks 18 hours ago
for the forst time I did not have to restart firefox to add a plugin! #AchievementUnlocked — 33 weeks 1 day ago
@ACTVMedia I clicked on on the link expecting an awesome talking car, and then I had to learn something. — 33 weeks 1 day ago
@r_kois @rickmanelius I wish there was a query language for finding layers — 33 weeks 1 day ago
@greggles I would throw confettie but I have to run nad upgrade — 33 weeks 1 day ago
looking at the feesability of scraping a frontpage 4 generated html site into Drupal 7 — 33 weeks 1 day ago

©2009 Sanguis Development. 462 North King Street, Northampton MA 01060
Phone: (413) 570-0659

AIM: joshbeaureg || Skype: sanguisdex
Syndicate content