summaryrefslogtreecommitdiffstats
path: root/project.py
diff options
context:
space:
mode:
authorShawn O. Pearce <sop@google.com>2009-04-10 18:53:46 -0700
committerShawn O. Pearce <sop@google.com>2009-04-18 16:50:47 -0700
commitfb2316146f6e3036e0cc3e08653920964a428a15 (patch)
treef19c5c65a035f547ada03496f1576524e4602665 /project.py
parent8bd5e60b16080008771afcaa7de7084487b84780 (diff)
downloadgit-repo-fb2316146f6e3036e0cc3e08653920964a428a15.tar.gz
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 <sop@google.com>
Diffstat (limited to 'project.py')
-rw-r--r--project.py10
1 files changed, 9 insertions, 1 deletions
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):
969 def _RemoteFetch(self, name=None): 969 def _RemoteFetch(self, name=None):
970 if not name: 970 if not name:
971 name = self.remote.name 971 name = self.remote.name
972
973 ssh_proxy = False
974 if self.GetRemote(name).PreConnectFetch():
975 ssh_proxy = True
976
972 cmd = ['fetch'] 977 cmd = ['fetch']
973 if not self.worktree: 978 if not self.worktree:
974 cmd.append('--update-head-ok') 979 cmd.append('--update-head-ok')
975 cmd.append(name) 980 cmd.append(name)
976 return GitCommand(self, cmd, bare = True).Wait() == 0 981 return GitCommand(self,
982 cmd,
983 bare = True,
984 ssh_proxy = ssh_proxy).Wait() == 0
977 985
978 def _Checkout(self, rev, quiet=False): 986 def _Checkout(self, rev, quiet=False):
979 cmd = ['checkout'] 987 cmd = ['checkout']