diff options
author | Chris Soyars <ctso@ctso.me> | 2011-05-03 22:41:12 -0400 |
---|---|---|
committer | Chris Soyars <ctso@ctso.me> | 2011-05-03 22:41:12 -0400 |
commit | dae4d9a593a58ba6db7c49bf7043cf5ca758b00b (patch) | |
tree | 7c18246dc52f51f33b6a9e2919bdc9d6cde55365 /tagfix.py | |
parent | 055929b25fe9dad534493730ddd2bbfcb335291e (diff) | |
download | manifest-dae4d9a593a58ba6db7c49bf7043cf5ca758b00b.tar.gz manifest-dae4d9a593a58ba6db7c49bf7043cf5ca758b00b.tar.bz2 manifest-dae4d9a593a58ba6db7c49bf7043cf5ca758b00b.zip |
manifest: Add tagfix.py tool.
Diffstat (limited to 'tagfix.py')
-rwxr-xr-x | tagfix.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tagfix.py b/tagfix.py new file mode 100755 index 0000000..7cd0f5f --- /dev/null +++ b/tagfix.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python +# +# Removes the 'revision' attribute from remotes +# on github so we can set the default revision +# to a tag such as 'refs/tags/cm-7.0.0' and rely +# on specific sha1 revisions for projects that are +# still on korg. +# +# Creates a new file, default.xml.new, so you can +# make sure it looks correct before overwriting +# default.xml. + +import re +newlines=[] +fd = open('default.xml') +for line in fd.readlines(): + if "remote=\"github\"" in line: + line = re.sub("revision=\".*\"","",line) + newlines.append(line) + +for line in newlines: + fd = open('default.xml.new','a') + fd.write(line) + fd.close() |