Mercurial > hgrepos > DevTools > mercurial-extensions
diff extensions/revinfo.py @ 425:2a062f87f75d
Make "revinfo" and "kwarchive" work on Mercurial 6.
Some URL related utility function have been moved from within mercurial.util
to mercurial.utils.urlutil.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Sat, 27 Aug 2022 21:36:16 +0200 |
| parents | bee0d9026720 |
| children | e036013a4003 |
line wrap: on
line diff
--- a/extensions/revinfo.py Sat Aug 27 18:13:04 2022 +0200 +++ b/extensions/revinfo.py Sat Aug 27 21:36:16 2022 +0200 @@ -21,7 +21,7 @@ from mercurial.i18n import _ -from mercurial import (cmdutil, scmutil, util, error, archival, pycompat, +from mercurial import (cmdutil, scmutil, error, archival, pycompat, util, demandimport) with demandimport.deactivated(): try: @@ -29,8 +29,14 @@ except ImportError: registrar = None + # some URL specific util functions moved to new mercurial.utils.urlutil + try: + from mercurial.utils import urlutil as _urlutil + except ImportError: + _urlutil = util -testedwith = b"4.3.1 4.3.2 4.4.1 4.4.2 4.5.2 4.6.1 4.8.1 4.9 5.0.1 5.1.2 5.2.1 5.5 5.6 5.9.1" + +testedwith = b"4.3.1 4.3.2 4.4.1 4.4.2 4.5.2 4.6.1 4.8.1 4.9 5.0.1 5.1.2 5.2.1 5.5 5.6 5.9.1 6.1.4" cmdtable = {} @@ -143,7 +149,7 @@ # for now a quick check of assumptions assert len(paths) == 1 if name == canonicalpath: - msg += b"path: %s\n" % util.hidepassword(paths[0].loc) + msg += b"path: %s\n" % _urlutil.hidepassword(paths[0].loc) break else: msg += b"path: %s\n" % canonicalpath
