aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
Diffstat (limited to 'admin')
-rwxr-xr-xadmin/revdiff25
1 files changed, 19 insertions, 6 deletions
diff --git a/admin/revdiff b/admin/revdiff
index bdd6a2210ce..f145da19c4a 100755
--- a/admin/revdiff
+++ b/admin/revdiff
@@ -27,13 +27,18 @@ if (@ARGV < 3)
27revdiff FILE OLD NEW 27revdiff FILE OLD NEW
28 28
29Get a diff of FILE between revisions OLD and NEW. Store the 29Get a diff of FILE between revisions OLD and NEW. Store the
30diff in a file named FILE-OLD-NEW.diff. If NEW is +<number> 30diff in a file named FILE-OLD-NEW.diff.
31or -<number>, build diffs between revisions OLD and OLD +/- <number>. 31
32OLD being `-' means use FILE's current revision. 32If OLD is `-' use FILE's current revision for OLD. If OLD is
33`-<number>', use the Nth revision before the current one for OLD.
34
35If NEW is +<number> or -<number>, build diffs between revisions OLD
36and OLD +/- <number>.
33 37
34Examples: 38Examples:
35 39
36revdiff FILE - -1 get the latest change of FILE 40revdiff FILE - -1 get the latest change of FILE
41revdiff FILE -1 +1 also gets the latest change of FILE
37revdiff FILE 1.500 +2 get diffs 1.500-1.501 and 1.501-1.502. 42revdiff FILE 1.500 +2 get diffs 1.500-1.501 and 1.501-1.502.
38 43
39USAGE 44USAGE
@@ -73,9 +78,17 @@ sub current_revision ($)
73} 78}
74 79
75if ($old eq "-") 80if ($old eq "-")
76{ 81 {
77 $old = current_revision ($file); 82 $old = current_revision ($file);
78} 83 }
84elsif ($old =~ /^-(\d+)$/)
85 {
86 my $offset = $1;
87 $old = current_revision ($file);
88 die "Internal error" unless $old =~ /(.*)\.(\d+)$/;
89 my $minor = $2 - $offset;
90 $old = sprintf ("%d.%d", $1, $minor);
91 }
79 92
80while (@ARGV) 93while (@ARGV)
81 { 94 {