diff options
-rw-r--r-- | quilt.changes | 6 | ||||
-rw-r--r-- | scripts/dependency-graph.in | 18 |
2 files changed, 19 insertions, 5 deletions
diff --git a/quilt.changes b/quilt.changes index 96629df..f21cab5 100644 --- a/quilt.changes +++ b/quilt.changes @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +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 diff --git a/scripts/dependency-graph.in b/scripts/dependency-graph.in index f4742a3..306bdd9 100644 --- a/scripts/dependency-graph.in +++ b/scripts/dependency-graph.in @@ -143,14 +143,24 @@ sub ranges($) { return [ [ @left ], [ @right ] ]; } +sub backup_file_name($$) { + my ($patch, $file) = @_; + + if ($use_patcher) { + return $patch . "~" . $file; + } else { + return $ENV{QUILT_PC} . "/" . $patch . "/" . $file; + } +} + # Compute the lists of lines that a patch changes in a file. sub compute_ranges($$) { my ($n, $file) = @_; - my $file1 = $ENV{QUILT_PC} . "/" . $nodes[$n]{file} . "/" . $file; + my $file1 = backup_file_name($nodes[$n]{file}, $file); my $file2; my $n2 = next_patch_for_file($n, $file); if (defined $n2) { - $file2 = $ENV{QUILT_PC} . "/" . $nodes[$n2]{file} . "/" . $file; + $file2 = backup_file_name($nodes[$n2]{file}, $file); } else { $file2 = $file; } @@ -206,9 +216,7 @@ if (@ARGV) { @patches = @ARGV; } } elsif ($use_patcher) { - # Since patcher maintains a file called patchname.files, - # we can generate the graph for patches which are not applied! - my $fh = new FileHandle("< .patches/series") + my $fh = new FileHandle("< .patches/applied") or die ".patches/applied: $!\n"; @patches = map { chomp; $_ } <$fh>; $fh->close(); |