changeset 6667:31e157a5cfe2

cleanup: remove unnecessary remotebranchmap checks This is some leftovers from 35130e428ebd where remotebranchmap wasn't always created.
author Manuel Jacob <me@manueljacob.de>
date Thu, 01 Feb 2024 23:58:40 +0100
parents aa1cea32ae90
children 02f8c88f3d59
files hgext3rd/topic/discovery.py
diffstat 1 files changed, 2 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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):