Support calling 'svn up' before performing the commit.
This commit is contained in:
parent
1cbbf1b7c9
commit
b7bac5aeed
@ -192,6 +192,14 @@ vcs_commit() {
|
||||
fi
|
||||
}
|
||||
|
||||
vcs_update() {
|
||||
# Unlike svn, git doesn't push the changes to origin immediately,
|
||||
# and that's why we don't force update to it right here.
|
||||
if [ ${SC_VCS} = svn ]; then
|
||||
svn up || say 'Warning: svn up failed, trying to proceed anyway.'
|
||||
fi
|
||||
}
|
||||
|
||||
print_help() {
|
||||
cat <<_EOH_
|
||||
Synopsis:
|
||||
@ -203,6 +211,7 @@ Options:
|
||||
|
||||
-c, --changelog backwards compat (ignored),
|
||||
-C, --nocolor disable colorful output,
|
||||
-d, --noupdate disable updating the repository,
|
||||
-f, --force force repoman to proceed with the commit,
|
||||
-t, --trivial trivial changes (do not add a ChangeLog entry),
|
||||
-v, --verbose enable verbose output.
|
||||
@ -231,7 +240,7 @@ confirm() {
|
||||
|
||||
# Guess what!
|
||||
main() {
|
||||
local commitmsg force monochrome trivial
|
||||
local commitmsg force monochrome noupdate trivial
|
||||
unset SC_VERBOSE
|
||||
|
||||
while [ ${#} -gt 0 ]; do
|
||||
@ -251,6 +260,9 @@ main() {
|
||||
-C|--nocolor)
|
||||
monochrome=1
|
||||
;;
|
||||
-d|--noupdate)
|
||||
noupdate=1
|
||||
;;
|
||||
-f|--force)
|
||||
force=1
|
||||
;;
|
||||
@ -362,6 +374,11 @@ main() {
|
||||
confirm
|
||||
fi
|
||||
|
||||
if [ -n "${noupdate}" ]; then
|
||||
sayv "Updating the repository..."
|
||||
vcs_update
|
||||
fi
|
||||
|
||||
sayv "Now, let's let repoman do its job..."
|
||||
exec repoman commit ${old_repoman--a} ${force+-f} -m "${SC_CP}: ${commitmsg}"
|
||||
;;
|
||||
@ -371,6 +388,12 @@ main() {
|
||||
say "Ready to commit ${WHITE}$(echo ${SC_CHANGE_LIST} | wc -w)${RESET} package removal(s), with commit message:"
|
||||
say "${BGREEN}${SC_CP}: ${commitmsg}${RESET}"
|
||||
confirm
|
||||
|
||||
if [ -n "${noupdate}" ]; then
|
||||
sayv "Updating the repository..."
|
||||
vcs_update ${SC_CHANGE_LIST}
|
||||
fi
|
||||
|
||||
vcs_commit "${SC_CP}: ${commitmsg}" ${SC_CHANGE_LIST}
|
||||
;;
|
||||
esac
|
||||
|
@ -43,6 +43,11 @@ now created as needed, unless \fB--trivial\fP is used
|
||||
disable colorful output (for terminals which do not support escape
|
||||
sequences)
|
||||
|
||||
.IP "\fB-d\fP, \fB--noupdate\fP"
|
||||
|
||||
do not update and rebase the repository before proceeding with
|
||||
the commit
|
||||
|
||||
.IP "\fB-f\fP, \fB--force\fP"
|
||||
|
||||
force proceeding with the commit even if QA violations occur. This
|
||||
|
Loading…
Reference in New Issue
Block a user