# HG changeset patch # User Kevin Bullock # Date 1501971284 18000 # Node ID da62ef0569bb7053352ac3f37929dac34c79ff72 # Parent cfcd3032355cec41c50bc72c0bd7a2ba32dc433c compat: fix fallback for ui.passwordmgr The fallback introduced in 05c8aa7d3edc failed to work on hg < 3.8, which has no util.urlreq. This was apparently masked by the fact that the Makefile is not set up to run doctests in all modules, which we'll fix in an upcoming change. diff -r cfcd3032355c -r da62ef0569bb hggit/compat.py --- a/hggit/compat.py Sat Aug 05 17:07:59 2017 -0500 +++ b/hggit/compat.py Sat Aug 05 17:14:44 2017 -0500 @@ -30,9 +30,9 @@ def passwordmgr(ui): try: - return url.passwordmgr(ui, - hgutil.urlreq.httppasswordmgrwithdefaultrealm()) - except TypeError: + realm = hgutil.urlreq.httppasswordmgrwithdefaultrealm() + return url.passwordmgr(ui, realm) + except (TypeError, AttributeError): # compat with hg < 3.9 return url.passwordmgr(ui)