diff options
author | Shawn O. Pearce <sop@google.com> | 2009-04-10 18:53:46 -0700 |
---|---|---|
committer | Shawn O. Pearce <sop@google.com> | 2009-04-18 16:50:47 -0700 |
commit | fb2316146f6e3036e0cc3e08653920964a428a15 (patch) | |
tree | f19c5c65a035f547ada03496f1576524e4602665 /main.py | |
parent | 8bd5e60b16080008771afcaa7de7084487b84780 (diff) | |
download | git-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 'main.py')
-rwxr-xr-x | main.py | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -28,6 +28,7 @@ import re | |||
28 | import sys | 28 | import sys |
29 | 29 | ||
30 | from trace import SetTrace | 30 | from trace import SetTrace |
31 | from git_config import close_ssh | ||
31 | from command import InteractiveCommand | 32 | from command import InteractiveCommand |
32 | from command import MirrorSafeCommand | 33 | from command import MirrorSafeCommand |
33 | from command import PagedCommand | 34 | from command import PagedCommand |
@@ -212,7 +213,10 @@ def _Main(argv): | |||
212 | 213 | ||
213 | repo = _Repo(opt.repodir) | 214 | repo = _Repo(opt.repodir) |
214 | try: | 215 | try: |
215 | repo._Run(argv) | 216 | try: |
217 | repo._Run(argv) | ||
218 | finally: | ||
219 | close_ssh() | ||
216 | except KeyboardInterrupt: | 220 | except KeyboardInterrupt: |
217 | sys.exit(1) | 221 | sys.exit(1) |
218 | except RepoChangedException, rce: | 222 | except RepoChangedException, rce: |