diff -r 0023a6e49268 -r 160d8416e286 mercurial/commands.py --- 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: