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