1
0
mirror of https://github.com/golang/go synced 2024-11-25 05:57:57 -07:00

codereview: make 'hg submit' work with Mercurial 1.6

R=r
CC=golang-dev
https://golang.org/cl/1841044
This commit is contained in:
Russ Cox 2010-07-16 18:54:38 -07:00
parent e692977af3
commit 08e65f79c1

View File

@ -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):
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):