diff options
| author | Shawn O. Pearce <sop@google.com> | 2011-09-26 09:08:01 -0700 |
|---|---|---|
| committer | Shawn O. Pearce <sop@google.com> | 2011-09-26 09:08:44 -0700 |
| commit | c4657969ebd3ec6bf28a37b6a53360314a01be73 (patch) | |
| tree | ada21c1775c4a8d96f30105f4d8c3480ca22fdb4 | |
| parent | 7b947de1ee015ab4d981d34566becba8222931ec (diff) | |
| download | git-repo-c4657969ebd3ec6bf28a37b6a53360314a01be73.tar.gz | |
sync: Update default -j flag from manifest
If the manifest is updated and the default sync-j attribute
was modified, honor it during this sync session if the user
has not supplied a -j flag on the command line.
Change-Id: I127ee5c779e2bbbb40b30bddc10ec1fa704b3bf3
Signed-off-by: Shawn O. Pearce <sop@google.com>
| -rw-r--r-- | subcmds/sync.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/subcmds/sync.py b/subcmds/sync.py index 7ab0b1fb..244a560b 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py | |||
| @@ -136,7 +136,6 @@ later is required to fix a server side protocol bug. | |||
| 136 | help='be more quiet') | 136 | help='be more quiet') |
| 137 | p.add_option('-j','--jobs', | 137 | p.add_option('-j','--jobs', |
| 138 | dest='jobs', action='store', type='int', | 138 | dest='jobs', action='store', type='int', |
| 139 | default=self.jobs, | ||
| 140 | help="projects to fetch simultaneously (default %d)" % self.jobs) | 139 | help="projects to fetch simultaneously (default %d)" % self.jobs) |
| 141 | if show_smart: | 140 | if show_smart: |
| 142 | p.add_option('-s', '--smart-sync', | 141 | p.add_option('-s', '--smart-sync', |
| @@ -401,6 +400,8 @@ uncommitted changes are present' % project.relpath | |||
| 401 | if not syncbuf.Finish(): | 400 | if not syncbuf.Finish(): |
| 402 | sys.exit(1) | 401 | sys.exit(1) |
| 403 | self.manifest._Unload() | 402 | self.manifest._Unload() |
| 403 | if opt.jobs is None: | ||
| 404 | self.jobs = self.manifest.default.sync_j | ||
| 404 | all = self.GetProjects(args, missing_ok=True) | 405 | all = self.GetProjects(args, missing_ok=True) |
| 405 | 406 | ||
| 406 | if not opt.local_only: | 407 | if not opt.local_only: |
