summaryrefslogtreecommitdiffstats
path: root/subcmds/sync.py
diff options
context:
space:
mode:
Diffstat (limited to 'subcmds/sync.py')
-rw-r--r--subcmds/sync.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/subcmds/sync.py b/subcmds/sync.py
index 797fc403..b88c596d 100644
--- a/subcmds/sync.py
+++ b/subcmds/sync.py
@@ -356,7 +356,9 @@ later is required to fix a server side protocol bug.
356 def _Fetch(self, projects, opt): 356 def _Fetch(self, projects, opt):
357 fetched = set() 357 fetched = set()
358 lock = _threading.Lock() 358 lock = _threading.Lock()
359 pm = Progress('Fetching projects', len(projects)) 359 pm = Progress('Fetching projects', len(projects),
360 print_newline=not(opt.quiet),
361 always_print_percentage=opt.quiet)
360 362
361 objdir_project_map = dict() 363 objdir_project_map = dict()
362 for project in projects: 364 for project in projects:
@@ -393,7 +395,7 @@ later is required to fix a server side protocol bug.
393 t.join() 395 t.join()
394 396
395 # If we saw an error, exit with code 1 so that other scripts can check. 397 # If we saw an error, exit with code 1 so that other scripts can check.
396 if err_event.isSet(): 398 if err_event.isSet() and not opt.force_broken:
397 print('\nerror: Exited sync due to fetch errors', file=sys.stderr) 399 print('\nerror: Exited sync due to fetch errors', file=sys.stderr)
398 sys.exit(1) 400 sys.exit(1)
399 401
@@ -779,8 +781,8 @@ later is required to fix a server side protocol bug.
779 # generate a new args list to represent the opened projects. 781 # generate a new args list to represent the opened projects.
780 # TODO: make this more reliable -- if there's a project name/path overlap, 782 # TODO: make this more reliable -- if there's a project name/path overlap,
781 # this may choose the wrong project. 783 # this may choose the wrong project.
782 args = [os.path.relpath(self.manifest.paths[p].worktree, os.getcwd()) 784 args = [os.path.relpath(self.manifest.paths[path].worktree, os.getcwd())
783 for p in opened_projects] 785 for path in opened_projects]
784 if not args: 786 if not args:
785 return 787 return
786 all_projects = self.GetProjects(args, 788 all_projects = self.GetProjects(args,