##// END OF EJS Templates
largefiles: delegate to the wrapped clone command...
Matt Harbison -
r17601:6e2ab601 stable
parent child Browse files
Show More
@@ -727,15 +727,13 b' def overrideclone(orig, ui, source, dest'
727 727 raise util.Abort(_(
728 728 '--all-largefiles is incompatible with non-local destination %s' %
729 729 d))
730 result = hg.clone(ui, opts, source, dest,
731 pull=opts.get('pull'),
732 stream=opts.get('uncompressed'),
733 rev=opts.get('rev'),
734 update=opts.get('updaterev') or not opts.get('noupdate'),
735 branch=opts.get('branch'))
736 if result is None:
737 return True
738 if opts.get('all_largefiles'):
730
731 return orig(ui, source, dest, **opts)
732
733 def hgclone(orig, ui, opts, *args, **kwargs):
734 result = orig(ui, opts, *args, **kwargs)
735
736 if result is not None and opts.get('all_largefiles'):
739 737 sourcerepo, destrepo = result
740 738 repo = destrepo.local()
741 739
@@ -750,8 +748,11 b' def overrideclone(orig, ui, source, dest'
750 748 # Caching is implicitly limited to 'rev' option, since the dest repo was
751 749 # truncated at that point.
752 750 success, missing = lfcommands.downloadlfiles(ui, repo, None)
753 return missing != 0
754 return result is None
751
752 if missing != 0:
753 return None
754
755 return result
755 756
756 757 def overriderebase(orig, ui, repo, **opts):
757 758 repo._isrebasing = True
@@ -77,8 +77,9 b' def uisetup(ui):'
77 77 overrides.overrideclone)
78 78 cloneopt = [('', 'all-largefiles', None,
79 79 _('download all versions of all largefiles'))]
80 entry[1].extend(cloneopt)
81 entry = extensions.wrapfunction(hg, 'clone', overrides.hgclone)
80 82
81 entry[1].extend(cloneopt)
82 83 entry = extensions.wrapcommand(commands.table, 'cat',
83 84 overrides.overridecat)
84 85 entry = extensions.wrapfunction(merge, '_checkunknownfile',
@@ -717,6 +717,12 b' Test cloning with --all-largefiles flag'
717 717 3 largefiles updated, 0 removed
718 718 $ cd ..
719 719
720 Ensure base clone command argument validation
721
722 $ hg clone -U -u 0 a a-clone-failure
723 abort: cannot specify both --noupdate and --updaterev
724 [255]
725
720 726 $ hg clone --all-largefiles a ssh://localhost/a
721 727 abort: --all-largefiles is incompatible with non-local destination ssh://localhost/a
722 728 [255]
General Comments 0
You need to be logged in to leave comments. Login now