aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Freeman <rich0@gentoo.org>2014-09-29 07:08:23 -0400
committerRichard Freeman <rich0@gentoo.org>2014-09-29 07:08:23 -0400
commitf86c5af20d19674dc7438233c761d1f6458b7d3a (patch)
treec465f0dcbe8204f4728fb7867230d2ede4034031
parentFix cvs keywords part 1. (diff)
downloadgit-conversion-tools-f86c5af20d19674dc7438233c761d1f6458b7d3a.tar.gz
git-conversion-tools-f86c5af20d19674dc7438233c761d1f6458b7d3a.tar.bz2
git-conversion-tools-f86c5af20d19674dc7438233c761d1f6458b7d3a.zip
Correct paths in source keywords.
-rwxr-xr-xrewrite-git-blob.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/rewrite-git-blob.py b/rewrite-git-blob.py
index 430e415..7af3146 100755
--- a/rewrite-git-blob.py
+++ b/rewrite-git-blob.py
@@ -47,6 +47,7 @@ mangler.append(functools.partial(
def process_stream(source, output_dir, output):
header = os.path.normpath(os.path.abspath(output_dir))
header = "$Header: %s" % output_dir
+ sourcekeyword = "$Source: %s" % output_dir
line = source.readline()
while line:
chunks = line.split()
@@ -56,6 +57,7 @@ def process_stream(source, output_dir, output):
data = source.read(size)
assert len(data) == size, (line, data)
data = data.replace(header, "$Header: /var/cvsroot")
+ data = data.replace(sourcekeyword, "%Source: /var/cvsroot")
line = 'data %i\n%s' % (len(data), data)
output.write(line)
line = source.readline()