summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@suse.de>2004-06-06 10:24:07 +0000
committerAndreas Gruenbacher <agruen@suse.de>2004-06-06 10:24:07 +0000
commit258c42fe9367b321b686492441346347390db664 (patch)
tree396cf3523619a6473c9ccea2bf30e824798a48be
parent6da707fc53ba35195025f9f4c94c8330d265c900 (diff)
downloadquilt-258c42fe9367b321b686492441346347390db664.tar.gz
- dependency-graph: Fix for --lines option in patcher mode;
restrict to applied patches.
-rw-r--r--quilt.changes6
-rw-r--r--scripts/dependency-graph.in18
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();