Show More
@@ -10,7 +10,7 b'' | |||
|
10 | 10 | import copy |
|
11 | 11 | import os |
|
12 | 12 | |
|
13 |
from mercurial import error, manifest, match as match_, util |
|
|
13 | from mercurial import error, manifest, match as match_, util | |
|
14 | 14 | from mercurial.i18n import _ |
|
15 | 15 | from mercurial import localrepo |
|
16 | 16 | |
@@ -412,15 +412,6 b' def reposetup(ui, repo):' | |||
|
412 | 412 | " supported in the destination:" |
|
413 | 413 | " %s") % (', '.join(sorted(missing))) |
|
414 | 414 | raise util.Abort(msg) |
|
415 | ||
|
416 | outgoing = discovery.findcommonoutgoing(repo, remote.peer(), | |
|
417 | force=force) | |
|
418 | if outgoing.missing: | |
|
419 | toupload = set() | |
|
420 | o = self.changelog.nodesbetween(outgoing.missing, revs)[0] | |
|
421 | addfunc = lambda fn, lfhash: toupload.add(lfhash) | |
|
422 | lfutil.getlfilestoupload(self, o, addfunc) | |
|
423 | lfcommands.uploadlfiles(ui, self, remote, toupload) | |
|
424 | 415 | return super(lfilesrepo, self).push(remote, force=force, revs=revs, |
|
425 | 416 | newbranch=newbranch) |
|
426 | 417 | |
@@ -480,6 +471,14 b' def reposetup(ui, repo):' | |||
|
480 | 471 | |
|
481 | 472 | repo.__class__ = lfilesrepo |
|
482 | 473 | |
|
474 | def prepushoutgoinghook(local, remote, outgoing): | |
|
475 | if outgoing.missing: | |
|
476 | toupload = set() | |
|
477 | addfunc = lambda fn, lfhash: toupload.add(lfhash) | |
|
478 | lfutil.getlfilestoupload(local, outgoing.missing, addfunc) | |
|
479 | lfcommands.uploadlfiles(ui, local, remote, toupload) | |
|
480 | repo.prepushoutgoinghooks.add("largefiles", prepushoutgoinghook) | |
|
481 | ||
|
483 | 482 | def checkrequireslfiles(ui, repo, **kwargs): |
|
484 | 483 | if 'largefiles' not in repo.requirements and util.any( |
|
485 | 484 | lfutil.shortname+'/' in f[0] for f in repo.store.datafiles()): |
@@ -1593,7 +1593,6 b' largefiles can be pushed locally (issue3' | |||
|
1593 | 1593 | $ hg push ../dest |
|
1594 | 1594 | pushing to ../dest |
|
1595 | 1595 | searching for changes |
|
1596 | searching for changes | |
|
1597 | 1596 | adding changesets |
|
1598 | 1597 | adding manifests |
|
1599 | 1598 | adding file changes |
@@ -1687,7 +1686,6 b' Push of file that exists on server but i' | |||
|
1687 | 1686 | $ hg push -R r7 http://localhost:$HGPORT1 |
|
1688 | 1687 | pushing to http://localhost:$HGPORT1/ |
|
1689 | 1688 | searching for changes |
|
1690 | searching for changes | |
|
1691 | 1689 | remote: adding changesets |
|
1692 | 1690 | remote: adding manifests |
|
1693 | 1691 | remote: adding file changes |
@@ -1711,7 +1709,6 b' Push a largefiles repository to a served' | |||
|
1711 | 1709 | $ hg push -R r8 http://localhost:$HGPORT2/#default |
|
1712 | 1710 | pushing to http://localhost:$HGPORT2/ |
|
1713 | 1711 | searching for changes |
|
1714 | searching for changes | |
|
1715 | 1712 | remote: adding changesets |
|
1716 | 1713 | remote: adding manifests |
|
1717 | 1714 | remote: adding file changes |
General Comments 0
You need to be logged in to leave comments.
Login now