This can be used to create a new changes entry based on a predefined description text. Basically, this is a combination of the default behavior and the -m option. (Rationale: move the functionality which was added in commit b6ccac1ebd9cac5998118a7bb119508ade6b47fe (and reverted in commit d61f21fe0e582736b84c0107439a8bcea3b00244) to osc) --- vc | 22 +++++++++++++++++----- 1 files changed, 17 insertions(+), 5 deletions(-) diff --git a/vc b/vc index bf57343..06a29e9 100755 --- a/vc +++ b/vc @@ -39,21 +39,29 @@ fi while [ -n "$1" ]; do case "$1" in -m) - if [ $just_edit ]; then - echo "You cannot use -m and -e together!" + if [ -n "$just_edit" -o -n "$template" ]; then + echo "-m, -e and -t are mutually exclusive!" exit 1 fi message="$2" shift 2 ;; -e) - if [ -n "${message}" ]; then - echo "You cannot use -m and -e together!" + if [ -n "${message}" -o -n "$template" ]; then + echo "-m, -e and -t are mutually exclusive!" exit 1 fi just_edit=true shift 1 ;; + -t) + if [ -n "${message}" -o -n "$just_edit" ]; then + echo "-m, -e and -t are mutually exclusive!" + exit 1 + fi + template="$2" + shift 2 + ;; --help) echo "Usage: $0 [-m MESSAGE|-e] [filename[.changes]|path [file_with_comment]]" echo @@ -131,7 +139,11 @@ set +e cat "$content" echo elif [ ! $just_edit ]; then - echo "- " + if [ -n "$template" ]; then + echo -e "- $template" + else + echo "- " + fi echo fi cat $changelog -- 1.7.3.4 -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org