diff hgext/largefiles/reposetup.py @ 18152:4454607b5d25

largefiles: remove findoutgoing portability wrapper
author Mads Kiilerich <madski@unity3d.com>
date Thu, 13 Dec 2012 19:19:06 +0100
parents 2dcc3653b361
children 93c697d9c158
line wrap: on
line diff
--- a/hgext/largefiles/reposetup.py	Thu Dec 13 19:19:06 2012 +0100
+++ b/hgext/largefiles/reposetup.py	Thu Dec 13 19:19:06 2012 +0100
@@ -11,7 +11,8 @@
 import types
 import os
 
-from mercurial import context, error, manifest, match as match_, util
+from mercurial import context, error, manifest, match as match_, util, \
+    discovery
 from mercurial import node as node_
 from mercurial.i18n import _
 from mercurial import localrepo
@@ -404,10 +405,11 @@
                 wlock.release()
 
         def push(self, remote, force=False, revs=None, newbranch=False):
-            o = lfutil.findoutgoing(self, remote, force)
-            if o:
+            outgoing = discovery.findcommonoutgoing(repo, remote.peer(),
+                                                    force=force)
+            if outgoing.missing:
                 toupload = set()
-                o = self.changelog.nodesbetween(o, revs)[0]
+                o = self.changelog.nodesbetween(outgoing.missing, revs)[0]
                 for n in o:
                     parents = [p for p in self.changelog.parents(n)
                                if p != node_.nullid]