Commits

Augie Fackler committed 4a974c8

outgoing: fix for hg change cd956049fc14

  • Participants
  • Parent commits 6dd1e9d

Comments (0)

Files changed (1)

File hg_histedit.py

             # hg >= 1.9
             findoutgoing = getattr(discovery, 'findoutgoing', None)
             if findoutgoing is None:
-                def findoutgoing(repo, other, force=False):
-                    common, outheads = discovery.findcommonoutgoing(
-                        repo, other, [], force=force)
-                    return repo.changelog.findmissing(common, outheads)[0:1]
+                if getattr(discovery, 'outgoing', None) is not None:
+                    def findoutgoing(repo, other, force=False):
+                        out = discovery.findcommonoutgoing(
+                            repo, other, [], force=force)
+                        return out.missing[0:1]
+                else:
+                    # hg 1.9 and 2.0
+                    def findoutgoing(repo, other, force=False):
+                        common, outheads = discovery.findcommonoutgoing(
+                            repo, other, [], force=force)
+                        return repo.changelog.findmissing(common, outheads)[0:1]
         else:
             other = hg.repository(ui, dest)
             def findoutgoing(repo, other, force=False):