Details
Details
- Reviewers
- None
- Group Reviewers
hg-reviewers - Commits
- rHG75fc2537d93c: urls: remove deprecated APIs
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Branch
- default
- Lint
No Linters Available - Unit
No Unit Test Coverage
( )
hg-reviewers |
No Linters Available |
No Unit Test Coverage |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/hg.py (7 lines) | |||
M | mercurial/util.py (49 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
2cb4bb3b368e | de7df77bba1e | Raphaël Gomès | Dec 23 2021, 8:47 AM |
if not primary(branch): | if not primary(branch): | ||||
raise error.RepoLookupError(_(b"unknown branch '%s'") % branch) | raise error.RepoLookupError(_(b"unknown branch '%s'") % branch) | ||||
if hashbranch: | if hashbranch: | ||||
if not primary(hashbranch): | if not primary(hashbranch): | ||||
revs.append(hashbranch) | revs.append(hashbranch) | ||||
return revs, revs[0] | return revs, revs[0] | ||||
def parseurl(path, branches=None): | |||||
'''parse url#branch, returning (url, (branch, branches))''' | |||||
msg = b'parseurl(...) moved to mercurial.utils.urlutil' | |||||
util.nouideprecwarn(msg, b'6.0', stacklevel=2) | |||||
return urlutil.parseurl(path, branches=branches) | |||||
schemes = { | schemes = { | ||||
b'bundle': bundlerepo, | b'bundle': bundlerepo, | ||||
b'union': unionrepo, | b'union': unionrepo, | ||||
b'file': _local, | b'file': _local, | ||||
b'http': httppeer, | b'http': httppeer, | ||||
b'https': httppeer, | b'https': httppeer, | ||||
b'ssh': sshpeer, | b'ssh': sshpeer, | ||||
b'static-http': statichttprepo, | b'static-http': statichttprepo, |
pycompat, | pycompat, | ||||
urllibcompat, | urllibcompat, | ||||
) | ) | ||||
from .utils import ( | from .utils import ( | ||||
compression, | compression, | ||||
hashutil, | hashutil, | ||||
procutil, | procutil, | ||||
stringutil, | stringutil, | ||||
urlutil, | |||||
) | ) | ||||
if pycompat.TYPE_CHECKING: | if pycompat.TYPE_CHECKING: | ||||
from typing import ( | from typing import ( | ||||
Iterator, | Iterator, | ||||
List, | List, | ||||
Optional, | Optional, | ||||
Tuple, | Tuple, | ||||
prefix_char = prefix[1:] | prefix_char = prefix[1:] | ||||
else: | else: | ||||
prefix_char = prefix | prefix_char = prefix | ||||
mapping[prefix_char] = prefix_char | mapping[prefix_char] = prefix_char | ||||
r = remod.compile(br'%s(%s)' % (prefix, patterns)) | r = remod.compile(br'%s(%s)' % (prefix, patterns)) | ||||
return r.sub(lambda x: fn(mapping[x.group()[1:]]), s) | return r.sub(lambda x: fn(mapping[x.group()[1:]]), s) | ||||
def getport(*args, **kwargs): | |||||
msg = b'getport(...) moved to mercurial.utils.urlutil' | |||||
nouideprecwarn(msg, b'6.0', stacklevel=2) | |||||
return urlutil.getport(*args, **kwargs) | |||||
def url(*args, **kwargs): | |||||
msg = b'url(...) moved to mercurial.utils.urlutil' | |||||
nouideprecwarn(msg, b'6.0', stacklevel=2) | |||||
return urlutil.url(*args, **kwargs) | |||||
def hasscheme(*args, **kwargs): | |||||
msg = b'hasscheme(...) moved to mercurial.utils.urlutil' | |||||
nouideprecwarn(msg, b'6.0', stacklevel=2) | |||||
return urlutil.hasscheme(*args, **kwargs) | |||||
def hasdriveletter(*args, **kwargs): | |||||
msg = b'hasdriveletter(...) moved to mercurial.utils.urlutil' | |||||
nouideprecwarn(msg, b'6.0', stacklevel=2) | |||||
return urlutil.hasdriveletter(*args, **kwargs) | |||||
def urllocalpath(*args, **kwargs): | |||||
msg = b'urllocalpath(...) moved to mercurial.utils.urlutil' | |||||
nouideprecwarn(msg, b'6.0', stacklevel=2) | |||||
return urlutil.urllocalpath(*args, **kwargs) | |||||
def checksafessh(*args, **kwargs): | |||||
msg = b'checksafessh(...) moved to mercurial.utils.urlutil' | |||||
nouideprecwarn(msg, b'6.0', stacklevel=2) | |||||
return urlutil.checksafessh(*args, **kwargs) | |||||
def hidepassword(*args, **kwargs): | |||||
msg = b'hidepassword(...) moved to mercurial.utils.urlutil' | |||||
nouideprecwarn(msg, b'6.0', stacklevel=2) | |||||
return urlutil.hidepassword(*args, **kwargs) | |||||
def removeauth(*args, **kwargs): | |||||
msg = b'removeauth(...) moved to mercurial.utils.urlutil' | |||||
nouideprecwarn(msg, b'6.0', stacklevel=2) | |||||
return urlutil.removeauth(*args, **kwargs) | |||||
timecount = unitcountfn( | timecount = unitcountfn( | ||||
(1, 1e3, _(b'%.0f s')), | (1, 1e3, _(b'%.0f s')), | ||||
(100, 1, _(b'%.1f s')), | (100, 1, _(b'%.1f s')), | ||||
(10, 1, _(b'%.2f s')), | (10, 1, _(b'%.2f s')), | ||||
(1, 1, _(b'%.3f s')), | (1, 1, _(b'%.3f s')), | ||||
(100, 0.001, _(b'%.1f ms')), | (100, 0.001, _(b'%.1f ms')), | ||||
(10, 0.001, _(b'%.2f ms')), | (10, 0.001, _(b'%.2f ms')), | ||||
(1, 0.001, _(b'%.3f ms')), | (1, 0.001, _(b'%.3f ms')), |