diff options
author | Mike Frysinger <vapier@google.com> | 2021-05-06 00:44:42 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@google.com> | 2021-05-10 21:16:06 +0000 |
commit | 339f2df1ddd741070e340ec01d6882dd1eee617c (patch) | |
tree | d16fe7c87ba966a400d545bef5a49c460b75dc57 /project.py | |
parent | 19e409c81863878d5d313fdc40b3975b98602454 (diff) | |
download | git-repo-339f2df1ddd741070e340ec01d6882dd1eee617c.tar.gz |
ssh: rewrite proxy management for multiprocessing usagev2.15
We changed sync to use multiprocessing for parallel work. This broke
the ssh proxy code as it's all based on threads. Rewrite the logic to
be multiprocessing safe.
Now instead of the module acting as a stateful object, callers have to
instantiate a new ProxyManager class that holds all the state, an pass
that down to any users.
Bug: https://crbug.com/gerrit/12389
Change-Id: I4b1af116f7306b91e825d3c56fb4274c9b033562
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/305486
Tested-by: Mike Frysinger <vapier@google.com>
Reviewed-by: Chris Mcdonald <cjmcdonald@google.com>
Diffstat (limited to 'project.py')
-rw-r--r-- | project.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -2045,8 +2045,8 @@ class Project(object): | |||
2045 | name = self.remote.name | 2045 | name = self.remote.name |
2046 | 2046 | ||
2047 | remote = self.GetRemote(name) | 2047 | remote = self.GetRemote(name) |
2048 | if not remote.PreConnectFetch(): | 2048 | if not remote.PreConnectFetch(ssh_proxy): |
2049 | ssh_proxy = False | 2049 | ssh_proxy = None |
2050 | 2050 | ||
2051 | if initial: | 2051 | if initial: |
2052 | if alt_dir and 'objects' == os.path.basename(alt_dir): | 2052 | if alt_dir and 'objects' == os.path.basename(alt_dir): |