diff options
-rw-r--r-- | quilt.changes | 5 | ||||
-rw-r--r-- | quilt/edit.in | 4 | ||||
-rw-r--r-- | test/edit.test | 9 | ||||
-rwxr-xr-x | test/run | 7 |
4 files changed, 19 insertions, 6 deletions
diff --git a/quilt.changes b/quilt.changes index a10aa1e..13d392b 100644 --- a/quilt.changes +++ b/quilt.changes @@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Wed Mar 15 20:34:42 CET 2006 - agruen@suse.de + +- quilt/edit.in: Fix for working in subdirectories. + +------------------------------------------------------------------- Sun Mar 12 14:50:26 CET 2006 - khali@linux-fr.org - Makefile.in: Fix pseudo-symlinks under compat not being removed diff --git a/quilt/edit.in b/quilt/edit.in index 09ee3f6..6b48242 100644 --- a/quilt/edit.in +++ b/quilt/edit.in @@ -65,11 +65,11 @@ if [ $status -ne 0 -a $status -ne 2 ] then exit $status fi -$EDITOR "$@" +$EDITOR "${@/#/$SUBDIR}" status=$? for file in "$@" do - if ! [ -e "$file" ] + if ! [ -e "$SUBDIR/$file" ] then quilt_command remove "$file" status=1 diff --git a/test/edit.test b/test/edit.test index 5cc5dba..4c4c542 100644 --- a/test/edit.test +++ b/test/edit.test @@ -5,16 +5,21 @@ $ cd d $ cat > editor < #! /bin/sh < echo Editing $1 -< echo foo > $1 +< sed -e 's:foo:bar:' $1 > $1.new +< mv $1.new $1 $ chmod +x editor $ export EDITOR=%PWD/editor $ quilt new patch > Patch patches/patch is now on top $ cd subdir +$ echo foo > foo $ quilt edit foo > File subdir/foo added to patch ../patches/patch -> Editing foo +> Editing subdir/foo + +$ cat foo +> bar $ cd ../.. $ rm -rf d @@ -92,8 +92,11 @@ sub process_test($$$$) { my @good = (); my $nmax = (@$out > @$result) ? @$out : @$result; for (my $n=0; $n < $nmax; $n++) { - my $use_re = ($out->[$n] =~ /^~ /); - $out->[$n] =~ s/^~ //g; + my $use_re; + if (defined $out->[$n] && $out->[$n] =~ /^~ /) { + $use_re = 1; + $out->[$n] =~ s/^~ //g; + } if (!defined($out->[$n]) || !defined($result->[$n]) || (!$use_re && $result->[$n] ne $out->[$n]) || |