Show More
@@ -727,15 +727,13 b' def overrideclone(orig, ui, source, dest' | |||||
727 | raise util.Abort(_( |
|
727 | raise util.Abort(_( | |
728 | '--all-largefiles is incompatible with non-local destination %s' % |
|
728 | '--all-largefiles is incompatible with non-local destination %s' % | |
729 | d)) |
|
729 | d)) | |
730 | result = hg.clone(ui, opts, source, dest, |
|
730 | ||
731 | pull=opts.get('pull'), |
|
731 | return orig(ui, source, dest, **opts) | |
732 | stream=opts.get('uncompressed'), |
|
732 | ||
733 | rev=opts.get('rev'), |
|
733 | def hgclone(orig, ui, opts, *args, **kwargs): | |
734 | update=opts.get('updaterev') or not opts.get('noupdate'), |
|
734 | result = orig(ui, opts, *args, **kwargs) | |
735 | branch=opts.get('branch')) |
|
735 | ||
736 | if result is None: |
|
736 | if result is not None and opts.get('all_largefiles'): | |
737 | return True |
|
|||
738 | if opts.get('all_largefiles'): |
|
|||
739 | sourcerepo, destrepo = result |
|
737 | sourcerepo, destrepo = result | |
740 | repo = destrepo.local() |
|
738 | repo = destrepo.local() | |
741 |
|
739 | |||
@@ -750,8 +748,11 b' def overrideclone(orig, ui, source, dest' | |||||
750 | # Caching is implicitly limited to 'rev' option, since the dest repo was |
|
748 | # Caching is implicitly limited to 'rev' option, since the dest repo was | |
751 | # truncated at that point. |
|
749 | # truncated at that point. | |
752 | success, missing = lfcommands.downloadlfiles(ui, repo, None) |
|
750 | success, missing = lfcommands.downloadlfiles(ui, repo, None) | |
753 | return missing != 0 |
|
751 | ||
754 | return result is None |
|
752 | if missing != 0: | |
|
753 | return None | |||
|
754 | ||||
|
755 | return result | |||
755 |
|
756 | |||
756 | def overriderebase(orig, ui, repo, **opts): |
|
757 | def overriderebase(orig, ui, repo, **opts): | |
757 | repo._isrebasing = True |
|
758 | repo._isrebasing = True |
@@ -77,8 +77,9 b' def uisetup(ui):' | |||||
77 | overrides.overrideclone) |
|
77 | overrides.overrideclone) | |
78 | cloneopt = [('', 'all-largefiles', None, |
|
78 | cloneopt = [('', 'all-largefiles', None, | |
79 | _('download all versions of all largefiles'))] |
|
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 | entry = extensions.wrapcommand(commands.table, 'cat', |
|
83 | entry = extensions.wrapcommand(commands.table, 'cat', | |
83 | overrides.overridecat) |
|
84 | overrides.overridecat) | |
84 | entry = extensions.wrapfunction(merge, '_checkunknownfile', |
|
85 | entry = extensions.wrapfunction(merge, '_checkunknownfile', |
@@ -717,6 +717,12 b' Test cloning with --all-largefiles flag' | |||||
717 | 3 largefiles updated, 0 removed |
|
717 | 3 largefiles updated, 0 removed | |
718 | $ cd .. |
|
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 | $ hg clone --all-largefiles a ssh://localhost/a |
|
726 | $ hg clone --all-largefiles a ssh://localhost/a | |
721 | abort: --all-largefiles is incompatible with non-local destination ssh://localhost/a |
|
727 | abort: --all-largefiles is incompatible with non-local destination ssh://localhost/a | |
722 | [255] |
|
728 | [255] |
General Comments 0
You need to be logged in to leave comments.
Login now