Show More
@@ -10,7 +10,7 b'' | |||||
10 | import copy |
|
10 | import copy | |
11 | import os |
|
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 | from mercurial.i18n import _ |
|
14 | from mercurial.i18n import _ | |
15 | from mercurial import localrepo |
|
15 | from mercurial import localrepo | |
16 |
|
16 | |||
@@ -412,15 +412,6 b' def reposetup(ui, repo):' | |||||
412 | " supported in the destination:" |
|
412 | " supported in the destination:" | |
413 | " %s") % (', '.join(sorted(missing))) |
|
413 | " %s") % (', '.join(sorted(missing))) | |
414 | raise util.Abort(msg) |
|
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 | return super(lfilesrepo, self).push(remote, force=force, revs=revs, |
|
415 | return super(lfilesrepo, self).push(remote, force=force, revs=revs, | |
425 | newbranch=newbranch) |
|
416 | newbranch=newbranch) | |
426 |
|
417 | |||
@@ -480,6 +471,14 b' def reposetup(ui, repo):' | |||||
480 |
|
471 | |||
481 | repo.__class__ = lfilesrepo |
|
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 | def checkrequireslfiles(ui, repo, **kwargs): |
|
482 | def checkrequireslfiles(ui, repo, **kwargs): | |
484 | if 'largefiles' not in repo.requirements and util.any( |
|
483 | if 'largefiles' not in repo.requirements and util.any( | |
485 | lfutil.shortname+'/' in f[0] for f in repo.store.datafiles()): |
|
484 | lfutil.shortname+'/' in f[0] for f in repo.store.datafiles()): |
@@ -1593,7 +1593,6 b' largefiles can be pushed locally (issue3' | |||||
1593 | $ hg push ../dest |
|
1593 | $ hg push ../dest | |
1594 | pushing to ../dest |
|
1594 | pushing to ../dest | |
1595 | searching for changes |
|
1595 | searching for changes | |
1596 | searching for changes |
|
|||
1597 | adding changesets |
|
1596 | adding changesets | |
1598 | adding manifests |
|
1597 | adding manifests | |
1599 | adding file changes |
|
1598 | adding file changes | |
@@ -1687,7 +1686,6 b' Push of file that exists on server but i' | |||||
1687 | $ hg push -R r7 http://localhost:$HGPORT1 |
|
1686 | $ hg push -R r7 http://localhost:$HGPORT1 | |
1688 | pushing to http://localhost:$HGPORT1/ |
|
1687 | pushing to http://localhost:$HGPORT1/ | |
1689 | searching for changes |
|
1688 | searching for changes | |
1690 | searching for changes |
|
|||
1691 | remote: adding changesets |
|
1689 | remote: adding changesets | |
1692 | remote: adding manifests |
|
1690 | remote: adding manifests | |
1693 | remote: adding file changes |
|
1691 | remote: adding file changes | |
@@ -1711,7 +1709,6 b' Push a largefiles repository to a served' | |||||
1711 | $ hg push -R r8 http://localhost:$HGPORT2/#default |
|
1709 | $ hg push -R r8 http://localhost:$HGPORT2/#default | |
1712 | pushing to http://localhost:$HGPORT2/ |
|
1710 | pushing to http://localhost:$HGPORT2/ | |
1713 | searching for changes |
|
1711 | searching for changes | |
1714 | searching for changes |
|
|||
1715 | remote: adding changesets |
|
1712 | remote: adding changesets | |
1716 | remote: adding manifests |
|
1713 | remote: adding manifests | |
1717 | remote: adding file changes |
|
1714 | remote: adding file changes |
General Comments 0
You need to be logged in to leave comments.
Login now