Mercurial > evolve
changeset 6790:38a845d432e9 stable
topic: make sure filtername is not None
This is similar to 4188a0570ba1 in core.
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Sat, 16 Mar 2024 18:27:18 -0300 |
parents | cd8e1a697124 |
children | 2ef4e26c4bc0 |
files | hgext3rd/topic/topicmap.py |
diffstat | 1 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/topic/topicmap.py Wed Jun 12 19:27:31 2024 +0400 +++ b/hgext3rd/topic/topicmap.py Sat Mar 16 18:27:18 2024 -0300 @@ -37,7 +37,7 @@ if not common.hastopicext(repo): return repo filtername = topicfilter(repo.filtername) - if filtername == repo.filtername: + if filtername is None or filtername == repo.filtername: return repo return repo.filtered(filtername) @@ -47,11 +47,10 @@ # hg <= 4.9 (caebe5e7f4bd) partialmap = branchmap.subsettable - # filter level not affected by topic that we should not override - for plainname in list(funcmap): newfilter = topicfilter(plainname) if newfilter == plainname: + # filter level not affected by topic that we should not override continue def revsfunc(repo, name=plainname): @@ -93,7 +92,11 @@ def cgapply(orig, self, repo, *args, **kwargs): """make sure a topicmap is used when applying a changegroup""" - other = repo.filtered(topicfilter(repo.filtername)) + newfilter = topicfilter(repo.filtername) + if newfilter is None: + other = repo + else: + other = repo.filtered(newfilter) return orig(self, other, *args, **kwargs) def commitstatus(orig, repo, node, branch, bheads=None, tip=None, **opts):