Mercurial > hg
diff tests/test-log.t @ 44728:59ad165f6cdb
templatekw: fix shownames() to check if namespace exists in repo (issue6301)
Namespace registration is dynamic, but the corresponding template keyword
is registered statically.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Thu, 16 Apr 2020 22:30:11 +0900 |
parents | 34a46d48d24e |
children | 46856c2cc4f2 |
line wrap: on
line diff
--- a/tests/test-log.t Wed Apr 15 20:10:35 2020 +0200 +++ b/tests/test-log.t Thu Apr 16 22:30:11 2020 +0900 @@ -2273,6 +2273,8 @@ > from mercurial import namespaces > > def reposetup(ui, repo): + > if not repo.local(): + > return > foo = {b'foo': repo[0].node()} > names = lambda r: foo.keys() > namemap = lambda r, name: foo.get(name) @@ -2328,6 +2330,18 @@ $ cd .. +New namespace is registered per repo instance, but the template keyword +is global. So we shouldn't expect the namespace always exists. Using +ssh:// makes sure a bundle repository is created from scratch. (issue6301) + + $ hg clone -e "'$PYTHON' '$TESTDIR/dummyssh'" \ + > -qr0 "ssh://user@dummy/`pwd`/a" a-clone + $ hg incoming --config extensions.names=names.py -R a-clone \ + > -e "'$PYTHON' '$TESTDIR/dummyssh'" -T '{bars}\n' -l1 + comparing with ssh://user@dummy/$TESTTMP/a + searching for changes + + hg log -f dir across branches $ hg init acrossbranches