# HG changeset patch # User Sean Farley # Date 1413946163 25200 # Node ID c517b97c7609721a2319d92f4cb2c3eadf1ff00c # Parent 07309e527df705743ea9864108a501763918b9a3 namespaces: add test for log Now that we have enough features in the namespaces api, we add a test for it. diff -r 07309e527df7 -r c517b97c7609 tests/test-log.t --- a/tests/test-log.t Fri Oct 17 09:26:37 2014 -0700 +++ b/tests/test-log.t Tue Oct 21 19:49:23 2014 -0700 @@ -1559,7 +1559,31 @@ user: date: Thu Jan 01 00:00:00 1970 +0000 +Check that adding an arbitrary name shows up in log automatically + $ cat > ../names.py < """A small extension to test adding arbitrary names to a repo""" + > from mercurial.namespaces import namespace + > + > 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]) + > repo.names.addnamespace(ns) + > EOF + + $ hg --config extensions.names=../names.py log -r 0 + changeset: 0:65624cd9070a + tag: tip + bar: foo + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: a bunch of weird directories + $ cd .. hg log -f dir across branches