all
I’m reading a file line by line. Each line is a svn update command with specific repository path. My code looks like this:
while read line
do
eval $line 2> /tmp/outputfile
egrep -e "svn: Target path .* does not exist" /tmp/outputfile > /dev/null && echo $line >> /tmp/result
done < $SVN_TMP_FILE
basically i want to record the command that looking for a obsolete directory.
however there could be conflicts happened during the while loop which shows the following stuffs in the prompt:
Conflict discovered in 'blablabla'.
Select: (p) postpone, (df) diff-full, (e) edit,
(mc) mine-conflict, (tc) theirs-conflict,
(s) show all options: svn: Can't read stdin: End of file found
which terminates the loop and the commands after this would not be executed and recorded. My first clue is the showing error (can’t read stdin) would crash the process of reading line for reason that both probably share the stdin. Any idea on how to avoid this termination?
You can specify the conflict resolution as part of your update command. Excerpt from $
svn help update:So a
$ svn up --accept tfwould accept all changes from “theirs”.