Skip to content

Commit 376d5a2

Browse files
committed
Additional tweaks to bin/mkpatch; removing buggy -r option.
- Legacy-Id: 17441
1 parent 64111d3 commit 376d5a2

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

bin/mkpatch

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ while true ; do
9393
case "$1" in
9494
-c| --change) CHG="$2"; shift;; # the change made by revision ARG
9595
-o| --overwrite) OVER=1;; # overwrite any existing patch file
96-
-r| --revision) REV="$2"; shift;; # the change made between revisions REV
9796
-h| --help) usage; exit;; # Show this help, then exit
9897
-v| --verbose) VERBOSE=1;; # Be more talkative
9998
-V| --version) version; exit;; # Show program version, then exit
@@ -107,11 +106,8 @@ done
107106
# The program itself
108107

109108
if [ "$CHG" ]; then
110-
name=$(svn log -c $CHG | sed -r -e '/^---/d' -e '/^r[0-9]+/d' -e '/^$/d' -e 's/(.*)/\L\1/' -e 's/[^[:alnum:]]/-/g' -e 's/-+/-/g' | cut -c 1-32)
109+
name=$(echo $(svn log -c $CHG | sed -r -e '/^---/d' -e '/^r[0-9]+/d' -e '/^$/d') | sed -r -e 's/(.*)/\L\1/' -e 's/[^[:alnum:]]/-/g' -e 's/-+/-/g' | cut -c 1-32)
111110
name="$name-c$CHG"
112-
elif [ "$REV" ]; then
113-
name=$(echo $(svn log -r $REV | sed -r -e '/^---/d' -e '/^r[0-9]+/d' -e '/^$/d') | sed -r -e 's/(.*)/\L\1/g' -e 's/[^[:alnum:]]/-/g' -e 's/-+/-/g' | cut -c 1-32)
114-
name="$name-r${REV/:/-}"
115111
else
116112
if [ $# -lt 2 ]; then die "Expected patch name and file list on the command line."; fi
117113
if [[ $1 =~ / ]]; then die "Expected a patch name, but the first argument to $program seems to be a file path: '$1'"; fi
@@ -124,4 +120,4 @@ svn diff ${CHG:+ -c $CHG} ${REV:+ -r $REV} "$@" > $patchfile
124120
less $patchfile
125121
echo ""
126122
echo ""
127-
echo "Patch is in $patchfile."
123+
echo "Patch is in $patchfile"

0 commit comments

Comments
 (0)