Commit 08e65f79 authored by Russ Cox's avatar Russ Cox

codereview: make 'hg submit' work with Mercurial 1.6

R=r
CC=golang-dev
https://golang.org/cl/1841044
parent e692977a
...@@ -54,6 +54,12 @@ except: ...@@ -54,6 +54,12 @@ except:
from mercurial.version import version as v from mercurial.version import version as v
hgversion = v.get_version() hgversion = v.get_version()
try:
from mercurial.discovery import findcommonincoming
except:
def findcommonincoming(repo, remote):
return repo.findcommonincoming(remote)
oldMessage = """ oldMessage = """
The code review extension requires Mercurial 1.3 or newer. The code review extension requires Mercurial 1.3 or newer.
...@@ -602,7 +608,7 @@ def getremote(ui, repo, opts): ...@@ -602,7 +608,7 @@ def getremote(ui, repo, opts):
return other return other
def Incoming(ui, repo, opts): def Incoming(ui, repo, opts):
_, incoming, _ = repo.findcommonincoming(getremote(ui, repo, opts)) _, incoming, _ = findcommonincoming(repo, getremote(ui, repo, opts))
return incoming return incoming
def EditCL(ui, repo, cl): def EditCL(ui, repo, cl):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment