Show More
@@ -651,6 +651,7 def hgmerge(orig, repo, node, force=None | |||||
651 | # take some extra care so that the largefiles are correctly updated in the |
|
651 | # take some extra care so that the largefiles are correctly updated in the | |
652 | # working copy |
|
652 | # working copy | |
653 | def overridepull(orig, ui, repo, source=None, **opts): |
|
653 | def overridepull(orig, ui, repo, source=None, **opts): | |
|
654 | revsprepull = len(repo) | |||
654 | if opts.get('rebase', False): |
|
655 | if opts.get('rebase', False): | |
655 | repo._isrebasing = True |
|
656 | repo._isrebasing = True | |
656 | try: |
|
657 | try: | |
@@ -660,7 +661,6 def overridepull(orig, ui, repo, source= | |||||
660 | 'the update flag\n') |
|
661 | 'the update flag\n') | |
661 | del opts['rebase'] |
|
662 | del opts['rebase'] | |
662 | cmdutil.bailifchanged(repo) |
|
663 | cmdutil.bailifchanged(repo) | |
663 | revsprepull = len(repo) |
|
|||
664 | origpostincoming = commands.postincoming |
|
664 | origpostincoming = commands.postincoming | |
665 | def _dummy(*args, **kwargs): |
|
665 | def _dummy(*args, **kwargs): | |
666 | pass |
|
666 | pass | |
@@ -695,6 +695,12 def overridepull(orig, ui, repo, source= | |||||
695 | (cached, missing) = lfcommands.cachelfiles(ui, repo, head) |
|
695 | (cached, missing) = lfcommands.cachelfiles(ui, repo, head) | |
696 | numcached += len(cached) |
|
696 | numcached += len(cached) | |
697 | ui.status(_("%d largefiles cached\n") % numcached) |
|
697 | ui.status(_("%d largefiles cached\n") % numcached) | |
|
698 | if opts.get('all_largefiles'): | |||
|
699 | revspostpull = len(repo) | |||
|
700 | revs = [] | |||
|
701 | for rev in xrange(revsprepull + 1, revspostpull): | |||
|
702 | revs.append(repo[rev].rev()) | |||
|
703 | lfcommands.downloadlfiles(ui, repo, revs) | |||
698 | return result |
|
704 | return result | |
699 |
|
705 | |||
700 | def overrideclone(orig, ui, source, dest=None, **opts): |
|
706 | def overrideclone(orig, ui, source, dest=None, **opts): |
@@ -70,6 +70,9 def uisetup(ui): | |||||
70 | overrides.overrideupdate) |
|
70 | overrides.overrideupdate) | |
71 | entry = extensions.wrapcommand(commands.table, 'pull', |
|
71 | entry = extensions.wrapcommand(commands.table, 'pull', | |
72 | overrides.overridepull) |
|
72 | overrides.overridepull) | |
|
73 | pullopt = [('', 'all-largefiles', None, | |||
|
74 | _('download all pulled versions of largefiles'))] | |||
|
75 | entry[1].extend(pullopt) | |||
73 | entry = extensions.wrapcommand(commands.table, 'clone', |
|
76 | entry = extensions.wrapcommand(commands.table, 'clone', | |
74 | overrides.overrideclone) |
|
77 | overrides.overrideclone) | |
75 | cloneopt = [('', 'all-largefiles', None, |
|
78 | cloneopt = [('', 'all-largefiles', None, |
@@ -444,6 +444,33 Test cloning with --all-largefiles flag | |||||
444 | 3 largefiles updated, 0 removed |
|
444 | 3 largefiles updated, 0 removed | |
445 | 8 additional largefiles cached |
|
445 | 8 additional largefiles cached | |
446 |
|
446 | |||
|
447 | Test pulling with --all-largefiles flag | |||
|
448 | ||||
|
449 | $ rm -Rf a-backup | |||
|
450 | $ hg clone -r 1 a a-backup | |||
|
451 | adding changesets | |||
|
452 | adding manifests | |||
|
453 | adding file changes | |||
|
454 | added 2 changesets with 8 changes to 4 files | |||
|
455 | updating to branch default | |||
|
456 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
457 | getting changed largefiles | |||
|
458 | 2 largefiles updated, 0 removed | |||
|
459 | $ rm -Rf ${USERCACHE}/* | |||
|
460 | $ cd a-backup | |||
|
461 | $ hg pull --all-largefiles | |||
|
462 | pulling from $TESTTMP/a | |||
|
463 | searching for changes | |||
|
464 | adding changesets | |||
|
465 | adding manifests | |||
|
466 | adding file changes | |||
|
467 | added 6 changesets with 16 changes to 8 files | |||
|
468 | (run 'hg update' to get a working copy) | |||
|
469 | caching new largefiles | |||
|
470 | 3 largefiles cached | |||
|
471 | 3 additional largefiles cached | |||
|
472 | $ cd .. | |||
|
473 | ||||
447 | Rebasing between two repositories does not revert largefiles to old |
|
474 | Rebasing between two repositories does not revert largefiles to old | |
448 | revisions (this was a very bad bug that took a lot of work to fix). |
|
475 | revisions (this was a very bad bug that took a lot of work to fix). | |
449 |
|
476 |
General Comments 0
You need to be logged in to leave comments.
Login now