OSDN Git Service

repopick: handle revisions with slashes
authorDan Pasanen <invisiblek@cyanogenmod.org>
Wed, 31 Aug 2016 14:30:19 +0000 (16:30 +0200)
committerSteve Kondik <steve@cyngn.com>
Sun, 4 Sep 2016 04:47:36 +0000 (21:47 -0700)
Change-Id: I6f7891a52fb1538e88f5a68dd28ef1c603ee7067

tools/repopick.py

index 6e40f38..2b436ef 100755 (executable)
@@ -210,7 +210,7 @@ if __name__ == '__main__':
     xml_root = ElementTree.fromstring(manifest)
     projects = xml_root.findall('project')
     remotes = xml_root.findall('remote')
-    default_revision = xml_root.findall('default')[0].get('revision').split('/')[-1]
+    default_revision = xml_root.findall('default')[0].get('revision')
 
     #dump project data into the a list of dicts with the following data:
     #{project: {path, revision}}
@@ -228,6 +228,7 @@ if __name__ == '__main__':
 
         if not name in project_name_to_data:
             project_name_to_data[name] = {}
+        revision = revision.split('refs/heads/')[-1]
         project_name_to_data[name][revision] = path
 
     # get data on requested changes