From fb2316146f6e3036e0cc3e08653920964a428a15 Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Fri, 10 Apr 2009 18:53:46 -0700 Subject: Automatically use SSH control master support during sync By creating a background ssh "control master" process which lives for the duration of our sync cycle we can easily cut the time for a no-op sync of 132 projects from 60s to 18s. Bug: REPO-11 Signed-off-by: Shawn O. Pearce --- project.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'project.py') diff --git a/project.py b/project.py index fd3f0b8d..304480a8 100644 --- a/project.py +++ b/project.py @@ -969,11 +969,19 @@ class Project(object): def _RemoteFetch(self, name=None): if not name: name = self.remote.name + + ssh_proxy = False + if self.GetRemote(name).PreConnectFetch(): + ssh_proxy = True + cmd = ['fetch'] if not self.worktree: cmd.append('--update-head-ok') cmd.append(name) - return GitCommand(self, cmd, bare = True).Wait() == 0 + return GitCommand(self, + cmd, + bare = True, + ssh_proxy = ssh_proxy).Wait() == 0 def _Checkout(self, rev, quiet=False): cmd = ['checkout'] -- cgit v1.2.3-54-g00ecf