SHA256
1
0
forked from pool/quilt

Accepting request 108311 from devel:tools:scm

- Update to version 0.60.
- Fix interaction with vimdiff.

OBS-URL: https://build.opensuse.org/request/show/108311
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/quilt?expand=0&rev=43
This commit is contained in:
Stephan Kulow 2012-03-07 12:45:17 +00:00 committed by Git OBS Bridge
commit 35f2bd09c5
8 changed files with 76 additions and 125 deletions

View File

@ -1,82 +0,0 @@
Fix import of relative patches.
This closes bug #35244.
---
quilt/import.in | 8 ++++----
quilt/scripts/patchfns.in | 17 ++++++++++++++---
test/import.test | 9 +++++++++
3 files changed, 27 insertions(+), 7 deletions(-)
--- a/test/import.test
+++ b/test/import.test
@@ -246,3 +246,12 @@
$ cat patches/series
> patch1.diff
> patchR.diff
+
+# Also test importing when in a subdirectory
+ $ touch empty.patch
+ $ cd t
+ $ touch empty2.patch
+ $ quilt import ../empty.patch
+ > Importing patch ../empty.patch (stored as ../patches/empty.patch)
+ $ quilt import %{PWD}/empty2.patch
+ > Importing patch %{PWD}/empty2.patch (stored as ../patches/empty2.patch)
--- a/quilt/import.in
+++ b/quilt/import.in
@@ -152,16 +152,16 @@ then
fi
before=$(patch_after "$(top_patch)")
-for patch_file in "$@"
+for orig_patch_file in "$@"
do
if [ -n "$opt_patch" ]
then
patch=$opt_patch
else
- patch=${patch_file##*/}
+ patch=${orig_patch_file##*/}
fi
- patch_file=$(find_patch_file "$patch_file") || exit 1
+ patch_file=$(find_patch_file "$orig_patch_file") || exit 1
merged_patch_file="$patch_file"
if is_applied $patch
@@ -199,7 +199,7 @@ do
printf $"Importing patch %s\n" "$(print_patch $patch)"
else
printf $"Importing patch %s (stored as %s)\n" \
- "$patch_file" \
+ "$orig_patch_file" \
"$(print_patch $patch)"
mkdir -p "${dest%/*}"
--- a/quilt/scripts/patchfns.in
+++ b/quilt/scripts/patchfns.in
@@ -641,10 +641,21 @@ find_patch_file()
{
local name="$1"
- if [ -r "$name" ]
+ if [ ${name:0:1} = / ]
then
- echo "$name"
- return
+ # Patch has absolute path
+ if [ -r "$name" ]
+ then
+ echo "$name"
+ return
+ fi
+ else
+ # Patch has a relative path
+ if [ -r "$SUBDIR$name" ]
+ then
+ echo "$SUBDIR$name"
+ return
+ fi
fi
local patch

View File

@ -1,28 +0,0 @@
Subject: grep: Accept file names with spaces
This is a continuation of Yasushi SHOJI's initial work of fixing
support for file names with spaces. This time I fixed support in the
grep command. This is particularly important because the grep command
operates on all files in the work tree, even if they aren't touched
by any patch, so the chances that one of them has a space in its name
is greater. As before, no guarantee is made that all options are
covered, but this should be a good starting point.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
---
quilt/grep.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- quilt-0.50.orig/quilt/grep.in
+++ quilt-0.50/quilt/grep.in
@@ -117,8 +117,8 @@ fi
find "${myargs[@]:-.}" \( \
-path "./$QUILT_PATCHES/*" -o \
-path "./$QUILT_PC/*" \) -prune -o \
- -type f -print \
-| xargs grep $opt_H "${args[@]}" \
+ -type f -print0 \
+| xargs -0 grep $opt_H "${args[@]}" \
| if [ ${#myargs[@]} -eq 0 ]; then
sed -e 's,^./,,'
else

View File

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

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

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:68ec808607d425b75c8dd3cee48f0a0b88ad67fc04ef6ab87a7d7fb7c5e15b3c
size 384192

View File

@ -1,8 +1,10 @@
Index: quilt-0.51/Makefile.in
===================================================================
--- quilt-0.51.orig/Makefile.in
+++ quilt-0.51/Makefile.in
@@ -227,8 +227,11 @@ doc/reference : bin/quilt $(QUILT:%=quil
---
Makefile.in | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
--- quilt-0.60.orig/Makefile.in
+++ quilt-0.60/Makefile.in
@@ -215,8 +215,11 @@ doc/reference : bin/quilt $(QUILT:%=quil
@unset LANG LC_MESSAGES LC_CTYPE LC_ALL; \
for i in $(QUILT); \
do \
@ -10,8 +12,8 @@ Index: quilt-0.51/Makefile.in
+ done | sort | while read j ; \
+ do \
echo; \
- quilt $$i -h; \
+ quilt $$j -h; \
- QUILT_PC=.fake_pc quilt $$i -h; \
+ QUILT_PC=.fake_pc quilt $$j -h; \
echo; \
done | \
$(SED) -e 's/\$$EDITOR ([^)]*)/$$EDITOR/' \

View File

@ -0,0 +1,40 @@
From: Jean Delvare <jdelvare@suse.de>
Subject: Fix interaction between quilt and vimdiff
References: bnc#749563
Using vimdiff as a diff viewer in quilt breaks if QUILT_PAGER is set.
So inhibit the pager in that case. Other diff viewers may be affected
as well but I don't know how to fix this in a generic way, short of
inhibiting the pager as soon as option --diff is passed to the diff
command. Not sure if this desirable though, as I presume
non-interactive alternative diff viewers must exist too.
---
quilt/diff.in | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
--- a/quilt/diff.in
+++ b/quilt/diff.in
@@ -66,7 +66,9 @@ included.
--diff=utility
Use the specified utility for generating the diff. The utility
- is invoked with the original and new file name as arguments.
+ is invoked with the original and new file name as arguments. If
+ using an interactive text-mode diff viewer that is not known to
+ quilt, you will have to unset QUILT_PAGER for proper result.
--color[=always|auto|never]
Use syntax coloring.
@@ -211,6 +213,13 @@ done
QUILT_DIFF_OPTS="$QUILT_DIFF_OPTS $opt_format"
+# Inhibit pager for interactive text-mode diff viewers
+case "$(basename $opt_diff)" in
+vimdiff)
+ QUILT_PAGER=
+ ;;
+esac
+
opt_files=( $(for file in "$@"; do echo "$SUBDIR$file" ; done) )
if [ $[0$opt_combine + 0$opt_snapshot + 0$opt_relative] -gt 1 ]

View File

@ -1,3 +1,24 @@
-------------------------------------------------------------------
Fri Mar 2 14:20:24 CET 2012 - jdelvare@suse.de
- Fix interaction between quilt and vimdiff (bnc#749563).
-------------------------------------------------------------------
Thu Mar 1 21:29:26 CET 2012 - jdelvare@suse.de
- Fix build (/usr/lib/quilt is gone.)
- Turn into a noarch package.
-------------------------------------------------------------------
Thu Mar 1 21:11:18 CET 2012 - jdelvare@suse.de
- update to 0.60
o Includes a rewrite of backup-files from C to bash, making it
possible to turn quilt into a noarch package.
o Includes several fixes to the mail command.
o Obsoletes fix-relative-import.patch.
o Obsoletes grep-support-spaces.patch.
-------------------------------------------------------------------
Sat Feb 25 23:50:59 CET 2012 - meissner@suse.de

View File

@ -24,7 +24,7 @@ BuildRequires: procmail
Summary: A Tool for Working with Many Patches
License: GPL-2.0+
Group: Productivity/Text/Utilities
Version: 0.51
Version: 0.60
Release: 0
Requires: bzip2
Requires: coreutils
@ -46,13 +46,13 @@ AutoReqProv: off
Source: %{name}-%{version}.tar.bz2
Source1: suse-start-quilt-mode.el
Patch1: expand.diff
Patch2: fix-relative-import.patch
patch2: quilt-support-vimdiff.patch
Patch3: patch-wrapper-rpm.diff
Patch4: grep-support-spaces.patch
Patch5: suse-workaround-pseudo-release.patch
Patch6: quilt-stable-rebuild.patch
Url: http://savannah.nongnu.org/projects/quilt
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%description
Quilt allows you to easily manage large numbers of patches by keeping
@ -73,7 +73,6 @@ Authors:
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
@ -132,7 +131,6 @@ rm -rf $RPM_BUILD_ROOT
/usr/bin/quilt
/usr/share/quilt/
/usr/share/emacs/
/usr/lib/quilt/
%config /etc/quilt.quiltrc
%config /etc/bash_completion.d/quilt.sh
%doc %{_mandir}/man1/guards.1.gz