diff hgext/graphlog.py @ 11301:3d0591a66118

move discovery methods from localrepo into new discovery module
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Mon, 07 Jun 2010 18:35:54 +0200
parents d1908cb95a82
children 40c06bbf58be
line wrap: on
line diff
--- a/hgext/graphlog.py	Mon Jun 07 16:29:06 2010 +0200
+++ b/hgext/graphlog.py	Mon Jun 07 18:35:54 2010 +0200
@@ -18,7 +18,7 @@
 from mercurial.i18n import _
 from mercurial.node import nullrev
 from mercurial import bundlerepo, changegroup, cmdutil, commands, extensions
-from mercurial import hg, url, util, graphmod
+from mercurial import hg, url, util, graphmod, discovery
 
 ASCIIDATA = 'ASC'
 
@@ -283,7 +283,7 @@
     if revs:
         revs = [repo.lookup(rev) for rev in revs]
     ui.status(_('comparing with %s\n') % url.hidepassword(dest))
-    o = repo.findoutgoing(other, force=opts.get('force'))
+    o = discovery.findoutgoing(repo, other, force=opts.get('force'))
     if not o:
         ui.status(_("no changes found\n"))
         return
@@ -311,7 +311,8 @@
     ui.status(_('comparing with %s\n') % url.hidepassword(source))
     if revs:
         revs = [other.lookup(rev) for rev in revs]
-    incoming = repo.findincoming(other, heads=revs, force=opts["force"])
+    incoming = discovery.findincoming(repo, other, heads=revs,
+                                      force=opts["force"])
     if not incoming:
         try:
             os.unlink(opts["bundle"])