Skip to content
Snippets Groups Projects
Commit 92d7702c authored by Sean Farley's avatar Sean Farley
Browse files

compat: add method for backwards compatible passwordmgr

parent 66336cb8
No related branches found
No related tags found
No related merge requests found
from mercurial import (
url,
util as hgutil,
)
try:
from mercurial import encoding
hfsignoreclean = encoding.hfsignoreclean
......@@ -22,3 +27,11 @@
for c in _ignore:
s = s.replace(c, '')
return s
def passwordmgr(ui, passwddb):
try:
return url.passwordmgr(ui,
hgutil.urlreq.httppasswordmgrwithdefaultrealm())
except TypeError:
# compat with hg < 3.9
return url.passwordmgr(ui)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment