diff options
Diffstat (limited to 'subcmds/download.py')
| -rw-r--r-- | subcmds/download.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/subcmds/download.py b/subcmds/download.py index 523f25e0..15824843 100644 --- a/subcmds/download.py +++ b/subcmds/download.py | |||
| @@ -48,7 +48,7 @@ If no project is specified try to use current directory as a project. | |||
| 48 | dest='ffonly', action='store_true', | 48 | dest='ffonly', action='store_true', |
| 49 | help="force fast-forward merge") | 49 | help="force fast-forward merge") |
| 50 | 50 | ||
| 51 | def _ParseChangeIds(self, args): | 51 | def _ParseChangeIds(self, opt, args): |
| 52 | if not args: | 52 | if not args: |
| 53 | self.Usage() | 53 | self.Usage() |
| 54 | 54 | ||
| @@ -77,7 +77,7 @@ If no project is specified try to use current directory as a project. | |||
| 77 | ps_id = max(int(match.group(1)), ps_id) | 77 | ps_id = max(int(match.group(1)), ps_id) |
| 78 | to_get.append((project, chg_id, ps_id)) | 78 | to_get.append((project, chg_id, ps_id)) |
| 79 | else: | 79 | else: |
| 80 | projects = self.GetProjects([a]) | 80 | projects = self.GetProjects([a], all_manifests=not opt.this_manifest_only) |
| 81 | if len(projects) > 1: | 81 | if len(projects) > 1: |
| 82 | # If the cwd is one of the projects, assume they want that. | 82 | # If the cwd is one of the projects, assume they want that. |
| 83 | try: | 83 | try: |
| @@ -88,8 +88,8 @@ If no project is specified try to use current directory as a project. | |||
| 88 | print('error: %s matches too many projects; please re-run inside ' | 88 | print('error: %s matches too many projects; please re-run inside ' |
| 89 | 'the project checkout.' % (a,), file=sys.stderr) | 89 | 'the project checkout.' % (a,), file=sys.stderr) |
| 90 | for project in projects: | 90 | for project in projects: |
| 91 | print(' %s/ @ %s' % (project.relpath, project.revisionExpr), | 91 | print(' %s/ @ %s' % (project.RelPath(local=opt.this_manifest_only), |
| 92 | file=sys.stderr) | 92 | project.revisionExpr), file=sys.stderr) |
| 93 | sys.exit(1) | 93 | sys.exit(1) |
| 94 | else: | 94 | else: |
| 95 | project = projects[0] | 95 | project = projects[0] |
| @@ -105,7 +105,7 @@ If no project is specified try to use current directory as a project. | |||
| 105 | self.OptionParser.error('-x and --ff are mutually exclusive options') | 105 | self.OptionParser.error('-x and --ff are mutually exclusive options') |
| 106 | 106 | ||
| 107 | def Execute(self, opt, args): | 107 | def Execute(self, opt, args): |
| 108 | for project, change_id, ps_id in self._ParseChangeIds(args): | 108 | for project, change_id, ps_id in self._ParseChangeIds(opt, args): |
| 109 | dl = project.DownloadPatchSet(change_id, ps_id) | 109 | dl = project.DownloadPatchSet(change_id, ps_id) |
| 110 | if not dl: | 110 | if not dl: |
| 111 | print('[%s] change %d/%d not found' | 111 | print('[%s] change %d/%d not found' |
