diff options
-rw-r--r-- | project.py | 10 | ||||
-rw-r--r-- | subcmds/sync.py | 15 |
2 files changed, 21 insertions, 4 deletions
@@ -902,7 +902,11 @@ class Project(object): | |||
902 | 902 | ||
903 | ## Sync ## | 903 | ## Sync ## |
904 | 904 | ||
905 | def Sync_NetworkHalf(self, quiet=False, is_new=None, current_branch_only=False): | 905 | def Sync_NetworkHalf(self, |
906 | quiet=False, | ||
907 | is_new=None, | ||
908 | current_branch_only=False, | ||
909 | clone_bundle=True): | ||
906 | """Perform only the network IO portion of the sync process. | 910 | """Perform only the network IO portion of the sync process. |
907 | Local working directory/branch state is not affected. | 911 | Local working directory/branch state is not affected. |
908 | """ | 912 | """ |
@@ -925,7 +929,9 @@ class Project(object): | |||
925 | else: | 929 | else: |
926 | alt_dir = None | 930 | alt_dir = None |
927 | 931 | ||
928 | if alt_dir is None and self._ApplyCloneBundle(initial=is_new, quiet=quiet): | 932 | if clone_bundle \ |
933 | and alt_dir is None \ | ||
934 | and self._ApplyCloneBundle(initial=is_new, quiet=quiet): | ||
929 | is_new = False | 935 | is_new = False |
930 | 936 | ||
931 | if not self._RemoteFetch(initial=is_new, quiet=quiet, alt_dir=alt_dir, | 937 | if not self._RemoteFetch(initial=is_new, quiet=quiet, alt_dir=alt_dir, |
diff --git a/subcmds/sync.py b/subcmds/sync.py index 6dcce82e..74b3f183 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py | |||
@@ -86,6 +86,12 @@ specify a custom tag/label. | |||
86 | The -f/--force-broken option can be used to proceed with syncing | 86 | The -f/--force-broken option can be used to proceed with syncing |
87 | other projects if a project sync fails. | 87 | other projects if a project sync fails. |
88 | 88 | ||
89 | The --no-clone-bundle option disables any attempt to use | ||
90 | $URL/clone.bundle to bootstrap a new Git repository from a | ||
91 | resumeable bundle file on a content delivery network. This | ||
92 | may be necessary if there are problems with the local Python | ||
93 | HTTP client or proxy configuration, but the Git binary works. | ||
94 | |||
89 | SSH Connections | 95 | SSH Connections |
90 | --------------- | 96 | --------------- |
91 | 97 | ||
@@ -143,6 +149,9 @@ later is required to fix a server side protocol bug. | |||
143 | p.add_option('-m', '--manifest-name', | 149 | p.add_option('-m', '--manifest-name', |
144 | dest='manifest_name', | 150 | dest='manifest_name', |
145 | help='temporary manifest to use for this sync', metavar='NAME.xml') | 151 | help='temporary manifest to use for this sync', metavar='NAME.xml') |
152 | p.add_option('--no-clone-bundle', | ||
153 | dest='no_clone_bundle', action='store_true', | ||
154 | help='disable use of /clone.bundle on HTTP/HTTPS') | ||
146 | if show_smart: | 155 | if show_smart: |
147 | p.add_option('-s', '--smart-sync', | 156 | p.add_option('-s', '--smart-sync', |
148 | dest='smart_sync', action='store_true', | 157 | dest='smart_sync', action='store_true', |
@@ -185,8 +194,10 @@ later is required to fix a server side protocol bug. | |||
185 | # - We always make sure we unlock the lock if we locked it. | 194 | # - We always make sure we unlock the lock if we locked it. |
186 | try: | 195 | try: |
187 | try: | 196 | try: |
188 | success = project.Sync_NetworkHalf(quiet=opt.quiet, | 197 | success = project.Sync_NetworkHalf( |
189 | current_branch_only=opt.current_branch_only) | 198 | quiet=opt.quiet, |
199 | current_branch_only=opt.current_branch_only, | ||
200 | clone_bundle=not opt.no_clone_bundle) | ||
190 | 201 | ||
191 | # Lock around all the rest of the code, since printing, updating a set | 202 | # Lock around all the rest of the code, since printing, updating a set |
192 | # and Progress.update() are not thread safe. | 203 | # and Progress.update() are not thread safe. |