summaryrefslogtreecommitdiff
authorHelio Chissini de Castro <helio.chissini.de.castro@collabora.co.uk>2012-09-05 12:52:30 (GMT)
committer Helio Chissini de Castro <helio.chissini.de.castro@collabora.co.uk>2012-09-05 12:52:30 (GMT)
commitbb69356172d8582abcd71cedb7dca4399d4e0070 (patch) (side-by-side diff)
tree6fa049383981bc4bc7e8c7b3a72e6b720e6e0131
parent7d8c17d24ae90a18908101e70ff3d3be4ac1ba4c (diff)
downloadanagrman-bb69356172d8582abcd71cedb7dca4399d4e0070.tar.gz
anagrman-bb69356172d8582abcd71cedb7dca4399d4e0070.tar.bz2
Fix cases where no revision is added at same time remote repository is specified. This renders tool unable to add in final local_manifest the proper remote.
Diffstat (more/less context) (ignore whitespace changes)
-rwxr-xr-xanagrman6
1 files changed, 5 insertions, 1 deletions
diff --git a/anagrman b/anagrman
index a5137e8..6f15c06 100755
--- a/anagrman
+++ b/anagrman
@@ -79,6 +79,8 @@ class CGitPlainXMLParser:
if verbose:
print "Project " + name + " is present in one or more entries. Can go global."
projects[name] = {'revision':revision,'remote':fremote,'path':path}
+ elif name and fremote:
+ projects[name] = {'remote':fremote,'path':path}
elif name:
projects[name] = {'path':path}
name = ''
@@ -120,7 +122,9 @@ def generateFinal():
if projects[p].has_key('remote'):
if projects[p]['remote'] in remotes[r]:
newremote = remotes[r][0]
- if newremote:
+ if newremote and not projects[p].has_key('revision'):
+ doc.createNode('project', node, withAttribs = {'path': projects[p]['path'], 'name': p, 'remote':newremote } )
+ elif newremote:
doc.createNode('project', node, withAttribs = {'path': projects[p]['path'], 'name': p, 'revision':projects[p]['revision'], 'remote':newremote } )
elif not projects[p].has_key('revision'):
doc.createNode('project', node, withAttribs = {'path': projects[p]['path'], 'name': p } )