From c8e5702127e507e82e6f68a4b8c546803accea9d Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Thu, 30 Jun 2005 08:19:37 +0000 Subject: import clean BK tree at cset 1.3670 --- packages/wiggle/wiggle-0.6/.mtn2git_empty | 0 packages/wiggle/wiggle-0.6/001NoQuietTime | 79 +++++++++++++++++++ packages/wiggle/wiggle-0.6/002SpecFile | 102 ++++++++++++++++++++++++ packages/wiggle/wiggle-0.6/003Recommit | 68 ++++++++++++++++ packages/wiggle/wiggle-0.6/004ExtractFix | 63 +++++++++++++++ packages/wiggle/wiggle-0.6/005Pchanges | 126 ++++++++++++++++++++++++++++++ 6 files changed, 438 insertions(+) create mode 100644 packages/wiggle/wiggle-0.6/.mtn2git_empty (limited to 'packages/wiggle/wiggle-0.6') diff --git a/packages/wiggle/wiggle-0.6/.mtn2git_empty b/packages/wiggle/wiggle-0.6/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/wiggle/wiggle-0.6/001NoQuietTime b/packages/wiggle/wiggle-0.6/001NoQuietTime index e69de29bb2..f2a0e01141 100644 --- a/packages/wiggle/wiggle-0.6/001NoQuietTime +++ b/packages/wiggle/wiggle-0.6/001NoQuietTime @@ -0,0 +1,79 @@ +Status: ok + +Don't use --quiet in dotest + +--quiet is Debian specific. +See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=56853 +Just use grep to make time quiet. + + ----------- Diffstat output ------------ + ./dotest | 32 ++++++++++++++++---------------- + 1 files changed, 16 insertions(+), 16 deletions(-) + +diff ./dotest~current~ ./dotest +--- ./dotest~current~ 2004-02-03 13:00:48.000000000 +1100 ++++ ./dotest 2004-02-03 13:01:10.000000000 +1100 +@@ -34,47 +34,47 @@ do + case $base in + script ) ./script ;; + diff ) if [ -f new ] +- then /usr/bin/time --quiet -o .time -f '%U' $WIGGLE -dw orig new | diff -u diff - ; xit=$? +- else /usr/bin/time --quiet -o .time -f '%U' $WIGGLE -dwp1 orig patch | diff -u diff - ; xit=$? ++ then /usr/bin/time -o .time -f '%U' $WIGGLE -dw orig new | diff -u diff - ; xit=$? ++ else /usr/bin/time -o .time -f '%U' $WIGGLE -dwp1 orig patch | diff -u diff - ; xit=$? + fi + ;; + ldiff ) if [ -f new ] +- then /usr/bin/time --quiet -o .time -f '%U' $WIGGLE -dl orig new | diff -u ldiff - ; xit=$? +- else /usr/bin/time --quiet -o .time -f '%U' $WIGGLE -dlp1 orig patch | diff -u ldiff - ; xit=$? ++ then /usr/bin/time -o .time -f '%U' $WIGGLE -dl orig new | diff -u ldiff - ; xit=$? ++ else /usr/bin/time -o .time -f '%U' $WIGGLE -dlp1 orig patch | diff -u ldiff - ; xit=$? + fi + ;; +- reldiff ) /usr/bin/time --quiet -o .time -f '%U' $WIGGLE -dl patch | diff -u reldiff - ; xit=$? ++ reldiff ) /usr/bin/time -o .time -f '%U' $WIGGLE -dl patch | diff -u reldiff - ; xit=$? + ;; +- rediff ) /usr/bin/time --quiet -o .time -f '%U' $WIGGLE -dw patch | diff -u rediff - ; xit=$? ++ rediff ) /usr/bin/time -o .time -f '%U' $WIGGLE -dw patch | diff -u rediff - ; xit=$? + ;; + merge ) if [ -f patch ] +- then /usr/bin/time --quiet -o .time -f '%U' $WIGGLE -m orig patch | diff -u merge - ; xit=$? ++ then /usr/bin/time -o .time -f '%U' $WIGGLE -m orig patch | diff -u merge - ; xit=$? + elif [ -f new ] +- then /usr/bin/time --quiet -o .time -f '%U' $WIGGLE -m orig new new2 | diff -u merge - ; xit=$? +- else /usr/bin/time --quiet -o .time -f '%U' $WIGGLE -m orig | diff -u merge - ; xit=$? ++ then /usr/bin/time -o .time -f '%U' $WIGGLE -m orig new new2 | diff -u merge - ; xit=$? ++ else /usr/bin/time -o .time -f '%U' $WIGGLE -m orig | diff -u merge - ; xit=$? + fi + ;; + replace ) cp orig orig.tmp + if [ -f patch ] +- then /usr/bin/time --quiet -o .time -f '%U' $WIGGLE -mr orig.tmp patch +- else /usr/bin/time --quiet -o .time -f '%U' $WIGGLE -mr orig.tmp new new2 ++ then /usr/bin/time -o .time -f '%U' $WIGGLE -mr orig.tmp patch ++ else /usr/bin/time -o .time -f '%U' $WIGGLE -mr orig.tmp new new2 + fi + diff -u merge orig.tmp ; xit=$? + rm orig.tmp orig.tmp.porig + ;; + lmerge ) if [ -f patch ] +- then /usr/bin/time --quiet -o .time -f '%U' $WIGGLE -ml orig patch | diff -u lmerge - ; xit=$? +- else /usr/bin/time --quiet -o .time -f '%U' $WIGGLE -ml orig new new2 | diff -u lmerge - ; xit=$? ++ then /usr/bin/time -o .time -f '%U' $WIGGLE -ml orig patch | diff -u lmerge - ; xit=$? ++ else /usr/bin/time -o .time -f '%U' $WIGGLE -ml orig new new2 | diff -u lmerge - ; xit=$? + fi + ;; + wmerge ) if [ -f patch ] +- then /usr/bin/time --quiet -o .time -f '%U' $WIGGLE -mw orig patch | diff -u wmerge - ; xit=$? +- else /usr/bin/time --quiet -o .time -f '%U' $WIGGLE -mw orig new new2 | diff -u wmerge - ; xit=$? ++ then /usr/bin/time -o .time -f '%U' $WIGGLE -mw orig patch | diff -u wmerge - ; xit=$? ++ else /usr/bin/time -o .time -f '%U' $WIGGLE -mw orig new new2 | diff -u wmerge - ; xit=$? + fi + ;; + esac + if [ $xit = 0 ]; then msg=SUCCEEDED; else msg=FAILED; fi +- echo $path $msg `cat .time 2> /dev/null` ++ echo $path $msg `grep -v 'Command exited' .time 2> /dev/null` + rm -f .time + exit $xit + ) diff --git a/packages/wiggle/wiggle-0.6/002SpecFile b/packages/wiggle/wiggle-0.6/002SpecFile index e69de29bb2..b88e4394d5 100644 --- a/packages/wiggle/wiggle-0.6/002SpecFile +++ b/packages/wiggle/wiggle-0.6/002SpecFile @@ -0,0 +1,102 @@ +Status: ok + +rpm .spec file and minor ANNOUNCE corrections + +from Horst von Brand + + ----------- Diffstat output ------------ + ./ANNOUNCE | 10 +++++----- + ./wiggle.spec | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 60 insertions(+), 5 deletions(-) + +diff ./ANNOUNCE~current~ ./ANNOUNCE +--- ./ANNOUNCE~current~ 2004-02-03 13:01:02.000000000 +1100 ++++ ./ANNOUNCE 2004-02-03 13:18:38.000000000 +1100 +@@ -1,4 +1,4 @@ +-ANNOUNCE: wiggle - a tools for applying patches with conflicts ++ANNOUNCE: wiggle - a tool for applying patches with conflicts + + I am pleased to announce the first public release of 'wiggle'. + +@@ -7,7 +7,7 @@ apply due to conflicting changes in the + + Wiggle will always apply all changes in the patch to the original. + If it cannot find a way to cleanly apply a patch, it inserts it +-in the original in a manner similar to 'merge', and report an ++in the original in a manner similar to 'merge', and reports an + unresolvable conflict. Such a conflict will look like: + + <<<<<<< +@@ -19,9 +19,9 @@ Some text that the patch changes + Some text that is the result of the patch + >>>>>>> + +-with the meaning that the "text that the patch +-changes" was expected somewhere in the "text from the original +-file" and should be replaced with "the result of the patch". ++with the meaning that the "text that the patch changes" ++was expected somewhere in the "text from the original file" ++and should be replaced with "the result of the patch". + + wiggle analyses the file and the patch in terms of words rather than + whole lines and so is able to find matches that patch is + +diff ./wiggle.spec~current~ ./wiggle.spec +--- ./wiggle.spec~current~ 2004-02-03 13:01:02.000000000 +1100 ++++ ./wiggle.spec 2004-02-03 13:18:38.000000000 +1100 +@@ -0,0 +1,55 @@ ++Summary: A tool for applying patches with conflicts ++Name: wiggle ++Version: 0.6 ++Release: 1 ++License: GPL ++Group: Development/Tools ++URL: http://www.cse.unsw.edu.au/~neilb/source/wiggle/ ++Source0: http://www.cse.unsw.edu.au/~neilb/source/wiggle/%{name}-%{version}.tar.gz ++BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot ++ ++%description ++Wiggle is a program for applying patches that 'patch' cannot ++apply due to conflicting changes in the original. ++ ++Wiggle will always apply all changes in the patch to the original. ++If it cannot find a way to cleanly apply a patch, it inserts it ++in the original in a manner similar to 'merge', and report an ++unresolvable conflict. ++ ++%prep ++%setup -q ++ ++%build ++make BINDIR=/usr/bin \ ++ MANDIR=%{_mandir} MAN1DIR=%{_mandir}/man1 MAN5DIR=%{_mandir}/man5 \ ++ CFLAGS="$RPM_OPT_FLAGS" \ ++ wiggle ++ ++%install ++rm -rf $RPM_BUILD_ROOT ++mkdir -p $RPM_BUILD_ROOT/usr/bin ++mkdir -p $RPM_BUILD_ROOT%{_mandir}/man{1,5} ++ ++make BINDIR=$RPM_BUILD_ROOT/usr/bin \ ++ MANDIR=$RPM_BUILD_ROOT%{_mandir} \ ++ MAN1DIR=$RPM_BUILD_ROOT%{_mandir}/man1 \ ++ MAN5DIR=$RPM_BUILD_ROOT%{_mandir}/man5 \ ++ install ++ ++%clean ++rm -rf $RPM_BUILD_ROOT ++ ++%files ++%defattr(-,root,root,-) ++/usr/bin/wiggle ++%{_mandir}/man1/wiggle.1* ++%doc ANNOUNCE TODO notes ++%doc p p.help ++ ++ ++%changelog ++* Thu May 22 2003 Horst von Brand 0.6-1 ++- Initial build. ++ ++ diff --git a/packages/wiggle/wiggle-0.6/003Recommit b/packages/wiggle/wiggle-0.6/003Recommit index e69de29bb2..fe7dd6d7b5 100644 --- a/packages/wiggle/wiggle-0.6/003Recommit +++ b/packages/wiggle/wiggle-0.6/003Recommit @@ -0,0 +1,68 @@ +Status: ok + +New p command 'recommit' + +p recommit patchname +will apply and commit a series of removed patches. + + ----------- Diffstat output ------------ + ./p | 27 +++++++++++++++++++++++++++ + ./p.help | 8 ++++++++ + 2 files changed, 35 insertions(+) + +diff ./p~current~ ./p +--- ./p~current~ 2004-02-03 13:01:18.000000000 +1100 ++++ ./p 2004-02-03 13:18:44.000000000 +1100 +@@ -596,6 +596,33 @@ case $cmd in + openall ) + while p open last && p discard ; do : ; done + ;; ++ recommit ) ++ make_diff ++ get_meta ++ if [ -s .patches/patch ] ++ then ++ echo >&2 Patch $name already open - please commit ; exit 1; ++ fi ++ if [ $# -eq 0 ] ++ then ++ echo "Unapplied patches are:" ++ ls .patches/removed ++ exit 0 ++ fi ++ if [ $# -ne 1 ] ++ then echo >&2 "Usage: p recommit patchname"; exit 1 ++ fi ++ case $1 in ++ last ) pfile=`ls -d .patches/removed/[0-9]* | tail -1` ; echo last is "$pfile";; ++ */* ) pfile=$1 ;; ++ * ) pfile=`echo .patches/removed/*$1*` ++ esac ++ if [ ! -f "$pfile" ] ++ then echo >&2 "Cannot find unique patch '$1' - found: $pfile"; exit 1 ++ fi ++ while [ -s "$pfile" ] && ++ p apply last && p commit ; do : ; done ++ ;; + snapshot ) + all_files snap_one + ;; + +diff ./p.help~current~ ./p.help +--- ./p.help~current~ 2004-02-03 13:01:18.000000000 +1100 ++++ ./p.help 2004-02-03 13:18:44.000000000 +1100 +@@ -248,6 +248,14 @@ openall + discarded. This is part of the preparation for incorporating + upstream changes. + ++recommit ++ Usage: p recommit patchname ++ ++ This command will re-apply and re-commit removed patches ++ that successfully apply until the names patch has been applied. ++ Patches are applied in reverse order, which is consistant with ++ the order in which they were removed. ++ + snapshot + Usage: p snapshot + diff --git a/packages/wiggle/wiggle-0.6/004ExtractFix b/packages/wiggle/wiggle-0.6/004ExtractFix index e69de29bb2..8ab090992d 100644 --- a/packages/wiggle/wiggle-0.6/004ExtractFix +++ b/packages/wiggle/wiggle-0.6/004ExtractFix @@ -0,0 +1,63 @@ +Status: ok + +Fix off-by-one-error when extracting a merge file. + +If a merge ended at EOF, --extract wouldn't interpret it properly. + + ----------- Diffstat output ------------ + ./extract.c | 8 ++++---- + ./p | 2 +- + 2 files changed, 5 insertions(+), 5 deletions(-) + +diff ./extract.c~current~ ./extract.c +--- ./extract.c~current~ 2004-02-03 13:18:41.000000000 +1100 ++++ ./extract.c 2004-02-03 13:18:55.000000000 +1100 +@@ -207,7 +207,7 @@ int split_merge(struct stream f, struct + lineno++; + switch(state) { + case 0: +- if (len>8 && ++ if (len>=8 && + strncmp(cp, "<<<<<<<", 7)==0 && + (cp[7] == ' ' || cp[7] == '\n') + ) { +@@ -222,7 +222,7 @@ int split_merge(struct stream f, struct + } + break; + case 1: +- if (len>8 && ++ if (len>=8 && + strncmp(cp, "|||||||", 7)==0 && + (cp[7] == ' ' || cp[7] == '\n') + ) { +@@ -232,7 +232,7 @@ int split_merge(struct stream f, struct + copyline(&r1, &cp, end); + break; + case 2: +- if (len>8 && ++ if (len>=8 && + strncmp(cp, "=======", 7)==0 && + (cp[7] == ' ' || cp[7] == '\n') + ) { +@@ -242,7 +242,7 @@ int split_merge(struct stream f, struct + copyline(&r2, &cp, end); + break; + case 3: +- if (len>8 && ++ if (len>=8 && + strncmp(cp, ">>>>>>>", 7)==0 && + (cp[7] == ' ' || cp[7] == '\n') + ) { + +diff ./p~current~ ./p +--- ./p~current~ 2004-02-03 13:18:44.000000000 +1100 ++++ ./p 2004-02-03 13:18:55.000000000 +1100 +@@ -170,7 +170,7 @@ commit_one() + { + rm -f "$1~current~" + mv "$1" "$1~current~" +- cp "$1~current~" $1 ++ cp -p "$1~current~" $1 + chmod u+w $1 + } + diff --git a/packages/wiggle/wiggle-0.6/005Pchanges b/packages/wiggle/wiggle-0.6/005Pchanges index e69de29bb2..46536f22a4 100644 --- a/packages/wiggle/wiggle-0.6/005Pchanges +++ b/packages/wiggle/wiggle-0.6/005Pchanges @@ -0,0 +1,126 @@ +Status: ok + +diff ./p~current~ ./p + + ----------- Diffstat output ------------ + ./p | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---- + 1 files changed, 62 insertions(+), 4 deletions(-) + +diff ./p~current~ ./p +--- ./p~current~ 2004-02-03 13:18:55.000000000 +1100 ++++ ./p 2004-02-03 13:19:20.000000000 +1100 +@@ -146,7 +146,7 @@ all_files() + + diff_one() + { +- if cmp -s "$1~current~" "$1" ++ if cmp -s "$1~current~" "$1" || [ ! -f "$1" -a ! -f "$1~current~" ] + then : + else + echo +@@ -168,10 +168,12 @@ diff_one_orig() + + commit_one() + { +- rm -f "$1~current~" ++ rm -f "$1~current~" ++ if [ -f "$1" ] ; then + mv "$1" "$1~current~" + cp -p "$1~current~" $1 + chmod u+w $1 ++ fi + } + + discard_one() +@@ -623,6 +625,33 @@ case $cmd in + while [ -s "$pfile" ] && + p apply last && p commit ; do : ; done + ;; ++ decommit ) ++ make_diff ++ get_meta ++ if [ -s .patches/patch ] ++ then ++ echo >&2 Patch $name already open - please commit ; exit 1; ++ fi ++ if [ $# -eq 0 ] ++ then ++ echo "Applied patches are:" ++ ls .patches/applied ++ exit 0 ++ fi ++ if [ $# -ne 1 ] ++ then echo >&2 "Usage: p decommit patchname"; exit 1 ++ fi ++ case $1 in ++ last ) pfile=`ls -d .patches/applied/[0-9]* | tail -1` ; echo last is "$pfile";; ++ */* ) pfile=$1 ;; ++ * ) pfile=`echo .patches/applied/*$1*` ++ esac ++ if [ ! -f "$pfile" ] ++ then echo >&2 "Cannot find unique patch '$1' - found: $pfile"; exit 1 ++ fi ++ while [ -s "$pfile" ] && ++ p open last && p discard ; do : ; done ++ ;; + snapshot ) + all_files snap_one + ;; +@@ -653,6 +682,12 @@ case $cmd in + cd .patches/SOURCE && bk pull + ;; + update ) ++ make_diff ++ get_meta ++ if [ -s .patches/patch ] ++ then ++ echo >&2 Patch $name already open - please commit; exit 1; ++ fi + p openall && p clean && + (cd .patches/SOURCE ; bk export -tpatch -rLATEST, ) > .patches/imported-patch && + patch --dry-run -f -p1 < .patches/imported-patch && +@@ -678,9 +713,32 @@ case $cmd in + echo "Your address and other headers must be in .patches/owner" + exit 1; + fi ++ messid="<`date +'%Y%m%d%H%M%S'`.$$.patches@`uname -n`>" + cnt=$(ls .patches/applied/???${1}* | wc -l) + cnt=$(echo $cnt) # discard spaces + this=1 ++ { ++ cat .patches/owner ++ echo "To: `cat .patches/maintainer`" ++ if [ -s .patches/cc ] ; then ++ while read word prefix addr ++ do if [ " $word" = " $1" ] ; then ++ echo "Cc: $addr" ++ sprefix="$prefix - " ++ fi ++ done < .patches/cc ++ fi ++ if [ $cnt = 1 ] ++ then ++ echo "Subject: [PATCH] $sprefix Intro" ++ else ++ echo "Subject: [PATCH] ${sprefix}0 of $cnt - Introduction" ++ fi ++ echo "Message-ID: $messid" ++ echo ++ echo PUT COMMENTS HERE ++ } > .patches/mail/000Intro ++ + for patch in .patches/applied/???${1}* + do + { +@@ -702,9 +760,9 @@ case $cmd in + else + echo "Subject: [PATCH] $sprefix$this of $cnt - $head" + fi ++ echo "References: $messid" + echo +- echo '### Comments for ChangeSet' +- sed -e '1,/^[^S]/d' $patch ++ sed -e '1,3d' $patch + } > .patches/mail/${patch#.patches/applied/} + this=$(expr $this + 1) + done -- cgit v1.2.3