hgext3rd/topic/__init__.py
branchstable
changeset 4125 865c33c16508
parent 4124 23658110ab26
child 4126 099e264bf3be
--- a/hgext3rd/topic/__init__.py	Fri Sep 21 19:49:28 2018 +0200
+++ b/hgext3rd/topic/__init__.py	Sat Sep 22 13:09:06 2018 +0200
@@ -553,11 +553,12 @@
 
 def wrapinit(orig, self, repo, *args, **kwargs):
     orig(self, repo, *args, **kwargs)
-    if getattr(repo, 'currenttopic', ''):
-        self._extra[constants.extrakey] = repo.currenttopic
-    else:
-        # Empty key will be dropped from extra by another hack at the changegroup level
-        self._extra[constants.extrakey] = ''
+    if constants.extrakey not in self._extra:
+        if getattr(repo, 'currenttopic', ''):
+            self._extra[constants.extrakey] = repo.currenttopic
+        else:
+            # Empty key will be dropped from extra by another hack at the changegroup level
+            self._extra[constants.extrakey] = ''
 
 def wrapadd(orig, cl, manifest, files, desc, transaction, p1, p2, user,
             date=None, extra=None):