diff options
author | Russ Cox <rsc@golang.org> | 2009-11-07 18:56:29 -0800 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2009-11-07 18:56:29 -0800 |
commit | 5f7e4a0eb973f35c08e363768fbce93aebcbb174 (patch) | |
tree | f3e6caa4801cfc9fb4c2bba197a7763c11089c9c /lib/codereview/codereview.py | |
parent | a01d5c3f9ef2009c45c52181fbc28aee358632cc (diff) | |
download | golang-5f7e4a0eb973f35c08e363768fbce93aebcbb174.tar.gz |
fix authentication in parallel LoadAllCL
R=r
http://go/go-review/1024018
Diffstat (limited to 'lib/codereview/codereview.py')
-rw-r--r-- | lib/codereview/codereview.py | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/codereview/codereview.py b/lib/codereview/codereview.py index 06423963b..f5ebc595e 100644 --- a/lib/codereview/codereview.py +++ b/lib/codereview/codereview.py @@ -372,14 +372,21 @@ def LoadAllCL(ui, repo, web=True): files = [f for f in os.listdir(dir) if f.startswith('cl.')] if not files: return m - if web: - # Authenticate now, so we can use threads below - MySend(None) active = [] + first = True for f in files: t = LoadCLThread(ui, repo, dir, f, web) t.start() - active.append(t) + if web and first: + # first request: wait in case it needs to authenticate + # otherwise we get lots of user/password prompts + # running in parallel. + t.join() + if t.cl: + m[t.cl.name] = t.cl + first = False + else: + active.append(t) for t in active: t.join() if t.cl: |