diff --git a/mercurial/hg.py b/mercurial/hg.py --- a/mercurial/hg.py +++ b/mercurial/hg.py @@ -723,8 +723,6 @@ def clone( srcpeer = source branches = (None, branch or []) # XXX path: simply use the peer `path` object when this become available - srcpeer = source.peer() # in case we were called with a localrepo - branches = (None, branch or []) origsource = source = srcpeer.url() srclock = destlock = destwlock = cleandir = None destpeer = None diff --git a/mercurial/httppeer.py b/mercurial/httppeer.py --- a/mercurial/httppeer.py +++ b/mercurial/httppeer.py @@ -403,9 +403,6 @@ class httppeer(wireprotov1peer.wirepeer) def local(self): return None - def peer(self): - return self - def canpush(self): return True diff --git a/mercurial/interfaces/repository.py b/mercurial/interfaces/repository.py --- a/mercurial/interfaces/repository.py +++ b/mercurial/interfaces/repository.py @@ -123,12 +123,6 @@ class ipeerconnection(interfaceutil.Inte can be used to interface with it. Otherwise returns ``None``. """ - def peer(): - """Returns an object conforming to this interface. - - Most implementations will ``return self``. - """ - def canpush(): """Returns a boolean indicating if this peer can be pushed to.""" diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -325,9 +325,6 @@ class localpeer(repository.peer): def local(self): return self._repo - def peer(self): - return self - def canpush(self): return True diff --git a/mercurial/sshpeer.py b/mercurial/sshpeer.py --- a/mercurial/sshpeer.py +++ b/mercurial/sshpeer.py @@ -416,9 +416,6 @@ class sshv1peer(wireprotov1peer.wirepeer def local(self): return None - def peer(self): - return self - def canpush(self): return True