blob: 7cd0f5fc6401b0410553be451d0b76dcc1892a3d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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()
|