Patchwork [4,of,6] clone: use `exchange.push` instead of `localrepo.push`

mail settings
Submitter Pierre-Yves David
Date Sept. 25, 2014, 6:46 p.m.
Message ID <>
Download mbox | patch
Permalink /patch/5984/
State Accepted
Commit ce95c15f680b746da98804de236b4f338f6590a2
Headers show


Pierre-Yves David - Sept. 25, 2014, 6:46 p.m.
# HG changeset patch
# User Pierre-Yves David <>
# Date 1411634486 25200
#      Thu Sep 25 01:41:26 2014 -0700
# Node ID 299c97274dae147b286f3162ffc9ac232f31f556
# Parent  df847d3fe4044027e189a290aab75643d99cff0d
clone: use `exchange.push` instead of `localrepo.push`

The later it going away.


diff --git a/mercurial/ b/mercurial/
--- a/mercurial/
+++ b/mercurial/
@@ -9,11 +9,11 @@ 
 from i18n import _
 from lock import release
 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
 def _local(path):
@@ -406,11 +406,11 @@  def clone(ui, peeropts, source, dest=Non
                 revs = [srcpeer.lookup(r) for r in rev]
                 checkout = revs[0]
             if destpeer.local():
                 destpeer.local().clone(srcpeer, heads=revs, stream=stream)
             elif srcrepo:
-                srcrepo.push(destpeer, revs=revs)
+                exchange.push(srcrepo, destpeer, revs=revs)
                 raise util.Abort(_("clone from remote to remote not supported"))
         cleandir = None