mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
sync: --no-clone-bundle disables the clone bundle support
Change-Id: Ia9ed7da8451b273c1be620c3dd0dcad777b29096
This commit is contained in:
parent
898e12a2d9
commit
e02ac0af2e
10
project.py
10
project.py
@ -902,7 +902,11 @@ class Project(object):
|
|||||||
|
|
||||||
## Sync ##
|
## Sync ##
|
||||||
|
|
||||||
def Sync_NetworkHalf(self, quiet=False, is_new=None, current_branch_only=False):
|
def Sync_NetworkHalf(self,
|
||||||
|
quiet=False,
|
||||||
|
is_new=None,
|
||||||
|
current_branch_only=False,
|
||||||
|
clone_bundle=True):
|
||||||
"""Perform only the network IO portion of the sync process.
|
"""Perform only the network IO portion of the sync process.
|
||||||
Local working directory/branch state is not affected.
|
Local working directory/branch state is not affected.
|
||||||
"""
|
"""
|
||||||
@ -925,7 +929,9 @@ class Project(object):
|
|||||||
else:
|
else:
|
||||||
alt_dir = None
|
alt_dir = None
|
||||||
|
|
||||||
if alt_dir is None and self._ApplyCloneBundle(initial=is_new, quiet=quiet):
|
if clone_bundle \
|
||||||
|
and alt_dir is None \
|
||||||
|
and self._ApplyCloneBundle(initial=is_new, quiet=quiet):
|
||||||
is_new = False
|
is_new = False
|
||||||
|
|
||||||
if not self._RemoteFetch(initial=is_new, quiet=quiet, alt_dir=alt_dir,
|
if not self._RemoteFetch(initial=is_new, quiet=quiet, alt_dir=alt_dir,
|
||||||
|
@ -86,6 +86,12 @@ specify a custom tag/label.
|
|||||||
The -f/--force-broken option can be used to proceed with syncing
|
The -f/--force-broken option can be used to proceed with syncing
|
||||||
other projects if a project sync fails.
|
other projects if a project sync fails.
|
||||||
|
|
||||||
|
The --no-clone-bundle option disables any attempt to use
|
||||||
|
$URL/clone.bundle to bootstrap a new Git repository from a
|
||||||
|
resumeable bundle file on a content delivery network. This
|
||||||
|
may be necessary if there are problems with the local Python
|
||||||
|
HTTP client or proxy configuration, but the Git binary works.
|
||||||
|
|
||||||
SSH Connections
|
SSH Connections
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
@ -143,6 +149,9 @@ later is required to fix a server side protocol bug.
|
|||||||
p.add_option('-m', '--manifest-name',
|
p.add_option('-m', '--manifest-name',
|
||||||
dest='manifest_name',
|
dest='manifest_name',
|
||||||
help='temporary manifest to use for this sync', metavar='NAME.xml')
|
help='temporary manifest to use for this sync', metavar='NAME.xml')
|
||||||
|
p.add_option('--no-clone-bundle',
|
||||||
|
dest='no_clone_bundle', action='store_true',
|
||||||
|
help='disable use of /clone.bundle on HTTP/HTTPS')
|
||||||
if show_smart:
|
if show_smart:
|
||||||
p.add_option('-s', '--smart-sync',
|
p.add_option('-s', '--smart-sync',
|
||||||
dest='smart_sync', action='store_true',
|
dest='smart_sync', action='store_true',
|
||||||
@ -185,8 +194,10 @@ later is required to fix a server side protocol bug.
|
|||||||
# - We always make sure we unlock the lock if we locked it.
|
# - We always make sure we unlock the lock if we locked it.
|
||||||
try:
|
try:
|
||||||
try:
|
try:
|
||||||
success = project.Sync_NetworkHalf(quiet=opt.quiet,
|
success = project.Sync_NetworkHalf(
|
||||||
current_branch_only=opt.current_branch_only)
|
quiet=opt.quiet,
|
||||||
|
current_branch_only=opt.current_branch_only,
|
||||||
|
clone_bundle=not opt.no_clone_bundle)
|
||||||
|
|
||||||
# Lock around all the rest of the code, since printing, updating a set
|
# Lock around all the rest of the code, since printing, updating a set
|
||||||
# and Progress.update() are not thread safe.
|
# and Progress.update() are not thread safe.
|
||||||
|
Loading…
Reference in New Issue
Block a user