mirror of
https://github.com/golang/go
synced 2024-11-22 02:24:41 -07:00
codereview: Fix for Mercurial >= 1.6
R=rsc, adg, rsc1 CC=golang-dev https://golang.org/cl/1804041
This commit is contained in:
parent
dc60c5a7ec
commit
e8fcf60093
@ -592,7 +592,11 @@ def getremote(ui, repo, opts):
|
|||||||
# delete it in an attempt to "help"
|
# delete it in an attempt to "help"
|
||||||
proxy = os.environ.get('http_proxy')
|
proxy = os.environ.get('http_proxy')
|
||||||
source = hg.parseurl(ui.expandpath("default"), None)[0]
|
source = hg.parseurl(ui.expandpath("default"), None)[0]
|
||||||
other = hg.repository(cmdutil.remoteui(repo, opts), source)
|
try:
|
||||||
|
remoteui = hg.remoteui # hg 1.6
|
||||||
|
except:
|
||||||
|
remoteui = cmdutil.remoteui
|
||||||
|
other = hg.repository(remoteui(repo, opts), source)
|
||||||
if proxy is not None:
|
if proxy is not None:
|
||||||
os.environ['http_proxy'] = proxy
|
os.environ['http_proxy'] = proxy
|
||||||
return other
|
return other
|
||||||
@ -2856,7 +2860,7 @@ class MercurialVCS(VersionControlSystem):
|
|||||||
if not err:
|
if not err:
|
||||||
self.base_rev = mqparent
|
self.base_rev = mqparent
|
||||||
else:
|
else:
|
||||||
self.base_rev = RunShell(["hg", "parent", "-q"]).split(':')[1].strip()
|
self.base_rev = RunShell(["hg", "parents", "-q"]).split(':')[1].strip()
|
||||||
def _GetRelPath(self, filename):
|
def _GetRelPath(self, filename):
|
||||||
"""Get relative path of a file according to the current directory,
|
"""Get relative path of a file according to the current directory,
|
||||||
given its logical path in the repo."""
|
given its logical path in the repo."""
|
||||||
|
Loading…
Reference in New Issue
Block a user