# HG changeset patch # User Anton Shestakov # Date 1710624438 10800 # Node ID 38a845d432e93483863d1c8605f6f4b0459dfd16 # Parent cd8e1a69712497048333610b5372ec277381d758 topic: make sure filtername is not None This is similar to 4188a0570ba1 in core. diff -r cd8e1a697124 -r 38a845d432e9 hgext3rd/topic/topicmap.py --- 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):