summaryrefslogtreecommitdiff
authorHelio Chissini de Castro <helio.chissini.de.castro@collabora.co.uk>2012-07-19 21:30:45 (GMT)
committer Helio Chissini de Castro <helio.chissini.de.castro@collabora.co.uk>2012-07-19 21:30:45 (GMT)
commit73b45b382102ce94d228e85753ddc512ff73c9eb (patch) (side-by-side diff)
treea1d8bab22e497fe7c4aa50f2aab41bbe0cb2d056
parent3f1d7de81db6a785591eb35ac9cffc35f1587890 (diff)
downloadanagrman-73b45b382102ce94d228e85753ddc512ff73c9eb.tar.gz
anagrman-73b45b382102ce94d228e85753ddc512ff73c9eb.tar.bz2
Fixed invalid entries when remotes are non collabora ones
Diffstat (more/less context) (ignore whitespace changes)
-rwxr-xr-xanagrman10
1 files changed, 8 insertions, 2 deletions
diff --git a/anagrman b/anagrman
index 0ab5571..1e7b184 100755
--- a/anagrman
+++ b/anagrman
@@ -40,6 +40,7 @@ class CGitPlainXMLParser:
fetch = ''
revision = ''
fremote = ''
+ path = ''
req = urllib2.Request( ccuManifestCgitURL + '/plain/' + manifest + '.xml' )
data = urllib2.urlopen(req)
dom = parseString( data.read() )
@@ -68,6 +69,8 @@ class CGitPlainXMLParser:
revision = i[1]
if 'remote' in i:
fremote = i[1]
+ if 'path' in i:
+ path = i[1]
if name and revision and fremote:
if projects.has_key( name ):
if projects[name]['revision'] != revision:
@@ -75,7 +78,7 @@ class CGitPlainXMLParser:
sys.exit(1)
if verbose:
print "Project " + name + " is present in one or more entries. Can go global."
- projects[name] = {'revision':revision,'remote':fremote}
+ projects[name] = {'revision':revision,'remote':fremote,'path':path}
name = ''
revision = ''
fremote = ''
@@ -114,7 +117,10 @@ def generateFinal():
for r in remotes.keys():
if projects[p]['remote'] in remotes[r]:
newremote = remotes[r][0]
- doc.createNode('project', node, withAttribs = {'path': 'external/collabora/' + p, 'name': p, 'revision':projects[p]['revision'], 'remote':newremote } )
+ if newremote:
+ doc.createNode('project', node, withAttribs = {'path': projects[p]['path'], 'name': p, 'revision':projects[p]['revision'], 'remote':newremote } )
+ else:
+ doc.createNode('project', node, withAttribs = {'path': projects[p]['path'], 'name': p, 'revision':projects[p]['revision'] } )
if verbose:
doc.printXML()
doc.writeXML()