Mercurial > hg-stable
diff tests/test-log.t @ 23873:9ef234021667
namespaces: use named args for namespace api
This is just a style change but makes adding new arguments more robust for
callers.
author | Sean Farley <sean.michael.farley@gmail.com> |
---|---|
date | Wed, 14 Jan 2015 19:55:20 -0800 |
parents | 81349f4b47f4 |
children | 48fd1dfb99aa |
line wrap: on
line diff
--- a/tests/test-log.t Wed Jan 14 19:39:13 2015 -0800 +++ b/tests/test-log.t Wed Jan 14 19:55:20 2015 -0800 @@ -1567,12 +1567,13 @@ > > def reposetup(ui, repo): > foo = {'foo': repo[0].node()} - > ns = namespace("bars", "bar", - > lambda r: foo.keys(), - > lambda r, name: foo.get(name), - > lambda r, node: [name for name, n - > in foo.iteritems() - > if n == node]) + > names = lambda r: foo.keys() + > namemap = lambda r, name: foo.get(name) + > nodemap = lambda r, node: [name for name, n in foo.iteritems() + > if n == node] + > ns = namespace("bars", templatename="bar", listnames=names, + > namemap=namemap, nodemap=nodemap) + > > repo.names.addnamespace(ns) > EOF