clone: use `exchange.push` instead of `localrepo.push`
authorPierre-Yves David <pierre-yves.david@fb.com>
Thu, 25 Sep 2014 01:41:26 -0700
changeset 22618 ce95c15f680b
parent 22617 1625770c2ce1
child 22619 f6cf96804d27
clone: use `exchange.push` instead of `localrepo.push` The latter is going away.
mercurial/hg.py
--- a/mercurial/hg.py	Thu Sep 25 01:39:39 2014 -0700
+++ b/mercurial/hg.py	Thu Sep 25 01:41:26 2014 -0700
@@ -11,7 +11,7 @@
 from node import hex, nullid
 import localrepo, bundlerepo, unionrepo, httppeer, sshpeer, statichttprepo
 import bookmarks, lock, util, extensions, error, node, scmutil, phases, url
-import cmdutil, discovery, repoview
+import cmdutil, discovery, repoview, exchange
 import merge as mergemod
 import verify as verifymod
 import errno, os, shutil
@@ -408,7 +408,7 @@
             if destpeer.local():
                 destpeer.local().clone(srcpeer, heads=revs, stream=stream)
             elif srcrepo:
-                srcrepo.push(destpeer, revs=revs)
+                exchange.push(srcrepo, destpeer, revs=revs)
             else:
                 raise util.Abort(_("clone from remote to remote not supported"))