From afd9b70bbd4a0ee95a8813a488b225fdf9da814c Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Mon, 7 Dec 2015 18:08:01 +0000 Subject: [PATCH] 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 --- bin/mergedevbranch | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bin/mergedevbranch b/bin/mergedevbranch index f236af80d..c9d1efdf5 100755 --- a/bin/mergedevbranch +++ b/bin/mergedevbranch @@ -116,7 +116,9 @@ fix=$3 repo=$(echo -n "$(svn info | grep "^Repository Root: " | sed 's/Repository Root: //')") note "Identify the branch:" -if svn info ${repo}/personal/$branch > /dev/null 2>&1; then +if svn info $branch > /dev/null 2>&1; then + branch="${branch#^/}" +elif svn info ${repo}/personal/$branch > /dev/null 2>&1; then branch="personal/$branch" elif svn info ${repo}/branch/$branch > /dev/null 2>&1; then branch="branch/$branch" @@ -147,7 +149,7 @@ read -p "Continue with diff? [Y/n] " [ "$REPLY" = "Y" -o "$REPLY" = "y" -o "$REPLY" = "" ] || exit note "Diff:" -svn diff -c $rev $repo/$branch | less +svn diff -c $rev -x"-u -b" $repo/$branch | less echo "" read -p "Additional descriptive text (hit return for none): " @@ -163,10 +165,10 @@ read -p "Continue with the merge? [Y/n] " note "Do the merge:" if [[ $rev =~ : ]]; then - svn merge -r $rev ${repo}/$branch . || die "Merge of $branch @$rev failed. The merge command was: + svn merge -r $rev -x"-u -b" ${repo}/$branch . || die "Merge of $branch @$rev failed. The merge command was: svn merge -r $rev ${repo}/$branch ." else - svn merge -c $rev ${repo}/$branch . || die "Merge of $branch @$rev failed. The merge command was: + svn merge -c $rev -x"-u -b" ${repo}/$branch . || die "Merge of $branch @$rev failed. The merge command was: svn merge -c $rev ${repo}/$branch ." fi