Mercurial > hg-stable
changeset 23872:9f48242929a9
namespaces: make the constructor into named args
None of the arguments are truly optional but this makes adding future arguments
more robust and perhaps optional.
author | Sean Farley <sean.michael.farley@gmail.com> |
---|---|
date | Wed, 14 Jan 2015 19:39:13 -0800 |
parents | b2d8f3685b06 |
children | 9ef234021667 |
files | mercurial/namespaces.py |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/namespaces.py Thu Jan 15 20:36:03 2015 -0800 +++ b/mercurial/namespaces.py Wed Jan 14 19:39:13 2015 -0800 @@ -120,12 +120,13 @@ """ - def __init__(self, name, templatename, listnames, namemap, nodemap): + def __init__(self, name, templatename=None, listnames=None, namemap=None, + nodemap=None): """create a namespace name: the namespace to be registered (in plural form) + templatename: the name to use for templating listnames: function to list all names - templatename: the name to use for templating namemap: function that inputs a node, output name(s) nodemap: function that inputs a name, output node(s)