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 --- main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'main.py') diff --git a/main.py b/main.py index 6fa1e51b..774b9038 100755 --- a/main.py +++ b/main.py @@ -28,6 +28,7 @@ import re import sys from trace import SetTrace +from git_config import close_ssh from command import InteractiveCommand from command import MirrorSafeCommand from command import PagedCommand @@ -212,7 +213,10 @@ def _Main(argv): repo = _Repo(opt.repodir) try: - repo._Run(argv) + try: + repo._Run(argv) + finally: + close_ssh() except KeyboardInterrupt: sys.exit(1) except RepoChangedException, rce: -- cgit v1.2.3-54-g00ecf