hgext/largefiles/reposetup.py
changeset 18152 4454607b5d25
parent 18149 2dcc3653b361
child 18154 93c697d9c158
--- 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]