diff options
Diffstat (limited to 'gitc_utils.py')
-rw-r--r-- | gitc_utils.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gitc_utils.py b/gitc_utils.py index 0f3e1818..7a35e7a0 100644 --- a/gitc_utils.py +++ b/gitc_utils.py | |||
@@ -24,6 +24,8 @@ import git_command | |||
24 | import git_config | 24 | import git_config |
25 | import wrapper | 25 | import wrapper |
26 | 26 | ||
27 | from error import ManifestParseError | ||
28 | |||
27 | NUM_BATCH_RETRIEVE_REVISIONID = 300 | 29 | NUM_BATCH_RETRIEVE_REVISIONID = 300 |
28 | 30 | ||
29 | def get_gitc_manifest_dir(): | 31 | def get_gitc_manifest_dir(): |
@@ -54,7 +56,11 @@ def _set_project_revisions(projects): | |||
54 | if gitcmd.Wait(): | 56 | if gitcmd.Wait(): |
55 | print('FATAL: Failed to retrieve revisionExpr for %s' % proj) | 57 | print('FATAL: Failed to retrieve revisionExpr for %s' % proj) |
56 | sys.exit(1) | 58 | sys.exit(1) |
57 | proj.revisionExpr = gitcmd.stdout.split('\t')[0] | 59 | revisionExpr = gitcmd.stdout.split('\t')[0] |
60 | if not revisionExpr: | ||
61 | raise(ManifestParseError('Invalid SHA-1 revision project %s (%s)' % | ||
62 | (proj.remote.url, proj.revisionExpr))) | ||
63 | proj.revisionExpr = revisionExpr | ||
58 | 64 | ||
59 | def _manifest_groups(manifest): | 65 | def _manifest_groups(manifest): |
60 | """Returns the manifest group string that should be synced | 66 | """Returns the manifest group string that should be synced |
@@ -127,7 +133,7 @@ def generate_gitc_manifest(gitc_manifest, manifest, paths=None): | |||
127 | repo_proj.revisionExpr = None | 133 | repo_proj.revisionExpr = None |
128 | 134 | ||
129 | # Convert URLs from relative to absolute. | 135 | # Convert URLs from relative to absolute. |
130 | for name, remote in manifest.remotes.iteritems(): | 136 | for _name, remote in manifest.remotes.iteritems(): |
131 | remote.fetchUrl = remote.resolvedFetchUrl | 137 | remote.fetchUrl = remote.resolvedFetchUrl |
132 | 138 | ||
133 | # Save the manifest. | 139 | # Save the manifest. |