diff options
Diffstat (limited to 'gitc_utils.py')
| -rw-r--r-- | gitc_utils.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gitc_utils.py b/gitc_utils.py index 0d4a5c38..f49f7be6 100644 --- a/gitc_utils.py +++ b/gitc_utils.py | |||
| @@ -58,8 +58,8 @@ def _set_project_revisions(projects): | |||
| 58 | sys.exit(1) | 58 | sys.exit(1) |
| 59 | revisionExpr = gitcmd.stdout.split('\t')[0] | 59 | revisionExpr = gitcmd.stdout.split('\t')[0] |
| 60 | if not revisionExpr: | 60 | if not revisionExpr: |
| 61 | raise(ManifestParseError('Invalid SHA-1 revision project %s (%s)' % | 61 | raise ManifestParseError('Invalid SHA-1 revision project %s (%s)' % |
| 62 | (proj.remote.url, proj.revisionExpr))) | 62 | (proj.remote.url, proj.revisionExpr)) |
| 63 | proj.revisionExpr = revisionExpr | 63 | proj.revisionExpr = revisionExpr |
| 64 | 64 | ||
| 65 | def _manifest_groups(manifest): | 65 | def _manifest_groups(manifest): |
| @@ -87,7 +87,7 @@ def generate_gitc_manifest(gitc_manifest, manifest, paths=None): | |||
| 87 | print('Generating GITC Manifest by fetching revision SHAs for each ' | 87 | print('Generating GITC Manifest by fetching revision SHAs for each ' |
| 88 | 'project.') | 88 | 'project.') |
| 89 | if paths is None: | 89 | if paths is None: |
| 90 | paths = manifest.paths.keys() | 90 | paths = list(manifest.paths.keys()) |
| 91 | 91 | ||
| 92 | groups = [x for x in re.split(r'[,\s]+', _manifest_groups(manifest)) if x] | 92 | groups = [x for x in re.split(r'[,\s]+', _manifest_groups(manifest)) if x] |
| 93 | 93 | ||
| @@ -96,7 +96,7 @@ def generate_gitc_manifest(gitc_manifest, manifest, paths=None): | |||
| 96 | projects = [p for p in projects if p.MatchesGroups(groups)] | 96 | projects = [p for p in projects if p.MatchesGroups(groups)] |
| 97 | 97 | ||
| 98 | if gitc_manifest is not None: | 98 | if gitc_manifest is not None: |
| 99 | for path, proj in manifest.paths.iteritems(): | 99 | for path, proj in manifest.paths.items(): |
| 100 | if not proj.MatchesGroups(groups): | 100 | if not proj.MatchesGroups(groups): |
| 101 | continue | 101 | continue |
| 102 | 102 | ||
| @@ -124,7 +124,7 @@ def generate_gitc_manifest(gitc_manifest, manifest, paths=None): | |||
| 124 | index += NUM_BATCH_RETRIEVE_REVISIONID | 124 | index += NUM_BATCH_RETRIEVE_REVISIONID |
| 125 | 125 | ||
| 126 | if gitc_manifest is not None: | 126 | if gitc_manifest is not None: |
| 127 | for path, proj in gitc_manifest.paths.iteritems(): | 127 | for path, proj in gitc_manifest.paths.items(): |
| 128 | if proj.old_revision and path in paths: | 128 | if proj.old_revision and path in paths: |
| 129 | # If we updated a project that has been started, keep the old-revision | 129 | # If we updated a project that has been started, keep the old-revision |
| 130 | # updated. | 130 | # updated. |
| @@ -133,7 +133,7 @@ def generate_gitc_manifest(gitc_manifest, manifest, paths=None): | |||
| 133 | repo_proj.revisionExpr = None | 133 | repo_proj.revisionExpr = None |
| 134 | 134 | ||
| 135 | # Convert URLs from relative to absolute. | 135 | # Convert URLs from relative to absolute. |
| 136 | for _name, remote in manifest.remotes.iteritems(): | 136 | for _name, remote in manifest.remotes.items(): |
| 137 | remote.fetchUrl = remote.resolvedFetchUrl | 137 | remote.fetchUrl = remote.resolvedFetchUrl |
| 138 | 138 | ||
| 139 | # Save the manifest. | 139 | # Save the manifest. |
