# HG changeset patch # User Matt Harbison # Date 1543765934 -3600 # Node ID f6298544d9d0ef709a0e49398a189c18d56c1dfa # Parent 5c707b54f8b1b1426af428fbd7c5bbb626a1aec1 extensions: avoid shadowing imported module names with exthelper methods The previous code worked, but confused pyscripter. diff -r 5c707b54f8b1 -r f6298544d9d0 hgext3rd/evolve/exthelper.py --- a/hgext3rd/evolve/exthelper.py Fri Nov 30 22:10:39 2018 -0500 +++ b/hgext3rd/evolve/exthelper.py Sun Dec 02 16:52:14 2018 +0100 @@ -13,10 +13,10 @@ commands, configitems, extensions, - fileset, + fileset as filesetmod, registrar, - revset, - templatekw, + revset as revsetmod, + templatekw as templatekwmod, ) class exthelper(object): @@ -136,13 +136,13 @@ revsetpredicate = registrar.revsetpredicate() for name, symbol in self._revsetsymbols: revsetpredicate(name)(symbol) - revset.loadpredicate(ui, 'evolve', revsetpredicate) + revsetmod.loadpredicate(ui, 'evolve', revsetpredicate) filesetpredicate = registrar.filesetpredicate() for name, symbol in self._filesetsymbols: filesetpredicate(name)(symbol) # TODO: Figure out the calling extension name - fileset.loadpredicate(ui, 'exthelper', filesetpredicate) + filesetmod.loadpredicate(ui, 'exthelper', filesetpredicate) templatekeyword = registrar.templatekeyword() for name, kw, requires in self._templatekws: @@ -150,7 +150,7 @@ templatekeyword(name, requires=requires)(kw) else: templatekeyword(name)(kw) - templatekw.loadkeyword(ui, 'evolve', templatekeyword) + templatekwmod.loadkeyword(ui, 'evolve', templatekeyword) for ext, command, wrapper, opts in self._extcommandwrappers: if ext not in knownexts: