diff options
author | Stefan Schweizer <genstef@gentoo.org> | 2006-09-01 15:06:34 +0000 |
---|---|---|
committer | Stefan Schweizer <genstef@gentoo.org> | 2006-09-01 15:06:34 +0000 |
commit | d87c6c9cef12c3d23521c8cb32259624e497aa7e (patch) | |
tree | 85d727cb137bf3f724c270ba4791491b0d0505ce /scripts | |
parent | dev-ruby/ruby-mpd: quotes not needed when assigning (diff) | |
download | sunrise-reviewed-d87c6c9cef12c3d23521c8cb32259624e497aa7e.tar.gz sunrise-reviewed-d87c6c9cef12c3d23521c8cb32259624e497aa7e.tar.bz2 sunrise-reviewed-d87c6c9cef12c3d23521c8cb32259624e497aa7e.zip |
allow ./review w/o argument
svn path=/sunrise/; revision=1092
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/review | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/scripts/review b/scripts/review index 3123c9f2e..1a017c56b 100755 --- a/scripts/review +++ b/scripts/review @@ -18,15 +18,7 @@ opt_verbose=0 svn_up() { if [[ "$opt_noupdate" == "0" ]] ; then - ebegin "Updating working copy to latest version from repository" - - if [[ "$opt_verbose" == "1" ]] ; then - svn update $* - else - svn update -q $* - fi - - eend $? + svn update $* local conflict_files=$(svn status | sed -rn 's/^C.+ ([^ ]+)$/\1/p') if [[ -n "$conflict_files" ]] ; then @@ -68,8 +60,6 @@ EOF exit ${1:-0} } -[[ -z "$1" ]] && usage 1 - while [[ $# > 0 ]] ; do case "$1" in --help|-h) @@ -101,15 +91,26 @@ while [[ $# > 0 ]] ; do done if [[ -z "$*" ]] ; then - echo "!!! Error: You must supply a revision. See: $0 -h" - exit 1 + ebegin "Updating working copy to latest version from repository" + update=$(svn_up) + if [[ "$opt_verbose" == "1" ]] ; then + echo $update + fi + update=$(echo $update | tail -n 1) + update=${update/At revision } + sunrise_revision=${update/.} + [ "$sunrise_revision" -lt "10" ] && exit 1 + eend #elif [[ "$*" =~ "^[0-9]*$" ]]; then # echo "!!! Error: The revision must be an integer value $*" # exit 1 -fi -sunrise_revision=$* +else + sunrise_revision=$* -svn_up -r $sunrise_revision || exit $? + ebegin "Updating working copy to latest version from repository" + svn_up -r $sunrise_revision || exit $? + eend +fi if ! [ -e sunrise ] || ! [ -e reviewed ]; then eerror "You need to have sunrise and reviewed subdirs" @@ -164,5 +165,5 @@ fi eend ${?} ebegin "Committing working copy to repository" -svn commit reviewed -m "Reviewed up to revision $*" +svn commit reviewed -m "Reviewed up to revision $sunrise_revision" eend $? |