mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 16:31:02 +03:00
wrappers: cope with remoteui move to hg (hg cset 1d4f3581cbe5)
This commit is contained in:
parent
f18467bb2a
commit
747d8b134a
@ -2,6 +2,7 @@ import re
|
||||
import os
|
||||
import urllib
|
||||
|
||||
from mercurial import cmdutil
|
||||
from mercurial import hg
|
||||
from mercurial import node
|
||||
from mercurial import util as hgutil
|
||||
@ -89,6 +90,11 @@ def progress(ui, *args, **kwargs):
|
||||
if getattr(ui, 'progress', False):
|
||||
return ui.progress(*args, **kwargs)
|
||||
|
||||
# TODO remove when we drop 1.5 support
|
||||
remoteui = getattr(cmdutil, 'remoteui', getattr(hg, 'remoteui', False))
|
||||
if not remoteui:
|
||||
raise ImportError('Failed to import remoteui')
|
||||
|
||||
def parseurl(url, heads=[]):
|
||||
parsed = hg.parseurl(url, heads)
|
||||
if len(parsed) == 3:
|
||||
|
@ -383,7 +383,7 @@ def clone(orig, ui, source, dest=None, **opts):
|
||||
ui.setconfig(section, name, str(opts.pop(opt)))
|
||||
|
||||
# this must be kept in sync with mercurial/commands.py
|
||||
srcrepo, dstrepo = hg.clone(cmdutil.remoteui(ui, opts), source, dest,
|
||||
srcrepo, dstrepo = hg.clone(util.remoteui(ui, opts), source, dest,
|
||||
pull=opts.get('pull'),
|
||||
stream=opts.get('uncompressed'),
|
||||
rev=opts.get('rev'),
|
||||
|
Loading…
Reference in New Issue
Block a user