Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/namespaces.py @ 23563:114992041625
namespaces: add branches
Note that the exception-catching from the previous branchtip check is moved up
to catch exceptions from the try block surrounding the namespace lookup.
author | Sean Farley <sean.michael.farley@gmail.com> |
---|---|
date | Fri, 17 Oct 2014 15:27:12 -0700 |
parents | 59e703aecaf6 |
children | 4c4c967814ef |
comparison
equal
deleted
inserted
replaced
23562:59e703aecaf6 | 23563:114992041625 |
---|---|
42 lambda repo, name: tolist(repo._bookmarks.get(name))) | 42 lambda repo, name: tolist(repo._bookmarks.get(name))) |
43 | 43 |
44 addns("tags", | 44 addns("tags", |
45 lambda repo, name: tolist(repo._tagscache.tags.get(name))) | 45 lambda repo, name: tolist(repo._tagscache.tags.get(name))) |
46 | 46 |
47 addns("branches", | |
48 lambda repo, name: tolist(repo.branchtip(name))) | |
49 | |
47 def addnamespace(self, namespace, namemap, order=None): | 50 def addnamespace(self, namespace, namemap, order=None): |
48 """ | 51 """ |
49 register a namespace | 52 register a namespace |
50 | 53 |
51 namespace: the name to be registered (in plural form) | 54 namespace: the name to be registered (in plural form) |