diff options
-rw-r--r-- | gitc_utils.py | 12 | ||||
-rw-r--r-- | subcmds/abandon.py | 2 | ||||
-rw-r--r-- | subcmds/info.py | 2 |
3 files changed, 8 insertions, 8 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. |
diff --git a/subcmds/abandon.py b/subcmds/abandon.py index be32dc5c..f1c2a839 100644 --- a/subcmds/abandon.py +++ b/subcmds/abandon.py | |||
@@ -58,7 +58,7 @@ It is equivalent to "git branch -D <branchname>". | |||
58 | pm.update() | 58 | pm.update() |
59 | 59 | ||
60 | if opt.all: | 60 | if opt.all: |
61 | branches = project.GetBranches().keys() | 61 | branches = list(project.GetBranches().keys()) |
62 | else: | 62 | else: |
63 | branches = [nb] | 63 | branches = [nb] |
64 | 64 | ||
diff --git a/subcmds/info.py b/subcmds/info.py index f2827b34..2fff3acc 100644 --- a/subcmds/info.py +++ b/subcmds/info.py | |||
@@ -99,7 +99,7 @@ class Info(PagedCommand): | |||
99 | self.headtext(p.revisionExpr) | 99 | self.headtext(p.revisionExpr) |
100 | self.out.nl() | 100 | self.out.nl() |
101 | 101 | ||
102 | localBranches = p.GetBranches().keys() | 102 | localBranches = list(p.GetBranches().keys()) |
103 | self.heading("Local Branches: ") | 103 | self.heading("Local Branches: ") |
104 | self.redtext(str(len(localBranches))) | 104 | self.redtext(str(len(localBranches))) |
105 | if len(localBranches) > 0: | 105 | if len(localBranches) > 0: |