diff options
Diffstat (limited to 'git_config.py')
| -rw-r--r-- | git_config.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/git_config.py b/git_config.py index d7fef8ca..978f6a59 100644 --- a/git_config.py +++ b/git_config.py | |||
| @@ -27,7 +27,6 @@ import urllib.request | |||
| 27 | from error import GitError, UploadError | 27 | from error import GitError, UploadError |
| 28 | import platform_utils | 28 | import platform_utils |
| 29 | from repo_trace import Trace | 29 | from repo_trace import Trace |
| 30 | import ssh | ||
| 31 | from git_command import GitCommand | 30 | from git_command import GitCommand |
| 32 | from git_refs import R_CHANGES, R_HEADS, R_TAGS | 31 | from git_refs import R_CHANGES, R_HEADS, R_TAGS |
| 33 | 32 | ||
| @@ -519,17 +518,23 @@ class Remote(object): | |||
| 519 | 518 | ||
| 520 | return self.url.replace(longest, longestUrl, 1) | 519 | return self.url.replace(longest, longestUrl, 1) |
| 521 | 520 | ||
| 522 | def PreConnectFetch(self): | 521 | def PreConnectFetch(self, ssh_proxy): |
| 523 | """Run any setup for this remote before we connect to it. | 522 | """Run any setup for this remote before we connect to it. |
| 524 | 523 | ||
| 525 | In practice, if the remote is using SSH, we'll attempt to create a new | 524 | In practice, if the remote is using SSH, we'll attempt to create a new |
| 526 | SSH master session to it for reuse across projects. | 525 | SSH master session to it for reuse across projects. |
| 527 | 526 | ||
| 527 | Args: | ||
| 528 | ssh_proxy: The SSH settings for managing master sessions. | ||
| 529 | |||
| 528 | Returns: | 530 | Returns: |
| 529 | Whether the preconnect phase for this remote was successful. | 531 | Whether the preconnect phase for this remote was successful. |
| 530 | """ | 532 | """ |
| 533 | if not ssh_proxy: | ||
| 534 | return True | ||
| 535 | |||
| 531 | connectionUrl = self._InsteadOf() | 536 | connectionUrl = self._InsteadOf() |
| 532 | return ssh.preconnect(connectionUrl) | 537 | return ssh_proxy.preconnect(connectionUrl) |
| 533 | 538 | ||
| 534 | def ReviewUrl(self, userEmail, validate_certs): | 539 | def ReviewUrl(self, userEmail, validate_certs): |
| 535 | if self._review_url is None: | 540 | if self._review_url is None: |
