# HG changeset patch # User Manuel Jacob # Date 1706828320 -3600 # Node ID 31e157a5cfe2c3c40f4f2ee1ac0b7e3426325bd8 # Parent aa1cea32ae90431bb7e0069a758c1a02e446ad91 cleanup: remove unnecessary remotebranchmap checks This is some leftovers from 35130e428ebd where remotebranchmap wasn't always created. diff -r aa1cea32ae90 -r 31e157a5cfe2 hgext3rd/topic/discovery.py --- a/hgext3rd/topic/discovery.py Wed Jan 17 16:25:51 2024 -0300 +++ b/hgext3rd/topic/discovery.py Thu Feb 01 23:58:40 2024 +0100 @@ -83,7 +83,6 @@ remote = pushop.remote publishedset = () - remotebranchmap = None if remote.capable(b'topics-namespaces'): origremotebranchmap = remote.branchmaptns else: @@ -137,8 +136,7 @@ with ctxoverride, configoverride: try: - if remotebranchmap is not None: - remote.branchmap = remotebranchmap + remote.branchmap = remotebranchmap unxx = repo.filtered(b'unfiltered-topic') repo.unfiltered = lambda: unxx pushop.repo = repo @@ -152,8 +150,7 @@ finally: if r'unfiltered' in vars(repo): del repo.unfiltered - if remotebranchmap is not None: - remote.branchmap = origremotebranchmap + remote.branchmap = origremotebranchmap def wireprotobranchmap(orig, repo, proto): if not common.hastopicext(repo):