use another format for the revision references
the new one is better for copy and paste to
svn diff -r command lines.
The old format is still recognized (but will be
removed some time in the future; probably after
the next 2.0 release)
git-svn-id: https://svn.apache.org/repos/asf/httpd/docs-build/trunk@111610 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/metafile.pl b/lib/metafile.pl
index 06301d2..e9b0074 100644
--- a/lib/metafile.pl
+++ b/lib/metafile.pl
@@ -199,7 +199,10 @@
local $_;
while (<FILE>) {
$rev = $1, $orev=$2, last
- if /<!--\s*English\s+Revision:\s*(\S+)\s+
+ if /<!--\s*English\s+Revision:\s*([^\s:]+)
+ (?::(\S+)\s+\(outdated\))?\s+-->/xi
+ or
+ /<!--\s*English\s+Revision:\s*(\S+)\s+
(?:\(outdated:\s*(\S+)\s*\)\s+)?-->/xi;
}
}
@@ -220,9 +223,15 @@
close(FILE)
or die "could not close file '$curpath' ($!), stopped";
- $cont =~ s{<!--\s*English\s+Revision:\s*(\S+)\s+
- (?:\(outdated[^)]*\)\s+)?-->}
- {<!-- English Revision: $1 (outdated: $reven) -->}ix;
+ unless (
+ $cont =~ s{<!--\s*English\s+Revision:\s*([^\s:]+)
+ (?::\S+\s+\(outdated\))?\s+-->}
+ {<!-- English Revision: $1:$reven (outdated) -->}ix
+ ) {
+ $cont =~ s{<!--\s*English\s+Revision:\s*(\S+)\s+
+ (?:\(outdated[^)]*\)\s+)?-->}
+ {<!-- English Revision: $1:$reven (outdated) -->}ix
+ }
sysopen(FILE, "$curpath.tmp", O_WRONLY | O_CREAT | O_TRUNC)
or die "could not open file '$curpath.tmp' ($!), stopped";