OBS User unknown 2007-01-15 23:34:53 +00:00 committed by Git OBS Bridge
commit 28f640ff24
10 changed files with 2171 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

50
docdir.diff Normal file
View File

@ -0,0 +1,50 @@
Index: quilt-0.46/Makefile.in
===================================================================
--- quilt-0.46.orig/Makefile.in
+++ quilt-0.46/Makefile.in
@@ -257,7 +257,7 @@ $(patsubst %.in,%,$(wildcard bin/*.in qu
-e 's:@VERSION''@:$(VERSION):g' \
-e 's:@RELEASE''@:$(RELEASE):g' \
-e 's:@LOCALEDIR''@:$(localedir):g' \
- -e 's:@DOCSUBDIR''@:$(docdir)/$(PACKAGE)-$(VERSION):g' \
+ -e 's:@DOCSUBDIR''@:$(docdir)/$(PACKAGE):g' \
$< > $@
@$(if $(filter-out $<,$(NON_EXEC_IN)),chmod +x $@)
@@ -316,11 +316,11 @@ endif
$(INSTALL) -d $(BUILD_ROOT)$(libdir)/$(PACKAGE)
$(INSTALL) -m 755 $(LIB:%=lib/%) $(BUILD_ROOT)$(libdir)/$(PACKAGE)/
- $(INSTALL) -d $(BUILD_ROOT)$(docdir)/$(PACKAGE)-$(VERSION)/
+ $(INSTALL) -d $(BUILD_ROOT)$(docdir)/$(PACKAGE)/
$(INSTALL) -m 644 doc/README \
- $(BUILD_ROOT)$(docdir)/$(PACKAGE)-$(VERSION)/
+ $(BUILD_ROOT)$(docdir)/$(PACKAGE)/
$(INSTALL) -m 644 doc/quilt.pdf doc/README.MAIL \
- $(BUILD_ROOT)$(docdir)/$(PACKAGE)-$(VERSION)/
+ $(BUILD_ROOT)$(docdir)/$(PACKAGE)/
$(INSTALL) -d $(BUILD_ROOT)$(mandir)/man1
$(INSTALL) -m 644 $(MAN1) $(BUILD_ROOT)$(mandir)/man1/
@@ -356,7 +356,7 @@ uninstall ::
$(notdir $(MAN1))) \
$(BUILD_ROOT)$(etcdir)/bash_completion.d/quilt \
$(BUILD_ROOT)$(etcdir)/quilt.quiltrc \
- $(BUILD_ROOT)$(docdir)/$(PACKAGE)-$(VERSION)/
+ $(BUILD_ROOT)$(docdir)/$(PACKAGE)/
check: $(TESTS:test/%.test=test/.%.ok)
check-all: $(TESTS:test/%.test=check-%)
Index: quilt-0.46/doc/quilt.1.in
===================================================================
--- quilt-0.46.orig/doc/quilt.1.in
+++ quilt-0.46/doc/quilt.1.in
@@ -212,7 +212,7 @@ the pdf documentation, and in the help m
.SH SEE ALSO
-The pdf documentation, which should be under /usr/share/doc/quilt/quilt.pdf.
+The pdf documentation, which should be under /usr/share/doc/packages/quilt/quilt.pdf.
Note that some distributors compress this file.
.BR zxpdf ( 1 )
can be used to display compressed pdf files.

367
expand.diff Normal file
View File

@ -0,0 +1,367 @@
Index: quilt-0.46/quilt/expand.in
===================================================================
--- /dev/null
+++ quilt-0.46/quilt/expand.in
@@ -0,0 +1,236 @@
+#! @BASH@
+
+# This script is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# See the COPYING and AUTHORS files for more details.
+
+# Read in library functions
+if [ "$(type -t patch_file_name)" != function ]
+then
+ if ! [ -r $QUILT_DIR/scripts/patchfns ]
+ then
+ echo "Cannot read library @SCRIPTS@/patchfns" >&2
+ exit 1
+ fi
+ . $QUILT_DIR/scripts/patchfns
+fi
+
+usage()
+{
+ printf $"Usage: quilt expand [patch]\n"
+ if [ x$1 = x-h ]
+ then
+ printf $"
+Expand the topmost or specified collapsed patch into its individual patches.
+"
+ exit 0
+ else
+ exit 1
+ fi
+}
+
+fill_orig() {
+ local orig=$1 patch exclude
+
+ cp -rld "$QUILT_PC/$combined_patch" "$orig"
+
+ for patch in $(patches_after "$combined_patch")
+ do
+ is_applied "$patch" || break
+ ( cd "$QUILT_PC/$patch" \
+ && find -type f \
+ | xargs -r cp -il --parents --target-directory "$orig" \
+ 2> /dev/null
+ )
+ done
+
+ if [ ${QUILT_PATCHES:0:1} != / ]
+ then
+ exclude="$exclude"'-path "./$QUILT_PATCHES" -prune -o '
+ fi
+ if [ ${QUILT_PC:0:1} != / ]
+ then
+ exclude="$exclude"'-path "./$QUILT_PC" -prune -o '
+ fi
+ eval find $exclude -type f -print \
+ | xargs -r cp -il --parents --target-directory "$orig" \
+ 2> /dev/null
+
+ find "$orig" -size 0 \
+ | xargs -r rm -f
+}
+
+move_pc_dirs() {
+ local pc_dir=$1
+
+ for ((n = 0; n < ${#patches[@]}; n++))
+ do
+ mkdir -p $(dirname "$QUILT_PC/${patches[n]}") \
+ && mv "$pc_dir/${patches[n]}" "$QUILT_PC/${patches[n]}" \
+ || return 1
+ done
+}
+
+expand_in_list() {
+ local series=$1 replace=$2 tmpfile=$(gen_tempfile $series.XXXXXX)
+ awk '
+ /^'"$(quote_re $combined_patch)"'([ \t]|$)/ \
+ { print patches
+ replaced++
+ next }
+ { print }
+ END { exit (replaced != 1) }
+ ' patches="$replace" \
+ < $series > $tmpfile
+ if [ $? = 0 ]
+ then
+ mv $tmpfile $series
+ else
+ rm -f $tmpfile
+ return 1
+ fi
+}
+
+options=`getopt -o h --long help: -- "$@"`
+
+if [ $? -ne 0 ]
+then
+ usage
+fi
+
+eval set -- "$options"
+
+while true
+do
+ case "$1" in
+ -h)
+ usage -h ;;
+ --)
+ shift
+ break ;;
+ esac
+done
+
+if [ $# -gt 1 ]
+then
+ usage
+fi
+
+if [ -n "$1" ]
+then
+ if ! combined_patch=$(find_patch $1)
+ then
+ printf $"Patch %s is not in series file\n" "$1" >&2
+ exit 1
+ fi
+else
+ if ! combined_patch=$(top_patch)
+ then
+ printf $"No patches applied\n" >&2
+ exit 1
+ fi
+fi
+
+combined_series=$(patch_file_name $combined_patch \
+ | sed -e 's:\.gz$::' -e 's:\.bz2$::').series
+
+if ! [ -f "$combined_series" ]
+then
+ printf $"Patch %s is not a combined patch\n" "$(print_patch "$1")"
+ exit 1
+fi
+
+patches=( $(sed -e $'s:[ \t].*::' $combined_series) )
+
+if ! is_applied "$combined_patch"
+then
+ for ((n = 0; n < ${#patches[@]}; n++))
+ do
+ printf $"Applying patch %s\n" "$(print_patch "${patches[n]}")"
+ done
+ if ! expand_in_list "$SERIES" "$(< "$combined_series")"
+ then
+ printf "Expanding %s failed\n" \
+ "$(print_patch "$combined_patch")"
+ exit 1
+ fi
+ exit 0
+fi
+
+for ((n = 0; n < ${#patches[@]}; n++))
+do
+ patch=${patches[n]}
+ if ! [ -e "$(patch_file_name "$patch")" ]
+ then
+ printf $"Component patch %s of %s not found\n" "$patch" \
+ "$(print_patch "$combined_patch")"
+ exit 1
+ fi
+ if is_applied "$patch"
+ then
+ printf $"Component patch %s of %s appears to be applied\n" \
+ "$(print_patch "$patch")" \
+ "$(print_patch "$combined_patch")"
+ exit 1
+ fi
+done
+
+tmpdir=$(gen_tempfile -d $QUILT_PC/expand)
+trap "rm -rf $tmpdir" EXIT
+
+[ "${tmpdir:0:1}" = / ] || tmpdir=$PWD/$tmpdir
+
+fill_orig $tmpdir/orig
+cp -rld $tmpdir/orig $tmpdir/tree
+
+for ((n = 0; n < ${#patches[@]}; n++))
+do
+ patch=${patches[n]}
+ pc_dir=$tmpdir/pc/$patch
+ patch_args=$(SERIES=$combined_series; patch_args $patch)
+
+ printf $"Applying patch %s\n" "$(print_patch "$patch")"
+ if ! cat_file "$(patch_file_name "$patch")" \
+ | patch $QUILT_PATCH_OPTS $patch_args \
+ --backup --prefix="$pc_dir/" \
+ -Efs -d "$tmpdir/tree" >/dev/null
+ then
+ printf $"Patch %s does not apply; aborting expand\n" \
+ "$(print_patch "$patch")"
+ exit 1
+ fi
+ touch $pc_dir/.timestamp
+done
+
+printf $"Verifying against patch %s\n" "$(print_patch "$combined_patch")"
+if ! cat_file "$(patch_file_name "$combined_patch")" \
+ | patch $QUILT_PATCH_OPTS $(patch_args $combined_patch) \
+ --no-backup-if-mismatch -Efs -d "$tmpdir/orig" >/dev/null
+then
+ printf $"Patch %s does not apply; aborting expand\n" \
+ "$(print_patch "combined_patch")"
+ exit 1
+fi
+
+if ! diff -Nqr "$tmpdir/orig" "$tmpdir/tree" > /dev/null
+then
+ diff -Nur "$tmpdir/orig" "$tmpdir/tree"
+ printf $"The patches do not add up to the combined patch\n"
+ exit 1
+fi
+
+if ! move_pc_dirs "$tmpdir/pc" ||
+ ! expand_in_list $DB "$(sed -e $'s:[ \t].*::' "$combined_series")" ||
+ ! expand_in_list "$SERIES" "$(< "$combined_series")" ||
+ ! rm -rf $QUILT_PC/$combined_patch
+then
+ printf "Expanding %s failed\n" "$(print_patch "$combined_patch")"
+ exit 1
+fi
+
+### Local Variables:
+### mode: shell-script
+### End:
+# vim:filetype=sh
Index: quilt-0.46/test/expand.test
===================================================================
--- /dev/null
+++ quilt-0.46/test/expand.test
@@ -0,0 +1,121 @@
+ $ rm -rf d
+ $ mkdir -p d/patches
+ $ cd d
+
+ $ echo not part of any > patch
+ $ echo foo > foo
+ $ echo bar > bar
+ $ echo void > void
+ $ quilt new patch1
+ > Patch patches/patch1 is now on top
+
+ $ quilt add foo
+ > File foo added to patch patches/patch1
+
+ $ echo foo2 > foo
+ $ quilt refresh
+ > Refreshed patch patches/patch1
+
+ $ quilt new subdir/patch2
+ > Patch patches/subdir/patch2 is now on top
+
+ $ quilt add bar void
+ > File bar added to patch patches/subdir/patch2
+ > File void added to patch patches/subdir/patch2
+
+ $ echo bar2 > bar
+ $ rm void
+ $ quilt refresh
+ > Refreshed patch patches/subdir/patch2
+
+ $ quilt diff -p0 --combine - --no-index > patches/combined
+ $ quilt pop -qa
+ > Removing patch patches/subdir/patch2
+ > Removing patch patches/patch1
+ > No patches applied
+
+ $ mv patches/series patches/combined.series
+ $ echo combined -p0 > patches/series
+ $ quilt push -q
+ > Applying patch patches/combined
+ > Now at patch patches/combined
+
+ $ quilt expand
+ > Applying patch patches/patch1
+ > Applying patch patches/subdir/patch2
+ > Verifying against patch patches/combined
+
+ $ quilt series
+ > patches/patch1
+ > patches/subdir/patch2
+
+ $ quilt pop -qaR
+ > Removing patch patches/subdir/patch2
+ > Removing patch patches/patch1
+ > No patches applied
+
+ $ quilt push -qa
+ > Applying patch patches/patch1
+ > Applying patch patches/subdir/patch2
+ > Now at patch patches/subdir/patch2
+
+ $ quilt new patch3
+ > Patch patches/patch3 is now on top
+
+ $ quilt add void
+ > File void added to patch patches/patch3
+
+ $ echo void > void
+ $ quilt refresh -p0
+ > Refreshed patch patches/patch3
+
+ $ mkdir -p patches/subdir2
+ $ quilt diff -p1 --combine - --no-index > patches/subdir2/combined2
+ $ quilt pop -qaR
+ > Removing patch patches/patch3
+ > Removing patch patches/subdir/patch2
+ > Removing patch patches/patch1
+ > No patches applied
+
+ $ mv patches/series patches/subdir2/combined2.series
+ $ echo subdir2/combined2 > patches/series
+ $ quilt push -q
+ > Applying patch patches/subdir2/combined2
+ > Now at patch patches/subdir2/combined2
+
+ $ quilt expand
+ > Applying patch patches/patch1
+ > Applying patch patches/subdir/patch2
+ > Applying patch patches/patch3
+ > Verifying against patch patches/subdir2/combined2
+
+ $ quilt series
+ > patches/patch1
+ > patches/subdir/patch2
+ > patches/patch3
+
+ $ quilt pop -qaR
+ > Removing patch patches/patch3
+ > Removing patch patches/subdir/patch2
+ > Removing patch patches/patch1
+ > No patches applied
+
+ $ cat foo bar void
+ > foo
+ > bar
+ > void
+
+ $ echo subdir2/combined2 > patches/series
+
+ $ quilt expand subdir2/combined2
+ > Applying patch patches/patch1
+ > Applying patch patches/subdir/patch2
+ > Applying patch patches/patch3
+
+ $ quilt series
+ > patches/patch1
+ > patches/subdir/patch2
+ > patches/patch3
+
+ $ cd ..
+ $ rm -rf d

90
patch-wrapper-rpm.diff Normal file
View File

@ -0,0 +1,90 @@
Index: quilt-0.46/bin/patch-wrapper.in
===================================================================
--- quilt-0.46.orig/bin/patch-wrapper.in
+++ quilt-0.46/bin/patch-wrapper.in
@@ -27,7 +27,7 @@ then
fi
backup_files() {
- declare dir=${QUILT_PC:-.pc}/$patch
+ declare dir=${QUILT_PC:-.pc}/$name
if [ "$backup_mode" = --backup-if-mismatch ]
then
@@ -195,39 +195,56 @@ then
fi
quilt_patches=${QUILT_PATCHES:-patches}
-dir=$(dirname "$quilt_patches/$patch")
-mkdir -p "$dir"
-if [ -e "$patch" ]
+
+if [ "${patch#$RPM_SOURCE_DIR}" != "$patch" ]
+then
+ name=SOURCES/${patch#$RPM_SOURCE_DIR/}
+ if [ ! -e "$quilt_patches/SOURCES" ]
+ then
+ mkdir -p "$quilt_patches"
+ ln -s $RPM_SOURCE_DIR "$quilt_patches/SOURCES"
+ fi
+elif [ "${patch#$RPM_BUILD_DIR}" != "$patch" ]
then
+ name=BUILD/${patch#$RPM_BUILD_DIR/}
+ if [ ! -e "$quilt_patches/BUILD" ]
+ then
+ mkdir -p "$quilt_patches"
+ ln -s $RPM_BUILD_DIR "$quilt_patches/BUILD"
+ fi
+else
+ name=${patch#/}
+ dir=$(dirname "$quilt_patches/$name")
+ mkdir -p "$dir"
+
if [ "${patch:0:1}" = / ]
then
- ln -s "$patch" "$quilt_patches$patch"
- patch=${patch#/}
+ ln -s "$patch" "$quilt_patches/${name#/}"
else
- while ! [ "$dir/$updir$patch" -ef "$patch" ]
+ while ! [ "$dir/$updir$name" -ef "$patch" ]
do
updir=$updir../
[ ${#updir} -gt 96 ] && break
done
- if [ "$dir/$updir$patch" -ef "$patch" ]
+ if [ "$dir/$updir$name" -ef "$patch" ]
then
- ln -s "$updir$patch" "$quilt_patches/$patch"
+ ln -s "$updir$patch" "$quilt_patches/$name"
fi
fi
fi
if [ "$opt_strip" = -p1 ]; then
- echo "$patch"
+ echo "$name"
else
- echo "$patch $opt_strip"
+ echo "$name $opt_strip"
fi >> $quilt_patches/series
-$PATCH "${new_options[@]}" --backup --prefix "${QUILT_PC:-.pc}/$patch/" \
+$PATCH "${new_options[@]}" --backup --prefix "${QUILT_PC:-.pc}/$name/" \
| backup_files
status=${PIPESTATUS[0]}
if [ $status -eq 0 ]
then
- dir=${QUILT_PC:-.pc}/$patch
+ dir=${QUILT_PC:-.pc}/$name
if [ ! -e "$dir" ]
then
mkdir -p "$dir"
@@ -237,6 +254,6 @@ then
then
echo 2 > ${QUILT_PC:-.pc}/.version
fi
- echo "$patch" >> "${QUILT_PC:-.pc}/applied-patches"
+ echo "$name" >> "${QUILT_PC:-.pc}/applied-patches"
fi
exit $status

3
quilt-0.46.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:11e896e80663a8ab9aebd27407c8db731903effcf3863516c1b0f6553a1b938c
size 369012

718
quilt.changes Normal file
View File

@ -0,0 +1,718 @@
-------------------------------------------------------------------
Thu Oct 19 20:47:06 CEST 2006 - agruen@suse.de
- Switch to the upstream 0.46 tarball.
- Add a few missing pieces in the "refresh -z" patch.
-------------------------------------------------------------------
Wed Oct 11 15:44:47 CEST 2006 - agruen@suse.de
- Update to version 0.46.
- Add patch for "refresh -z".
-------------------------------------------------------------------
Wed Sep 27 16:20:45 CEST 2006 - agruen@suse.de
- Remove a duplicate hunk from the last update.
-------------------------------------------------------------------
Thu Sep 21 18:39:22 CEST 2006 - agruen@suse.de
- Fix the docdir in the man page.
-------------------------------------------------------------------
Wed May 31 17:21:43 CEST 2006 - agruen@suse.de
- Fix `quilt setup' in build environments.
-------------------------------------------------------------------
Mon Apr 24 15:25:28 CEST 2006 - jdelvare@suse.de
- import-compressed.diff: Fix replacement of compressed patches.
-------------------------------------------------------------------
Wed Apr 19 15:00:27 CEST 2006 - agruen@suse.de
- pop-error-path-fix.diff: Fix bogus error message.
-------------------------------------------------------------------
Sat Mar 25 21:09:08 CET 2006 - agruen@suse.de
- mail command: Use -gt instead of > in [ ... ] expression.
Fix quoting of recipients.
-------------------------------------------------------------------
Tue Mar 21 16:55:34 CET 2006 - agruen@suse.de
- edit2.diff: The last fix broke another way of using edit.
-------------------------------------------------------------------
Wed Mar 15 20:36:38 CET 2006 - agruen@suse.de
- edit.diff: Fix editing files in subdirectories.
-------------------------------------------------------------------
Thu Feb 16 09:15:28 CET 2006 - agruen@suse.de
- Setup command: also recognize archive files passed to tar on the
command line.
-------------------------------------------------------------------
Wed Feb 15 09:52:26 CET 2006 - agruen@suse.de
- Bump to official version to 0.44.
- Stop using bash's =~ operator: older versions don't support it.
- Translation update.
- patch-wrapper-rpm.diff: Some fixes to make the patch names that
quilt shows more convenient.
- Remove unnecessary gawk wrapper.
-------------------------------------------------------------------
Tue Feb 14 05:16:59 CET 2006 - agruen@suse.de
- Fix a critical bug in the push command that causes parts of
patches to end up half-reversed.
-------------------------------------------------------------------
Mon Feb 13 00:35:11 CET 2006 - agruen@suse.de
- quiltrc.diff: Change the default patch options to
--ignore-whitespace --unified-reject.
-------------------------------------------------------------------
Sun Feb 12 01:09:09 CET 2006 - agruen@suse.de
- Fix two bash 3.1 compatibility bugs.
- Run the test suite after building.
-------------------------------------------------------------------
Sat Feb 11 16:22:59 CET 2006 - agruen@suse.de
- Fix bug when working in subdirectories.
- setup command: Improvements when a series file is given.
- Improve help of new command, add two test cases.
- Fix expand command.
-------------------------------------------------------------------
Wed Feb 8 02:59:10 CET 2006 - agruen@suse.de
- GNU patch wrapper: Fix permissions of installed file. Call
GNU patch by absolute patch to avoid recursion. Don't print an
error message when a patch contains no files.
- setup command: Improve recognition of patch's -i and --input
options.
-------------------------------------------------------------------
Mon Feb 6 12:05:16 CET 2006 - agruen@suse.de
- Add GNU patch wrapper for Autobuild.
-------------------------------------------------------------------
Sat Feb 4 08:39:25 CET 2006 - agruen@suse.de
- aclocal.m4 is missing from the tarball.
- quilt mail: Remove a broken check.
-------------------------------------------------------------------
Wed Feb 1 16:21:37 CET 2006 - agruen@suse.de
- Update to version 0.43.
- Translations update; more portability improvements.
-------------------------------------------------------------------
Mon Jan 30 00:08:39 CET 2006 - agruen@suse.de
- Mail command: add heuristic for automatically extracting
subjects. Check for duplicate subjects. Add some checks.
- Lots of smaller fixes and portability improvements here and
there.
-------------------------------------------------------------------
Wed Jan 25 21:41:03 CET 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
-------------------------------------------------------------------
Mon Jan 23 21:46:29 CET 2006 - agruen@suse.de
- When a patch doesn't apply, check and report when it applies
in the reverse order (which probably means it already has been
applied).
- Put "---" markers above when inserting a diffstat section.
- A lot more portability fixes.
-------------------------------------------------------------------
Sun Jan 22 02:53:45 CET 2006 - agruen@suse.de
- Lots of improvements: command parameter handling, input command,
portability, test suite.
-------------------------------------------------------------------
Wed Jan 18 14:19:22 CET 2006 - agruen@suse.de
- setup command: add heuristic to check for input files specified
on the command line in the tar/patch wrapper.
- Translation update.
- Fix heuristic for splitting a patch into header and body for
git.
- Makefile and test suite improvements.
-------------------------------------------------------------------
Mon Jan 9 00:46:26 CET 2006 - agruen@suse.de
- Use the --with-sendmail configure option for sendmail, instead
of the removed --with-mta.
-------------------------------------------------------------------
Thu Dec 1 12:34:52 CET 2005 - agruen@suse.de
- Specify where diffstat will end up so that it will be supported
even though it is missing in the build environment.
-------------------------------------------------------------------
Mon Nov 28 04:54:41 CET 2005 - agruen@suse.de
- CVS update, including a bugfix with -p0 style patches that
remove files.
- Add an expand command that is not yet upstream.
-------------------------------------------------------------------
Thu Sep 29 11:57:56 CEST 2005 - agruen@suse.de
- Add README.MAIL and fix the documentation path that appears in
quilt(1).
-------------------------------------------------------------------
Wed Sep 28 16:17:34 CEST 2005 - meissner@suse.de
- use RPM_OPT_FLAGS
-------------------------------------------------------------------
Sun Sep 18 18:49:42 CEST 2005 - agruen@suse.de
- CVS update.
- doc/quilt.quiltrc no longer exists.
- Skip the dead-symlink check: the mta symlink points to sendmail,
which we don't want to depend on.
-------------------------------------------------------------------
Fri Sep 16 18:41:23 CEST 2005 - agruen@suse.de
- Remove obsolete doc/sample.quiltrc.
-------------------------------------------------------------------
Thu Sep 15 15:26:56 CEST 2005 - agruen@suse.de
- CVS update.
-------------------------------------------------------------------
Wed Aug 24 16:57:29 CEST 2005 - agruen@suse.de
- CVS update.
-------------------------------------------------------------------
Wed Aug 17 12:32:36 CEST 2005 - agruen@suse.de
- CVS update.
-------------------------------------------------------------------
Wed Jul 27 18:15:20 CEST 2005 - agruen@suse.de
- Update to version 0.42.
-------------------------------------------------------------------
Mon Jul 18 17:06:11 CEST 2005 - agruen@suse.de
- Update to version 0.41: new header command, several fixes.
-------------------------------------------------------------------
Fri Jun 17 17:43:42 CEST 2005 - agruen@suse.de
- cvs.diff: Update to CVS head.
- annotate.diff: Add experimental annotate command.
-------------------------------------------------------------------
Fri Apr 29 09:39:45 CEST 2005 - agruen@suse.de
- Update to version 0.40.
-------------------------------------------------------------------
Fri Feb 25 14:00:33 CET 2005 - agruen@suse.de
- Remove unneeded requirement on the gettext package.
-------------------------------------------------------------------
Fri Feb 18 11:01:57 CET 2005 - agruen@suse.de
- quilt add: Add check to ensure that no files below patches/
or .pc/ will be added.
-------------------------------------------------------------------
Thu Feb 10 11:50:39 CET 2005 - agruen@suse.de
- Update to version 0.39.
-------------------------------------------------------------------
Wed Feb 2 01:35:51 CET 2005 - agruen@suse.de
- Use color defaults so that QUILT_COLORS can be used to only
override some colors.
- When checking for remaining changes (refresh forgotten), use
$QUILT_PATCH_OPTS as in the push command to get identical
results. Don't generate the actually diff; it doesn't get
printed anyway. This should speed up things.
-------------------------------------------------------------------
Tue Jan 25 13:53:23 CET 2005 - agruen@suse.de
- Fix pop command for recent coreutils (cp dir dir2/ no longer
works if dir2 doesn't yet exist).
-------------------------------------------------------------------
Mon Jan 24 15:42:17 CET 2005 - agruen@suse.de
- Make "vi" an alias for the edit command.
-------------------------------------------------------------------
Sun Jan 23 19:28:40 CET 2005 - agruen@suse.de
- Add color support for push command output and allow to customize
colors via the QUILT_COLORS environment variable (for reverse
video, etc.).
-------------------------------------------------------------------
Sun Jan 23 05:08:18 CET 2005 - agruen@suse.de
- Add mail command, doc/README.MAIL and example ``mail'' command
filter in quilt.quiltrc.
- Bump version to 0.38.
-------------------------------------------------------------------
Tue Jan 11 04:11:14 CET 2005 - agruen@suse.de
- Add a default /etc/quilt.quiltrc file that is sourced if no
~/.quiltrc file exists.
-------------------------------------------------------------------
Fri Nov 19 13:05:08 CET 2004 - agruen@suse.de
- Push command: Write out output of patch process immediately
instead of reading into a variable and then printing that
variable. This helps to see what's happening with large patches.
-------------------------------------------------------------------
Wed Nov 17 17:33:56 CET 2004 - agruen@suse.de
- Get rid of the apatch and rpatch helper scripts: Integrate them
in the push and pop commands. This should bring a small
performance improvement.
-------------------------------------------------------------------
Mon Nov 15 21:15:43 CET 2004 - agruen@suse.de
- Fix extra trailing space in series file after quilt refresh
(David Vrabel <dvrabel@arcom.com>).
- Missing quotation in bash_completion
(Axel Grossklaus <ag@pre-secure.de>).
- Fix patches command (Brent Casavant <bcasavan@sgi.com>).
-------------------------------------------------------------------
Sun Oct 17 18:48:59 CEST 2004 - agruen@suse.de
- Touch timestamps of files in ``quilt pop'' so that tools like
make don't get confused.
- Various minor fixes; update to version 0.37.
-------------------------------------------------------------------
Wed Sep 22 14:26:37 CEST 2004 - agruen@suse.de
- Various fixes; update to version 0.36.
-------------------------------------------------------------------
Fri Sep 3 18:07:55 CEST 2004 - agruen@suse.de
- Fix ``quilt setup'' command when used inside Autobuild: Make
sure rpmbuild does not reset PATH.
-------------------------------------------------------------------
Fri Aug 13 20:14:03 CEST 2004 - agruen@suse.de
- Improvements to setup command.
-------------------------------------------------------------------
Thu Jul 15 04:00:03 CEST 2004 - agruen@suse.de
- Improve messages and update translations.
- Update and improve the bash completion script.
- Add syntax coloring to diff command.
- Add support for QUILT_${COMMAND}_ARGS in .quiltrc.
- Add QUILT_PATCHES_PREFIX option to .quiltrc.
- Support combined diff format and allow the user to adjust
the number of context lines.
- Re-add diffstat support to refresh command.
- Documentation update.
- Bump version to 0.35.
-------------------------------------------------------------------
Thu Jun 10 22:08:07 CEST 2004 - agruen@suse.de
- Add meta-data version check/upgrade code from Martin Quinson and
me; new `quilt upgrade' command.
- Handle new/removed files correctly in generated patches: If the
old or new file is missing, the file name in the patch should
be /dev/null. Fix test suite accordingly, and add
test/create-delete.diff. GNU patch recognizes this, and does
additional file existance tests when a patch creates/deletes a
file. Also use the --label option of GNU diff instead of
hand-editing file name headers.
- Add test/Makefile for running the test suite. Note: The tests
run against the installed version of quilt!
- Bump version to 0.34.
-------------------------------------------------------------------
Sun Jun 6 20:16:44 CEST 2004 - agruen@suse.de
- Preserve the order of files in patches in the diff and refresh
commands. Files added to a patch appear at the end of a patch.
The files command also lists the files in the order in which
they appear in patches.
- Update to version 0.33.
-------------------------------------------------------------------
Sun Jun 6 12:21:11 CEST 2004 - agruen@suse.de
- dependency-graph: Fix for --lines option in patcher mode;
restrict to applied patches.
-------------------------------------------------------------------
Sun Jun 6 03:35:32 CEST 2004 - agruen@suse.de
- import: Create patches/ and parent directories to patch to be
imported. Insert the correct patch name in the series file.
-------------------------------------------------------------------
Sun Jun 6 02:02:32 CEST 2004 - agruen@suse.de
- backup-file.c: Add code to recursively search .pc directories.
Add a "no-op" mode as default, and allow to just unlink files.
- apatch/rpatch: let backup-files search .pc directories instead
of generating temporary file lists.
- rpatch/pop: unlink files of topmost patch after popping instead
of unlinking at each step.
- If QUILTRC is set in the environment, use this as the
configuration file.
-------------------------------------------------------------------
Sat Jun 5 16:12:17 CEST 2004 - agruen@suse.de
- Return exit status 2 when commands go beyond the series (top
with no series, push/next when all patches are applied, pop/
previous when no patches are applied).
- From John Lenz <jelenz@students.wisc.edu>: Add compatibility
code to the dependency-graph script for reading the meta-data
of Holger Schurig's patcher tool,
http://www.holgerschurig.de/patcher.html.
- Update German translation.
-------------------------------------------------------------------
Tue Jun 1 22:59:41 CEST 2004 - agruen@suse.de
- Fix from Dean Roehrich <roehrich@sgi.com>: Preserve file mode
of original file when creating backup files.
-------------------------------------------------------------------
Tue Jun 1 10:23:01 PDT 2004 - mquinson@tuxfamily.org
- document common options to all scripts (--trace and --quiltrc)
- update french translation
-------------------------------------------------------------------
Mon May 31 17:29:45 CEST 2004 - agruen@suse.de
- Rewrite spec2series to return what the new `quilt setup' needs,
and rename it to inspect.
- `quilt setup': Rewrite so that it supports multiple archives
per spec file. Always make the patches directory a symlink to
the original patch files instead of copying the patches.
-------------------------------------------------------------------
Sun May 16 01:33:50 CEST 2004 - agruen@suse.de
- Allow passing path arguments to `quilt grep' as well.
-------------------------------------------------------------------
Mon May 10 17:21:53 CEST 2004 - agruen@suse.de
- Add `quilt grep': Grep over all files, recursively, skipping
the $QUILT_PATCHES and $QUILT_PC directories.
-------------------------------------------------------------------
Wed Apr 28 00:46:31 CEST 2004 - agruen@suse.de
- Fix `quilt fork': It destroys .pc/applied patches; that bug got
introduced when reverting it to its previous semantics.
-------------------------------------------------------------------
Sat Mar 20 21:17:47 CET 2004 - agruen@suse.de
- Fix an algorithmic bug in `quilt graph --lines': Edges were
sometimes lost.
-------------------------------------------------------------------
Mon Mar 15 00:10:58 CET 2004 - agruen@suse.de
- CVS update:
+ Add `quilt graph' command for generating a dependency graph
between patches. This requires the graphviz package for
removing transitive edges (optional) and for rendering the
graph. Please note that the graph command itself is minimal,
while the underlying scripts/dependency+graph is more
flexible.
+ Complete one more detail in scripts/dependency-graph.
+ Revert `quilt fork' to how it originally worked: fork the
*topmost* patch, not the next unapplied patch. Adapt the
test suite accordingly.
+ Add flag to backup-files.c to make sure that files in the
working tree have a link count of at most one. Use this where
appropriate.
+ Fix a bug in `quilt snapshot': Taking snapshots caused files
to get link counts bigger than one, so modifying them could
cause multiple files to get modified. Speed up the command,
too.
+ Update the documentation. Add example1.test from the
documentation.
+ Change `quilt import' to allow importing multiple patches
at once.
+ Update to version 0.32.
-------------------------------------------------------------------
Wed Mar 10 11:20:09 CET 2004 - agruen@suse.de
- Quilt push/pop: exit with a non-zero status when beyond series.
- Ignore empty lines in series file.
- Add man page to tarball and to spec file; add make dependencies.
- Sort the commands in the man page command reference.
- Add completion to the edit command in bash
- Add a man page (generated automatically from -h)
- Sub-directory support: `quilt setup' could get confused, too.
-------------------------------------------------------------------
Tue Mar 9 02:03:00 CET 2004 - agruen@suse.de
- Fix typo: use chmod instead of chown...
-------------------------------------------------------------------
Fri Mar 5 13:33:45 CET 2004 - agruen@suse.de
- Make files writeable in `quilt add' (and `quilt edit') for
working with read-only trees.
-------------------------------------------------------------------
Fri Feb 20 15:32:06 CET 2004 - agruen@suse.de
- Sub-directory support:
+ Fix another bug that triggers when /patches exists.
+ Working in sub-directories: Force `quilt new' to always create
the new patch in the current working directory even if there
is a patches/ sub-directory further up the directory tree.
This should restore the behavior from before Jan 28 very well.
- quilt files, diff, refresh: Sort the files in the patch
alphabetically.
- Update to version 0.31.
-------------------------------------------------------------------
Wed Feb 4 10:39:59 CET 2004 - agruen@suse.de
- Add --quiltrc={rcfile|-} option. Remove some superfluous quoting
from quilt wrapper.
- Extra tests in `quilt refresh' did not check if the old patch
was missing.
-------------------------------------------------------------------
Mon Feb 2 14:17:24 CET 2004 - agruen@suse.de
- Update from CVS (several improvements and fixes).
-------------------------------------------------------------------
Wed Jan 28 02:48:33 CET 2004 - agruen@suse.de
- Fix bugs introduced while merging Chris's patch.
- Update to version 0.30.
-------------------------------------------------------------------
Wed Jan 28 01:13:16 CET 2004 - agruen@suse.de
- Patch from Chris Mason <mason@suse.de>: Add support for working
in subdirectories of the base directory that contains patches/
and .pc/. In the unlikely case that quilt shall operate in the
sub-directory itself, it is sufficient to create a patches/
directory there.
- Add a small testcase for subdirectory support.
-------------------------------------------------------------------
Sun Jan 25 00:00:34 CET 2004 - agruen@suse.de
- Add QUILT_PATCH_OPTS setting.
-------------------------------------------------------------------
Wed Jan 21 19:17:11 CET 2004 - agruen@suse.de
- Add QUILT_NO_DIFF_TIMESTAMPS option in .quiltrc.
-------------------------------------------------------------------
Thu Jan 8 03:53:18 CET 2004 - agruen@suse.de
- Also accept `quilt diff -z ./file' (ignore the ./ prefix that
is often produced by find etc.)
-------------------------------------------------------------------
Wed Dec 24 16:36:48 CET 2003 - agruen@suse.de
- Minor documentation tweak.
-------------------------------------------------------------------
Thu Nov 27 17:08:47 CET 2003 - agruen@suse.de
- `quilt fold' did not create directories for additional files,
and the code for recovering from failures was wrong.
-------------------------------------------------------------------
Wed Nov 26 14:50:13 CET 2003 - agruen@suse.de
- Update from CVS.
-------------------------------------------------------------------
Tue Nov 25 15:51:05 CET 2003 - agruen@suse.de
- Error check for `quilt diff -z filelist' was too strict; relax.
- Add sample.quiltrc file in /usr/share/doc/packages/quilt.
- Update quilt paper.
-------------------------------------------------------------------
Mon Nov 17 20:39:56 CET 2003 - agruen@suse.de
- Update from CVS: Adds fold command; minor fixes and cleanups.
-------------------------------------------------------------------
Wed Nov 12 01:52:58 CET 2003 - agruen@suse.de
- Update to version 0.29 (adds quilt.pdf, Introduction to Quilt).
-------------------------------------------------------------------
Tue Nov 4 18:01:57 CET 2003 - agruen@suse.de
- cvs.diff: Fix check for modified patches in `quilt pop'.
-------------------------------------------------------------------
Sat Nov 1 20:28:19 CET 2003 - agruen@suse.de
- Update to version 0.28.
-------------------------------------------------------------------
Tue Oct 28 14:57:08 CET 2003 - agruen@suse.de
- Update to version 0.27.
-------------------------------------------------------------------
Tue Oct 28 11:34:08 CET 2003 - agruen@suse.de
- Update to remove-pc-files-3.diff patch (minor fixes).
-------------------------------------------------------------------
Mon Oct 27 12:58:44 CET 2003 - agruen@suse.de
- Update to remove-pc-files-2.diff patch (minor fixes).
-------------------------------------------------------------------
Mon Oct 27 03:18:26 CET 2003 - agruen@suse.de
- Sync with CVS:
+ Add `quilt edit' command.
+ Get rid of patches_per_file cache.
- Add remove-pc-files.diff patch.
-------------------------------------------------------------------
Sun Oct 26 17:53:53 CET 2003 - agruen@suse.de
- Get rid of patches_per cache_in `quilt patches'. Remove
patches_per_file and associated functions. `quilt patches'
now is a bit slow for unapplied patches.
-------------------------------------------------------------------
Sun Oct 26 14:45:08 CET 2003 - agruen@suse.de
- Rename snapshot directory from ".snap0" to ".snap".
- `quilt diff: Speed up file list generation in `quilt diff'.
Don't use modified_files anymore. Instead, add first_modified_by
function. I want to get rid of the patches_per_file cache;
it sometimes was not brought up to date. Some cleanups.
- Add test/snapshot.test.
- Fix two errors in the date format in quilt.changes.
-------------------------------------------------------------------
Fri Oct 24 00:50:08 CEST 2003 - agruen@suse.de
- `quilt add': Return exit code 2 when a file has already been
added.
- Add `quilt edit' command: Does a `quilt add' and then invokes
$EDITOR (fallback is `vi'). Files that don't exist after editing
are again removed from the patch.
-------------------------------------------------------------------
Wed Oct 22 01:53:54 CEST 2003 - agruen@suse.de
- Change semantics of `quilt fork', and fix a bug in updating the
series file.
-------------------------------------------------------------------
Tue Oct 21 20:15:59 CEST 2003 - agruen@suse.de
- Update to version 0.26. This adds `quilt fork' and
`quilt snapshot'.
-------------------------------------------------------------------
Tue Sep 2 15:24:51 CEST 2003 - agruen@suse.de
- Pipe rpmbuild output to /dev/null in spec2series (seems to be
necessary since rpm4).
-------------------------------------------------------------------
Mon Jul 28 18:25:56 CEST 2003 - agruen@suse.de
- Remove obsolete #neededforbuild entry bash-completion.
-------------------------------------------------------------------
Mon Jul 28 00:52:06 CEST 2003 - agruen@suse.de
- Update to version 0.24 + cvs.
- Install /etc/bash_completions.d/quilt.
-------------------------------------------------------------------
Wed Jun 11 05:15:54 CEST 2003 - kukuk@suse.de
- Use %{find_lang} macro
-------------------------------------------------------------------
Fri May 16 20:49:48 CEST 2003 - agruen@suse.de
- Include recent changes from CVS head.
-------------------------------------------------------------------
Fri Apr 11 17:22:10 CEST 2003 - agruen@suse.de
- Include recent changes from CVS head.
-------------------------------------------------------------------
Mon Apr 7 16:23:21 CEST 2003 - agruen@suse.de
- Include head -1 / tail -1 fixes from CVS head.
-------------------------------------------------------------------
Mon Mar 24 12:36:09 CET 2003 - agruen@suse.de
- Include recent CVS changes.
-------------------------------------------------------------------
Fri Feb 14 15:53:52 CET 2003 - agruen@suse.de
- Initial package.

498
quilt.spec Normal file
View File

@ -0,0 +1,498 @@
#
# spec file for package quilt (Version 0.46)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: quilt
BuildRequires: ed
Summary: A Tool for Working with Many Patches
License: GNU General Public License (GPL) - all versions
Group: Productivity/Text/Utilities
Version: 0.46
Release: 3
Requires: coreutils diffutils patch gzip bzip2 perl mktemp
Autoreqprov: off
Source: %{name}-%{version}.tar.bz2
Patch1: expand.diff
Patch2: docdir.diff
Patch3: quiltrc.diff
Patch4: patch-wrapper-rpm.diff
Patch5: refresh-z.diff
Url: http://savannah.nongnu.org/projects/quilt
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Quilt allows you to easily manage large numbers of patches by keeping
track of the changes each patch makes. Patches can be applied,
un-applied, refreshed, and more.
Quilt originally was based on Andrew Morton's patch scripts found at
http://www.zip.com.au/~akpm/linux/patches/.
Authors:
--------
Andreas Gruenbacher <agruen@suse.de>
%prep
%setup -q
%patch -p1 -P 1 -P 2 -P 3 -P 4 -P 5
%build
autoconf
# --with-rpmbuild=/usr/lib/rpm/rpmb:
#
# SUSE Autobuild uses a version of /usr/bin/rpmbuild that sources
# /etc/profile to reset the PATH. We must not do that: the
# inspect script needs to pass an additional path component to
# rpmbuild for the tar and patch wrappers.
CFLAGS="$RPM_OPT_FLAGS" \
./configure --prefix=/usr \
--with-sendmail=/usr/sbin/sendmail \
--with-diffstat=/usr/bin/diffstat \
--with-patch-wrapper \
--with-patch=/usr/bin/patch \
--with-rpmbuild=/usr/lib/rpm/rpmb
make BUILD_ROOT=$RPM_BUILD_ROOT RELEASE=%release
make check
%install
# /usr/share/quilt/compat/mta will be a stale symlink: we don't want to add
# sendmail to neededforbuild just because of this.
export NO_BRP_STALE_LINK_ERROR=yes
rm -rf $RPM_BUILD_ROOT
make install BUILD_ROOT=$RPM_BUILD_ROOT
# We only needed the /usr/bin/patch compatibility symlink for the
# test suite.
[ $RPM_BUILD_ROOT/usr/share/quilt/compat/patch -ef /usr/bin/patch ] \
&& rm -f $RPM_BUILD_ROOT/usr/share/quilt/compat/patch
[ $RPM_BUILD_ROOT/usr/share/quilt/compat/awk -ef /usr/bin/awk ] \
&& rm -f $RPM_BUILD_ROOT/usr/share/quilt/compat/awk
%{find_lang} %{name}
# Make "vi" an alias for the edit command
ln -s edit $RPM_BUILD_ROOT/usr/share/quilt/vi
%clean
rm -rf $RPM_BUILD_ROOT
%files -f %{name}.lang
%defattr(-, root, root)
/usr/bin/guards
/usr/bin/quilt
/usr/share/quilt/
/usr/lib/quilt/
/etc/bash_completion.d/quilt
/etc/quilt.quiltrc
%doc %{_mandir}/man1/guards.1.gz
%doc %{_mandir}/man1/quilt.1.gz
%doc doc/README
%doc doc/README.MAIL
%doc doc/quilt.pdf
%changelog -n quilt
* Thu Oct 19 2006 - agruen@suse.de
- Switch to the upstream 0.46 tarball.
- Add a few missing pieces in the "refresh -z" patch.
* Wed Oct 11 2006 - agruen@suse.de
- Update to version 0.46.
- Add patch for "refresh -z".
* Wed Sep 27 2006 - agruen@suse.de
- Remove a duplicate hunk from the last update.
* Thu Sep 21 2006 - agruen@suse.de
- Fix the docdir in the man page.
* Wed May 31 2006 - agruen@suse.de
- Fix `quilt setup' in build environments.
* Mon Apr 24 2006 - jdelvare@suse.de
- import-compressed.diff: Fix replacement of compressed patches.
* Wed Apr 19 2006 - agruen@suse.de
- pop-error-path-fix.diff: Fix bogus error message.
* Sat Mar 25 2006 - agruen@suse.de
- mail command: Use -gt instead of > in [ ... ] expression.
Fix quoting of recipients.
* Tue Mar 21 2006 - agruen@suse.de
- edit2.diff: The last fix broke another way of using edit.
* Wed Mar 15 2006 - agruen@suse.de
- edit.diff: Fix editing files in subdirectories.
* Thu Feb 16 2006 - agruen@suse.de
- Setup command: also recognize archive files passed to tar on the
command line.
* Wed Feb 15 2006 - agruen@suse.de
- Bump to official version to 0.44.
- Stop using bash's =~ operator: older versions don't support it.
- Translation update.
- patch-wrapper-rpm.diff: Some fixes to make the patch names that
quilt shows more convenient.
- Remove unnecessary gawk wrapper.
* Tue Feb 14 2006 - agruen@suse.de
- Fix a critical bug in the push command that causes parts of
patches to end up half-reversed.
* Mon Feb 13 2006 - agruen@suse.de
- quiltrc.diff: Change the default patch options to
--ignore-whitespace --unified-reject.
* Sun Feb 12 2006 - agruen@suse.de
- Fix two bash 3.1 compatibility bugs.
- Run the test suite after building.
* Sat Feb 11 2006 - agruen@suse.de
- Fix bug when working in subdirectories.
- setup command: Improvements when a series file is given.
- Improve help of new command, add two test cases.
- Fix expand command.
* Wed Feb 08 2006 - agruen@suse.de
- GNU patch wrapper: Fix permissions of installed file. Call
GNU patch by absolute patch to avoid recursion. Don't print an
error message when a patch contains no files.
- setup command: Improve recognition of patch's -i and --input
options.
* Mon Feb 06 2006 - agruen@suse.de
- Add GNU patch wrapper for Autobuild.
* Sat Feb 04 2006 - agruen@suse.de
- aclocal.m4 is missing from the tarball.
- quilt mail: Remove a broken check.
* Wed Feb 01 2006 - agruen@suse.de
- Update to version 0.43.
- Translations update; more portability improvements.
* Mon Jan 30 2006 - agruen@suse.de
- Mail command: add heuristic for automatically extracting
subjects. Check for duplicate subjects. Add some checks.
- Lots of smaller fixes and portability improvements here and
there.
* Wed Jan 25 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
* Mon Jan 23 2006 - agruen@suse.de
- When a patch doesn't apply, check and report when it applies
in the reverse order (which probably means it already has been
applied).
- Put "---" markers above when inserting a diffstat section.
- A lot more portability fixes.
* Sun Jan 22 2006 - agruen@suse.de
- Lots of improvements: command parameter handling, input command,
portability, test suite.
* Wed Jan 18 2006 - agruen@suse.de
- setup command: add heuristic to check for input files specified
on the command line in the tar/patch wrapper.
- Translation update.
- Fix heuristic for splitting a patch into header and body for
git.
- Makefile and test suite improvements.
* Mon Jan 09 2006 - agruen@suse.de
- Use the --with-sendmail configure option for sendmail, instead
of the removed --with-mta.
* Thu Dec 01 2005 - agruen@suse.de
- Specify where diffstat will end up so that it will be supported
even though it is missing in the build environment.
* Mon Nov 28 2005 - agruen@suse.de
- CVS update, including a bugfix with -p0 style patches that
remove files.
- Add an expand command that is not yet upstream.
* Thu Sep 29 2005 - agruen@suse.de
- Add README.MAIL and fix the documentation path that appears in
quilt(1).
* Wed Sep 28 2005 - meissner@suse.de
- use RPM_OPT_FLAGS
* Sun Sep 18 2005 - agruen@suse.de
- CVS update.
- doc/quilt.quiltrc no longer exists.
- Skip the dead-symlink check: the mta symlink points to sendmail,
which we don't want to depend on.
* Fri Sep 16 2005 - agruen@suse.de
- Remove obsolete doc/sample.quiltrc.
* Thu Sep 15 2005 - agruen@suse.de
- CVS update.
* Wed Aug 24 2005 - agruen@suse.de
- CVS update.
* Wed Aug 17 2005 - agruen@suse.de
- CVS update.
* Wed Jul 27 2005 - agruen@suse.de
- Update to version 0.42.
* Mon Jul 18 2005 - agruen@suse.de
- Update to version 0.41: new header command, several fixes.
* Fri Jun 17 2005 - agruen@suse.de
- cvs.diff: Update to CVS head.
- annotate.diff: Add experimental annotate command.
* Fri Apr 29 2005 - agruen@suse.de
- Update to version 0.40.
* Fri Feb 25 2005 - agruen@suse.de
- Remove unneeded requirement on the gettext package.
* Fri Feb 18 2005 - agruen@suse.de
- quilt add: Add check to ensure that no files below patches/
or .pc/ will be added.
* Thu Feb 10 2005 - agruen@suse.de
- Update to version 0.39.
* Wed Feb 02 2005 - agruen@suse.de
- Use color defaults so that QUILT_COLORS can be used to only
override some colors.
- When checking for remaining changes (refresh forgotten), use
$QUILT_PATCH_OPTS as in the push command to get identical
results. Don't generate the actually diff; it doesn't get
printed anyway. This should speed up things.
* Tue Jan 25 2005 - agruen@suse.de
- Fix pop command for recent coreutils (cp dir dir2/ no longer
works if dir2 doesn't yet exist).
* Mon Jan 24 2005 - agruen@suse.de
- Make "vi" an alias for the edit command.
* Sun Jan 23 2005 - agruen@suse.de
- Add color support for push command output and allow to customize
colors via the QUILT_COLORS environment variable (for reverse
video, etc.).
* Sun Jan 23 2005 - agruen@suse.de
- Add mail command, doc/README.MAIL and example ``mail'' command
filter in quilt.quiltrc.
- Bump version to 0.38.
* Tue Jan 11 2005 - agruen@suse.de
- Add a default /etc/quilt.quiltrc file that is sourced if no
~/.quiltrc file exists.
* Fri Nov 19 2004 - agruen@suse.de
- Push command: Write out output of patch process immediately
instead of reading into a variable and then printing that
variable. This helps to see what's happening with large patches.
* Wed Nov 17 2004 - agruen@suse.de
- Get rid of the apatch and rpatch helper scripts: Integrate them
in the push and pop commands. This should bring a small
performance improvement.
* Mon Nov 15 2004 - agruen@suse.de
- Fix extra trailing space in series file after quilt refresh
(David Vrabel <dvrabel@arcom.com>).
- Missing quotation in bash_completion
(Axel Grossklaus <ag@pre-secure.de>).
- Fix patches command (Brent Casavant <bcasavan@sgi.com>).
* Sun Oct 17 2004 - agruen@suse.de
- Touch timestamps of files in ``quilt pop'' so that tools like
make don't get confused.
- Various minor fixes; update to version 0.37.
* Wed Sep 22 2004 - agruen@suse.de
- Various fixes; update to version 0.36.
* Fri Sep 03 2004 - agruen@suse.de
- Fix ``quilt setup'' command when used inside Autobuild: Make
sure rpmbuild does not reset PATH.
* Fri Aug 13 2004 - agruen@suse.de
- Improvements to setup command.
* Thu Jul 15 2004 - agruen@suse.de
- Improve messages and update translations.
- Update and improve the bash completion script.
- Add syntax coloring to diff command.
- Add support for QUILT_${COMMAND}_ARGS in .quiltrc.
- Add QUILT_PATCHES_PREFIX option to .quiltrc.
- Support combined diff format and allow the user to adjust
the number of context lines.
- Re-add diffstat support to refresh command.
- Documentation update.
- Bump version to 0.35.
* Thu Jun 10 2004 - agruen@suse.de
- Add meta-data version check/upgrade code from Martin Quinson and
me; new `quilt upgrade' command.
- Handle new/removed files correctly in generated patches: If the
old or new file is missing, the file name in the patch should
be /dev/null. Fix test suite accordingly, and add
test/create-delete.diff. GNU patch recognizes this, and does
additional file existance tests when a patch creates/deletes a
file. Also use the --label option of GNU diff instead of
hand-editing file name headers.
- Add test/Makefile for running the test suite. Note: The tests
run against the installed version of quilt!
- Bump version to 0.34.
* Sun Jun 06 2004 - agruen@suse.de
- Preserve the order of files in patches in the diff and refresh
commands. Files added to a patch appear at the end of a patch.
The files command also lists the files in the order in which
they appear in patches.
- Update to version 0.33.
* Sun Jun 06 2004 - agruen@suse.de
- dependency-graph: Fix for --lines option in patcher mode;
restrict to applied patches.
* Sun Jun 06 2004 - agruen@suse.de
- import: Create patches/ and parent directories to patch to be
imported. Insert the correct patch name in the series file.
* Sun Jun 06 2004 - agruen@suse.de
- backup-file.c: Add code to recursively search .pc directories.
Add a "no-op" mode as default, and allow to just unlink files.
- apatch/rpatch: let backup-files search .pc directories instead
of generating temporary file lists.
- rpatch/pop: unlink files of topmost patch after popping instead
of unlinking at each step.
- If QUILTRC is set in the environment, use this as the
configuration file.
* Sat Jun 05 2004 - agruen@suse.de
- Return exit status 2 when commands go beyond the series (top
with no series, push/next when all patches are applied, pop/
previous when no patches are applied).
- From John Lenz <jelenz@students.wisc.edu>: Add compatibility
code to the dependency-graph script for reading the meta-data
of Holger Schurig's patcher tool,
http://www.holgerschurig.de/patcher.html.
- Update German translation.
* Tue Jun 01 2004 - agruen@suse.de
- Fix from Dean Roehrich <roehrich@sgi.com>: Preserve file mode
of original file when creating backup files.
* Tue Jun 01 2004 - mquinson@tuxfamily.org
- document common options to all scripts (--trace and --quiltrc)
- update french translation
* Mon May 31 2004 - agruen@suse.de
- Rewrite spec2series to return what the new `quilt setup' needs,
and rename it to inspect.
- `quilt setup': Rewrite so that it supports multiple archives
per spec file. Always make the patches directory a symlink to
the original patch files instead of copying the patches.
* Sun May 16 2004 - agruen@suse.de
- Allow passing path arguments to `quilt grep' as well.
* Mon May 10 2004 - agruen@suse.de
- Add `quilt grep': Grep over all files, recursively, skipping
the $QUILT_PATCHES and $QUILT_PC directories.
* Wed Apr 28 2004 - agruen@suse.de
- Fix `quilt fork': It destroys .pc/applied patches; that bug got
introduced when reverting it to its previous semantics.
* Sat Mar 20 2004 - agruen@suse.de
- Fix an algorithmic bug in `quilt graph --lines': Edges were
sometimes lost.
* Mon Mar 15 2004 - agruen@suse.de
- CVS update:
+ Add `quilt graph' command for generating a dependency graph
between patches. This requires the graphviz package for
removing transitive edges (optional) and for rendering the
graph. Please note that the graph command itself is minimal,
while the underlying scripts/dependency+graph is more
flexible.
+ Complete one more detail in scripts/dependency-graph.
+ Revert `quilt fork' to how it originally worked: fork the
*topmost* patch, not the next unapplied patch. Adapt the
test suite accordingly.
+ Add flag to backup-files.c to make sure that files in the
working tree have a link count of at most one. Use this where
appropriate.
+ Fix a bug in `quilt snapshot': Taking snapshots caused files
to get link counts bigger than one, so modifying them could
cause multiple files to get modified. Speed up the command,
too.
+ Update the documentation. Add example1.test from the
documentation.
+ Change `quilt import' to allow importing multiple patches
at once.
+ Update to version 0.32.
* Wed Mar 10 2004 - agruen@suse.de
- Quilt push/pop: exit with a non-zero status when beyond series.
- Ignore empty lines in series file.
- Add man page to tarball and to spec file; add make dependencies.
- Sort the commands in the man page command reference.
- Add completion to the edit command in bash
- Add a man page (generated automatically from -h)
- Sub-directory support: `quilt setup' could get confused, too.
* Tue Mar 09 2004 - agruen@suse.de
- Fix typo: use chmod instead of chown...
* Fri Mar 05 2004 - agruen@suse.de
- Make files writeable in `quilt add' (and `quilt edit') for
working with read-only trees.
* Fri Feb 20 2004 - agruen@suse.de
- Sub-directory support:
+ Fix another bug that triggers when /patches exists.
+ Working in sub-directories: Force `quilt new' to always create
the new patch in the current working directory even if there
is a patches/ sub-directory further up the directory tree.
This should restore the behavior from before Jan 28 very well.
- quilt files, diff, refresh: Sort the files in the patch
alphabetically.
- Update to version 0.31.
* Wed Feb 04 2004 - agruen@suse.de
- Add --quiltrc={rcfile|-} option. Remove some superfluous quoting
from quilt wrapper.
- Extra tests in `quilt refresh' did not check if the old patch
was missing.
* Mon Feb 02 2004 - agruen@suse.de
- Update from CVS (several improvements and fixes).
* Wed Jan 28 2004 - agruen@suse.de
- Fix bugs introduced while merging Chris's patch.
- Update to version 0.30.
* Wed Jan 28 2004 - agruen@suse.de
- Patch from Chris Mason <mason@suse.de>: Add support for working
in subdirectories of the base directory that contains patches/
and .pc/. In the unlikely case that quilt shall operate in the
sub-directory itself, it is sufficient to create a patches/
directory there.
- Add a small testcase for subdirectory support.
* Sun Jan 25 2004 - agruen@suse.de
- Add QUILT_PATCH_OPTS setting.
* Wed Jan 21 2004 - agruen@suse.de
- Add QUILT_NO_DIFF_TIMESTAMPS option in .quiltrc.
* Thu Jan 08 2004 - agruen@suse.de
- Also accept `quilt diff -z ./file' (ignore the ./ prefix that
is often produced by find etc.)
* Wed Dec 24 2003 - agruen@suse.de
- Minor documentation tweak.
* Thu Nov 27 2003 - agruen@suse.de
- `quilt fold' did not create directories for additional files,
and the code for recovering from failures was wrong.
* Wed Nov 26 2003 - agruen@suse.de
- Update from CVS.
* Tue Nov 25 2003 - agruen@suse.de
- Error check for `quilt diff -z filelist' was too strict; relax.
- Add sample.quiltrc file in /usr/share/doc/packages/quilt.
- Update quilt paper.
* Mon Nov 17 2003 - agruen@suse.de
- Update from CVS: Adds fold command; minor fixes and cleanups.
* Wed Nov 12 2003 - agruen@suse.de
- Update to version 0.29 (adds quilt.pdf, Introduction to Quilt).
* Tue Nov 04 2003 - agruen@suse.de
- cvs.diff: Fix check for modified patches in `quilt pop'.
* Sat Nov 01 2003 - agruen@suse.de
- Update to version 0.28.
* Tue Oct 28 2003 - agruen@suse.de
- Update to version 0.27.
* Tue Oct 28 2003 - agruen@suse.de
- Update to remove-pc-files-3.diff patch (minor fixes).
* Mon Oct 27 2003 - agruen@suse.de
- Update to remove-pc-files-2.diff patch (minor fixes).
* Mon Oct 27 2003 - agruen@suse.de
- Sync with CVS:
+ Add `quilt edit' command.
+ Get rid of patches_per_file cache.
- Add remove-pc-files.diff patch.
* Sun Oct 26 2003 - agruen@suse.de
- Get rid of patches_per cache_in `quilt patches'. Remove
patches_per_file and associated functions. `quilt patches'
now is a bit slow for unapplied patches.
* Sun Oct 26 2003 - agruen@suse.de
- Rename snapshot directory from ".snap0" to ".snap".
- `quilt diff: Speed up file list generation in `quilt diff'.
Don't use modified_files anymore. Instead, add first_modified_by
function. I want to get rid of the patches_per_file cache;
it sometimes was not brought up to date. Some cleanups.
- Add test/snapshot.test.
- Fix two errors in the date format in quilt.changes.
* Fri Oct 24 2003 - agruen@suse.de
- `quilt add': Return exit code 2 when a file has already been
added.
- Add `quilt edit' command: Does a `quilt add' and then invokes
$EDITOR (fallback is `vi'). Files that don't exist after editing
are again removed from the patch.
* Wed Oct 22 2003 - agruen@suse.de
- Change semantics of `quilt fork', and fix a bug in updating the
series file.
* Tue Oct 21 2003 - agruen@suse.de
- Update to version 0.26. This adds `quilt fork' and
`quilt snapshot'.
* Tue Sep 02 2003 - agruen@suse.de
- Pipe rpmbuild output to /dev/null in spec2series (seems to be
necessary since rpm4).
* Mon Jul 28 2003 - agruen@suse.de
- Remove obsolete #neededforbuild entry bash-completion.
* Mon Jul 28 2003 - agruen@suse.de
- Update to version 0.24 + cvs.
- Install /etc/bash_completions.d/quilt.
* Wed Jun 11 2003 - kukuk@suse.de
- Use %%{find_lang} macro
* Fri May 16 2003 - agruen@suse.de
- Include recent changes from CVS head.
* Fri Apr 11 2003 - agruen@suse.de
- Include recent changes from CVS head.
* Mon Apr 07 2003 - agruen@suse.de
- Include head -1 / tail -1 fixes from CVS head.
* Mon Mar 24 2003 - agruen@suse.de
- Include recent CVS changes.
* Fri Feb 14 2003 - agruen@suse.de
- Initial package.

16
quiltrc.diff Normal file
View File

@ -0,0 +1,16 @@
Index: quilt-0.46/quilt.quiltrc
===================================================================
--- quilt-0.46.orig/quilt.quiltrc
+++ quilt-0.46/quilt.quiltrc
@@ -1,9 +1,9 @@
-# Example /etc/quilt.quiltrc
+# /etc/quilt.quiltrc
# Options passed to GNU diff when generating patches
QUILT_DIFF_OPTS="--show-c-function"
# Options passed to GNU patch when applying patches
-#QUILT_PATCH_OPTS="--ignore-whitespace"
+QUILT_PATCH_OPTS="--ignore-whitespace --unified-reject"
# Options passed to diffstat when generating patch statistics
#QUILT_DIFFSTAT_OPTS="-f0"

0
ready Normal file
View File

406
refresh-z.diff Normal file
View File

@ -0,0 +1,406 @@
Index: quilt/quilt/diff.in
===================================================================
--- quilt.orig/quilt/diff.in
+++ quilt/quilt/diff.in
@@ -80,7 +80,8 @@ included.
}
colorize() {
- if [ -n "$opt_color" ]; then
+ if [ -n "$opt_color" ]
+ then
sed -e '
s/^\(Index:\|---\|+++\|\*\*\*\) .*/'$color_diff_hdr'&'$color_clear'/
t ; s/^+.*/'$color_diff_add'&'$color_clear'/
@@ -304,42 +305,9 @@ fi
if [ -n "$opt_relative" ]
then
- patch_file=$(patch_file_name $last_patch)
- patch_args=$(patch_args $last_patch)
workdir=$(gen_tempfile -d $PWD/quilt)
-
- if [ ${#files[@]} -gt 0 ] \
- && ! ( cd $QUILT_PC/$last_patch &&
- cp -l --parents "${files[@]}" $workdir/ )
- then
- printf $"Failed to copy files to temporary directory\n" >&2
- die 1
- fi
- # Now we may have some zero-size files that have no permissions
- # (which represent files that the patch creates). Those may have
- # been created in the meantime, but patch would refuse to touch
- # them: We must remove them here.
- find $workdir -type f -size 0 -exec rm -f '{}' ';'
-
- if [ -s $patch_file ]
- then
- if ! cat_file $patch_file \
- | patch -d $workdir $QUILT_PATCH_OPTS $patch_args \
- --no-backup-if-mismatch -Ef \
- >/dev/null 2>/dev/null
- then
- # Generating a relative diff for a subset of files in
- # the patch will fail. Also, if a patch was force
- # applied, we know that it won't apply cleanly. In
- # all other cases, print a warning.
-
- if [ ! -e $QUILT_PC/$last_patch~refresh -a \
- ${#opt_files[@]} -eq 0 ]
- then
- printf $"Failed to patch temporary files\n" >&2
- fi
- fi
- fi
+ apply_patch_temporarily "$workdir" "$last_patch" "${files[@]}" \
+ || die 1
fi
for file in "${files[@]}"
Index: quilt/quilt/fork.in
===================================================================
--- quilt.orig/quilt/fork.in
+++ quilt/quilt/fork.in
@@ -72,11 +72,7 @@ if [ $# -eq 1 ]
then
new_patch="$1"
else
- base=$(echo "$top_patch" \
- | sed -r -e 's:(\.gz|\.bz2)$::' -e 's:(\.diff?|\.patch)$::')
- num=$(echo "$base" | sed -nre 's:.*-([0-9]+)$:\1:'p)
- [ -n "$num" ] || num=1
- new_patch="${base%-$num}-$((num+1))${top_patch#$base}"
+ new_patch="$(next_filename "$top_patch")"
fi
new_patch=${new_patch#$QUILT_PATCHES/}
Index: quilt/quilt/refresh.in
===================================================================
--- quilt.orig/quilt/refresh.in
+++ quilt/quilt/refresh.in
@@ -19,7 +19,7 @@ fi
usage()
{
- printf $"Usage: quilt refresh [-p n|-p ab] [-u|-U num|-c|-C num] [-f] [--no-timestamps] [--no-index] [--diffstat] [--sort] [--backup] [--strip-trailing-whitespace] [patch]\n"
+ printf $"Usage: quilt refresh [-p n|-p ab] [-u|-U num|-c|-C num] [-z[new_name]] [-f] [--no-timestamps] [--no-index] [--diffstat] [--sort] [--backup] [--strip-trailing-whitespace] [patch]\n"
if [ x$1 = x-h ]
then
@@ -47,6 +47,11 @@ patch.
a context diff (-c, -C) with num lines of context. The number of
context lines defaults to 3.
+-z[new_name]
+ Create a new patch containing the changes instead of refreshing the
+ topmost patch. If no new name is specified, \`-2' is added to the
+ original patch name, etc. (See the fork command.)
+
--no-timestamps
Do not include file timestamps in patch headers.
@@ -77,14 +82,14 @@ die()
{
local status=$1
[ -n "$tmp_patch" ] && rm -f $tmp_patch
- [ -n "$tmp_header" ] && rm -f $tmp_header
[ -n "$tmp_result" ] && rm -f $tmp_result
+ [ -n "$workdir" ] && rm -rf $workdir
exit $status
}
-options=`getopt -o p:uU:cC:fh --long no-timestamps,diffstat,backup,sort \
- --long no-index \
- --long strip-trailing-whitespace -- "$@"`
+options=`getopt -o p:uU:cC:fz::h --long no-timestamps,diffstat,backup,sort \
+ --long no-index \
+ --long strip-trailing-whitespace -- "$@"`
if [ $? -ne 0 ]
then
@@ -109,6 +114,10 @@ do
-U|-C)
opt_format="$1 $2"
shift 2 ;;
+ -z)
+ opt_fork=1
+ opt_new_name=$2
+ shift 2 ;;
-h)
usage -h ;;
--no-timestamps)
@@ -144,6 +153,34 @@ QUILT_DIFF_OPTS="$QUILT_DIFF_OPTS $opt_f
patch=$(find_applied_patch "$1") || exit 1
+if [ -z "$opt_sort" ]
+then
+ files=( $(files_in_patch_ordered $patch) )
+else
+ files=( $(files_in_patch $patch | sort) )
+fi
+
+if [ -n "$opt_fork" -a $# -ne 0 ]
+then
+ printf $"Can only refresh the topmost patch with -z currently\n" >&2
+ exit 1
+fi
+
+if [ -n "$opt_fork" ]; then
+ old_patch=$patch
+ old_patch_args=$(patch_args "$old_patch")
+ if [ -n "$opt_new_name" ]
+ then
+ patch=$opt_new_name
+ else
+ patch=$(next_filename "$patch")
+ fi
+ if [ -e "$(patch_file_name "patch")" ]; then
+ printf $"Patch %s exists already\n" "$(print_patch $patch)" >&2
+ exit 1
+ fi
+fi
+
if [ -z "$opt_strip_level" ]
then
opt_strip_level=$(patch_strip_level $patch)
@@ -163,27 +200,30 @@ esac
trap "die 1" SIGTERM
-tmp_patch=$(gen_tempfile)
-
-if [ -z "$opt_sort" ]
-then
- files=( $(files_in_patch_ordered $patch) )
-else
- files=( $(files_in_patch $patch | sort) )
+if [ -n "$opt_fork" ]; then
+ workdir=$(gen_tempfile -d $PWD/quilt)
+ apply_patch_temporarily "$workdir" "$old_patch" || exit 1
fi
+tmp_patch=$(gen_tempfile)
+
for file in "${files[@]}"
do
- old_file=$(backup_file_name $patch $file)
- next_patch=$(next_patch_for_file $patch $file)
- if [ -z "$next_patch" ]
- then
+ if [ -n "$opt_fork" ]; then
+ old_file=$workdir/$file
new_file=$file
else
- new_file=$(backup_file_name $next_patch $file)
- files_were_shadowed=1
+ old_file=$(backup_file_name $patch $file)
+ next_patch=$(next_patch_for_file $patch $file)
+ if [ -z "$next_patch" ]
+ then
+ new_file=$file
+ else
+ new_file=$(backup_file_name $next_patch $file)
+ files_were_shadowed=1
+ fi
fi
- if ! diff_file $file $old_file $new_file >> $tmp_patch
+ if ! diff_file $file $old_file $new_file
then
printf $"Diff failed, aborting\n" >&2
die 1
@@ -199,7 +239,7 @@ do
then
printf $"Cannot use --strip-trailing-whitespace on a patch that has shadowed files.\n" >&2
fi
-done
+done >> $tmp_patch
if ! [ -s $tmp_patch ]
then
@@ -227,25 +267,17 @@ patch_file=$(patch_file_name $patch)
trap "" SIGINT
-if ! tmp_header=$(gen_tempfile)
-then
- die 1
-fi
-
-mkdir -p $(dirname $patch_file)
-
-if ! cat_file $patch_file | patch_header > $tmp_header
-then
- die 1
-fi
-
tmp_result=$(gen_tempfile) || die 1
+prev_patch_file=$patch_file
+[ -e "$prev_patch_file" ] || prev_patch_file=/dev/null
+
if [ -n "$opt_diffstat" ]
then
diffstat="$(diffstat $QUILT_DIFFSTAT_OPTS \
-p$num_strip_level $tmp_patch)" || die 1
- awk '
+ cat_file "$prev_patch_file" | patch_header \
+ | awk '
function print_diffstat(arr, i) {
split(diffstat, arr, "\n")
for (i=1; i in arr; i++)
@@ -271,13 +303,16 @@ then
}
}
' diffstat="$diffstat" \
- $tmp_header > $tmp_result
+ > $tmp_result
else
- cat $tmp_header > $tmp_result
+ cat_file "$prev_patch_file" | patch_header \
+ > $tmp_result
fi
cat $tmp_patch >> $tmp_result
+mkdir -p $(dirname $patch_file)
+
if [ -e $patch_file ] && \
diff -q $patch_file $tmp_result > /dev/null
then
@@ -286,8 +321,30 @@ elif ( [ -z "$QUILT_BACKUP" -o ! -e $pat
mv $patch_file $patch_file~ ) && \
cat_to_new_file $patch_file < $tmp_result
then
+ if [ -n "$opt_fork" ]
+ then
+ if ! insert_in_series "$patch" "$old_patch_args"
+ then
+ printf $"Failed to insert patch %s into file series\n" \
+ "$(print_patch $patch)" >&2
+ rm -f "$patch_file"
+ exit 1
+ fi
+ if ! rm -rf "$QUILT_PC/$patch" || \
+ ! mv "$workdir" "$QUILT_PC/$patch" || \
+ ! echo "$patch" >> $QUILT_PC/applied-patches
+ then
+ printf $"Failed to create patch %s\n" \
+ "$(print_patch $patch)" >&2
+ exit 1
+ fi
+ printf $"Fork of patch %s created as %s\n" \
+ "$(print_patch $old_patch)" \
+ "$(print_patch $patch)"
+ else
+ printf $"Refreshed patch %s\n" "$(print_patch $patch)"
+ fi
touch $QUILT_PC/$patch/.timestamp
- printf $"Refreshed patch %s\n" "$(print_patch $patch)"
else
die 1
fi
Index: quilt/quilt/scripts/patchfns.in
===================================================================
--- quilt.orig/quilt/scripts/patchfns.in
+++ quilt/quilt/scripts/patchfns.in
@@ -838,6 +838,65 @@ first_modified_by()
return 1
}
+apply_patch_temporarily()
+{
+ local workdir=$1 patch=$2 patch_file patch_args files
+
+ patch_file=$(patch_file_name "$patch")
+ patch_args=$(patch_args "$patch")
+
+ shift 2
+ if [ $# -gt 0 ]
+ then
+ files=( "$@" )
+ else
+ files=( $(files_in_patch "$patch") )
+ fi
+
+ if [ ${#files[@]} -gt 0 ] \
+ && ! ( cd $QUILT_PC/$patch &&
+ cp -l --parents "${files[@]}" $workdir/ )
+ then
+ printf $"Failed to copy files to temporary directory\n" >&2
+ return 1
+ fi
+ # Now we may have some zero-size files that have no permissions
+ # (which represent files that the patch creates). Those may have
+ # been created in the meantime, but patch would refuse to touch
+ # them: We must remove them here.
+ find $workdir -type f -size 0 -exec rm -f '{}' ';'
+
+ if [ -s $patch_file ]
+ then
+ if ! cat_file $patch_file \
+ | patch -d $workdir $QUILT_PATCH_OPTS $patch_args \
+ --no-backup-if-mismatch -Ef \
+ >/dev/null 2>/dev/null
+ then
+ # Generating a relative diff for a subset of files in
+ # the patch will fail. Also, if a patch was force
+ # applied, we know that it won't apply cleanly. In
+ # all other cases, print a warning.
+
+ if [ ! -e $QUILT_PC/$patch~refresh -a $# -eq 0 ]
+ then
+ printf $"Failed to patch temporary files\n" >&2
+ return 1
+ fi
+ fi
+ fi
+}
+
+next_filename()
+{
+ local patch=$1 base num
+ base=$(echo "$patch" \
+ | sed -r -e 's:(\.gz|\.bz2)$::' -e 's:(\.diff?|\.patch)$::')
+ num=$(echo "$base" | sed -nre 's:.*-([0-9]+)$:\1:'p)
+ [ -n "$num" ] || num=1
+ echo "${base%-$num}-$((num+1))${patch#$base}"
+}
+
create_db() {
if ! [ -e $QUILT_PC ]
then
Index: quilt/test/refresh-z.test
===================================================================
--- /dev/null
+++ quilt/test/refresh-z.test
@@ -0,0 +1,29 @@
+ $ rm -rf d
+ $ mkdir -p d/patches
+ $ cd d
+
+ $ quilt new test.diff
+ > Patch patches/test.diff is now on top
+
+ $ quilt add foo
+ > File foo added to patch patches/test.diff
+
+ $ echo foo > foo
+ $ quilt refresh
+ > Refreshed patch patches/test.diff
+
+ $ echo bar >> foo
+ $ quilt refresh -z
+ > Fork of patch patches/test.diff created as patches/test-2.diff
+
+ $ echo baz >> foo
+ $ quilt refresh -zbaz.diff
+ > Fork of patch patches/test-2.diff created as patches/baz.diff
+
+ $ quilt series
+ > patches/test.diff
+ > patches/test-2.diff
+ > patches/baz.diff
+
+ $ cd ..
+ $ rm -rf d