diff hgext3rd/topic/__init__.py @ 3902:9c4847b93d3c

branching: merge with stable
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 31 Jul 2018 09:03:35 +0200
parents 28dadd024299 b91db6989231
children 9839463088ac
line wrap: on
line diff
--- a/hgext3rd/topic/__init__.py	Fri May 25 17:17:56 2018 +0200
+++ b/hgext3rd/topic/__init__.py	Tue Jul 31 09:03:35 2018 +0200
@@ -364,7 +364,7 @@
         def commit(self, *args, **kwargs):
             backup = self.ui.backupconfig('ui', 'allowemptycommit')
             try:
-                if repo.currenttopic != repo['.'].topic():
+                if self.currenttopic != self['.'].topic():
                     # bypass the core "nothing changed" logic
                     self.ui.setconfig('ui', 'allowemptycommit', True)
                 return super(topicrepo, self).commit(*args, **kwargs)
@@ -374,7 +374,7 @@
         def commitctx(self, ctx, error=None):
             topicfilter = topicmap.topicfilter(self.filtername)
             if topicfilter != self.filtername:
-                other = repo.filtered(topicmap.topicfilter(repo.filtername))
+                other = self.filtered(topicmap.topicfilter(self.filtername))
                 other.commitctx(ctx, error=error)
 
             if isinstance(ctx, context.workingcommitctx):
@@ -409,7 +409,7 @@
 
         def branchmap(self, topic=None):
             if topic is None:
-                topic = getattr(repo, '_autobranchmaptopic', False)
+                topic = getattr(self, '_autobranchmaptopic', False)
             topicfilter = topicmap.topicfilter(self.filtername)
             if not topic or topicfilter == self.filtername:
                 return super(topicrepo, self).branchmap()
@@ -437,7 +437,7 @@
                 return tr
 
             reporef = weakref.ref(self)
-            if repo.ui.configbool('experimental', 'enforce-single-head'):
+            if self.ui.configbool('experimental', 'enforce-single-head'):
                 origvalidator = tr.validator
 
                 def validator(tr2):
@@ -446,7 +446,7 @@
                     origvalidator(tr2)
                 tr.validator = validator
 
-            topicmodeserver = repo.ui.config('experimental',
+            topicmodeserver = self.ui.config('experimental',
                                              'topic-mode.server', 'ignore')
             ispush = (desc.startswith('push') or desc.startswith('serve'))
             if (topicmodeserver != 'ignore' and ispush):
@@ -458,7 +458,7 @@
                     return origvalidator(tr2)
                 tr.validator = validator
 
-            elif (repo.ui.configbool('experimental', 'topic.publish-bare-branch')
+            elif (self.ui.configbool('experimental', 'topic.publish-bare-branch')
                     and (desc.startswith('push')
                          or desc.startswith('serve'))
                     ):