mercurial/commands.py
changeset 1457 518da3c3b6ce
parent 1381 c29c36745c6e
child 1461 02099220ad49
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -1193,7 +1193,7 @@ def incoming(ui, repo, source="default",
     o = repo.findincoming(other)
     if not o:
         return
-    o = other.newer(o)
+    o = other.changelog.nodesbetween(o)[0]
     for n in o:
         show_changeset(ui, other, changenode=n)
         if opts['patch']:
@@ -1305,7 +1305,7 @@ def outgoing(ui, repo, dest="default-pus
     dest = ui.expandpath(dest)
     other = hg.repository(ui, dest)
     o = repo.findoutgoing(other)
-    o = repo.newer(o)
+    o = repo.changelog.nodesbetween(o)[0]
     for n in o:
         show_changeset(ui, repo, changenode=n)
         if opts['patch']: