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

login
register
mail settings
Submitter Pierre-Yves David
Date Sept. 25, 2014, 6:46 p.m.
Message ID <299c97274dae147b286f.1411670805@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/5984/
State Accepted
Commit ce95c15f680b746da98804de236b4f338f6590a2
Headers show

Comments

Pierre-Yves David - Sept. 25, 2014, 6:46 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@fb.com>
# 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.

Patch

diff --git a/mercurial/hg.py b/mercurial/hg.py
--- a/mercurial/hg.py
+++ b/mercurial/hg.py
@@ -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)
             else:
                 raise util.Abort(_("clone from remote to remote not supported"))
 
         cleandir = None