# HG changeset patch # User Franz Glasner # Date 1546792037 -3600 # Node ID e97f6f6ed7c561aeb0f0c880713d3353e835f36b # Parent 436b2db75a34506c02ff797ee8ad733a4032f3ee Implement a "nouser" option for the path-filter: like no-pwd but without user information also diff -r 436b2db75a34 -r e97f6f6ed7c5 extensions/kwarchive.py --- a/extensions/kwarchive.py Thu Jan 03 23:17:13 2019 +0100 +++ b/extensions/kwarchive.py Sun Jan 06 17:27:17 2019 +0100 @@ -214,6 +214,7 @@ :``full``: the path will be printed as is (including passwords et al.) :``nopwd``: like ``full`` but without passwords + :``nouser``: like ``full`` but without user and password information :``short``: shorten the path somehow: no user/password information and only a short server name :``last``: shorten the path to the last component @@ -313,6 +314,7 @@ :``full``: the path will be printed as is (including passwords et al.) :``nopwd``: like ``full`` but without passwords + :``nouser``: like ``full`` but without user and password information :``short``: shorten the path somehow: no user/password information and only a short server name :``last``: shorten the path to the last component @@ -535,6 +537,11 @@ path_uri = bytes(util.url(ui.paths[hgpath].loc)) elif path_filter == "nopwd": path_uri = util.hidepassword(ui.paths[hgpath].loc) + elif path_filter == "nouser": + path_url = util.url(ui.paths[hgpath].loc) + path_url.user = None + path_url.passwd = None + path_uri = bytes(path_url) elif path_filter == "short": path_url = util.url(ui.paths[hgpath].loc) path_url.scheme = SHORTENED_HG_SCHEMES.get(path_url.scheme, @@ -636,9 +643,9 @@ def get_checked_path_filter_option(opts): pf = opts.get("path_filter") - if pf not in ("full", "nopwd", "short", "last"): + if pf not in ("full", "nopwd", "nouser", "short", "last"): raise error.Abort( - _("path filter must be any of `full', `nopwd', `short' or `last'")) + _("path filter must be any of `full', `nopwd', `nouser`, `short' or `last'")) return pf