mercurial/commands.py
changeset 18996 160d8416e286
parent 18994 32843795e9b3
child 18997 4cf09a1bf5b2
--- a/mercurial/commands.py	Tue Apr 09 23:40:10 2013 +0900
+++ b/mercurial/commands.py	Tue Apr 09 23:40:11 2013 +0900
@@ -5467,9 +5467,11 @@
         other = hg.peer(repo, {}, source)
         revs, checkout = hg.addbranchrevs(repo, other, branches,
                                           opts.get('rev'))
+        if revs:
+            revs = [other.lookup(rev) for rev in revs]
         ui.debug('comparing with %s\n' % util.hidepassword(source))
         repo.ui.pushbuffer()
-        commoninc = discovery.findcommonincoming(repo, other)
+        commoninc = discovery.findcommonincoming(repo, other, heads=revs)
         _common, incoming, _rheads = commoninc
         repo.ui.popbuffer()
         if incoming: