Register
It is currently Fri Oct 24, 2014 10:14 pm

fixing svn merge error script


All times are UTC - 6 hours


Post new topic Reply to topic  [ 1 post ] 
Author Message
 PostPosted: Sat Nov 29, 2008 6:03 pm   

Joined: Sat Nov 29, 2008 5:54 pm
Posts: 1
hi there there is an svn merge error that screws up a the .svn entries file to make a variable that is marked revision="0"
I have started a script to fix this but have been running into issues with the find line program in it not returning any results.
any ideas

Code:
#!/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\""

function correct-rev {
        echo $1
        chmod 644 $1
        sed -i "s/^revision=\"0\"/revision=\"$2\"/" $1
        chmod 444 $1
}


find . -path '*/.svn' -name entries -exec correct-rev {}  $revNum \;


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP