diff options
author | Andreas Gruenbacher <agruen@suse.de> | 2004-06-06 10:24:07 +0000 |
---|---|---|
committer | Andreas Gruenbacher <agruen@suse.de> | 2004-06-06 10:24:07 +0000 |
commit | 258c42fe9367b321b686492441346347390db664 (patch) | |
tree | 396cf3523619a6473c9ccea2bf30e824798a48be /scripts/dependency-graph.in | |
parent | 6da707fc53ba35195025f9f4c94c8330d265c900 (diff) | |
download | quilt-258c42fe9367b321b686492441346347390db664.tar.gz |
- dependency-graph: Fix for --lines option in patcher mode;
restrict to applied patches.
Diffstat (limited to 'scripts/dependency-graph.in')
-rw-r--r-- | scripts/dependency-graph.in | 18 |
1 files changed, 13 insertions, 5 deletions
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(); |