summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Tarkovsky <alextarkovsky@gmail.org>2006-07-03 18:00:28 +0000
committerAlex Tarkovsky <alextarkovsky@gmail.org>2006-07-03 18:00:28 +0000
commit71bacc7ccdafbe86c0ea09521d2cf9777dee3d99 (patch)
tree0bb902941a9a5cf251918212074971b63b46e28d /scripts
parentdev-util/uno: New ebuild for bug 108753 (diff)
downloadsunrise-reviewed-71bacc7ccdafbe86c0ea09521d2cf9777dee3d99.tar.gz
sunrise-reviewed-71bacc7ccdafbe86c0ea09521d2cf9777dee3d99.tar.bz2
sunrise-reviewed-71bacc7ccdafbe86c0ea09521d2cf9777dee3d99.zip
scripts/sunrise-commit: Exit with informative message if svn update results in conflicts
svn path=/sunrise/; revision=456
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/sunrise-commit18
1 files changed, 17 insertions, 1 deletions
diff --git a/scripts/sunrise-commit b/scripts/sunrise-commit
index c99247b50..0c0fc158c 100755
--- a/scripts/sunrise-commit
+++ b/scripts/sunrise-commit
@@ -1,7 +1,6 @@
#!/bin/bash
# sunrise-commit - Automates the Gentoo Sunrise Overlay commit process
# Released into the public domain
-# $Id$
source /sbin/functions.sh
@@ -118,16 +117,33 @@ svn_up() {
pushd .. >/dev/null
(( num_new_dirs++ ))
done
+
ebegin "Updating working copy to latest version from repository"
+
if [[ "$opt_verbose" == "1" ]] ; then
svn update || set $?
else
svn update -q || set $?
fi
+
eend ${1:-0}
+
for (( i=num_new_dirs ; i > 0 ; i-- )) ; do
popd >/dev/null
done
+
+ local conflict_files=$(svn status | sed -rn 's/^C.+ ([^ ]+)$/\1/p')
+ if [[ -n "$conflict_files" ]] ; then
+ echo "!!! Error: Some local files have changes that conflict with the latest"
+ echo "!!! revisions in the repository. Please contact their committer(s) to resolve"
+ echo "!!! the conflicts manually before running sunrise-commit again:"
+ for filename in $conflict_files ; do
+ echo "!!!"
+ echo "!!! file: ${filename}"
+ echo "!!! committer: $(svn info ${filename} | sed -rn 's/Last Changed Author\: (.*)$/\1/p')"
+ done
+ exit 1
+ fi
fi
return ${1:-0}
}