Skip to content

Commit afd9b70

Browse files
committed
Added the --ignore-space-change switch to both the svn diff and merge commands in bin/mergedevbranch, to avoid spending time on editors that frivolously changes whitespace. Didn't occur to me earlier that the merge command might be able to do this, but it can. Splendid.
- Legacy-Id: 10547
1 parent 363630f commit afd9b70

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

bin/mergedevbranch

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,9 @@ fix=$3
116116
repo=$(echo -n "$(svn info | grep "^Repository Root: " | sed 's/Repository Root: //')")
117117

118118
note "Identify the branch:"
119-
if svn info ${repo}/personal/$branch > /dev/null 2>&1; then
119+
if svn info $branch > /dev/null 2>&1; then
120+
branch="${branch#^/}"
121+
elif svn info ${repo}/personal/$branch > /dev/null 2>&1; then
120122
branch="personal/$branch"
121123
elif svn info ${repo}/branch/$branch > /dev/null 2>&1; then
122124
branch="branch/$branch"
@@ -147,7 +149,7 @@ read -p "Continue with diff? [Y/n] "
147149
[ "$REPLY" = "Y" -o "$REPLY" = "y" -o "$REPLY" = "" ] || exit
148150
149151
note "Diff:"
150-
svn diff -c $rev $repo/$branch | less
152+
svn diff -c $rev -x"-u -b" $repo/$branch | less
151153
152154
echo ""
153155
read -p "Additional descriptive text (hit return for none): "
@@ -163,10 +165,10 @@ read -p "Continue with the merge? [Y/n] "
163165
164166
note "Do the merge:"
165167
if [[ $rev =~ : ]]; then
166-
svn merge -r $rev ${repo}/$branch . || die "Merge of $branch @$rev failed. The merge command was:
168+
svn merge -r $rev -x"-u -b" ${repo}/$branch . || die "Merge of $branch @$rev failed. The merge command was:
167169
svn merge -r $rev ${repo}/$branch ."
168170
else
169-
svn merge -c $rev ${repo}/$branch . || die "Merge of $branch @$rev failed. The merge command was:
171+
svn merge -c $rev -x"-u -b" ${repo}/$branch . || die "Merge of $branch @$rev failed. The merge command was:
170172
svn merge -c $rev ${repo}/$branch ."
171173
fi
172174

0 commit comments

Comments
 (0)