changeset 6388:0baef8dde96b stable

branching: merge into stable in preparation for release
author Anton Shestakov <av6@dwimlabs.net>
date Mon, 06 Feb 2023 18:37:59 +0400
parents a87abe69a2f8 (diff) 9b5660737b52 (current diff)
children c75529bbf588 2b2611fb6b23
files hgext3rd/topic/topicmap.py
diffstat 2 files changed, 5 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/topic/server.py	Sun Feb 05 19:55:48 2023 +0400
+++ b/hgext3rd/topic/server.py	Mon Feb 06 18:37:59 2023 +0400
@@ -3,6 +3,7 @@
 # This software may be used and distributed according to the terms of the
 # GNU General Public License version 2 or any later version.
 from mercurial import (
+    branchmap,
     extensions,
     repoview,
     wireprototypes,
@@ -10,15 +11,6 @@
     wireprotov1server,
 )
 
-try:
-    from mercurial.utils import (
-        repoviewutil,
-    )
-    repoviewutil.subsettable
-except (AttributeError, ImportError):
-    # hg <= 4.9 (caebe5e7f4bd)
-    from mercurial import branchmap as repoviewutil
-
 from . import (
     common,
     constants,
@@ -102,5 +94,6 @@
 
     if FILTERNAME not in repoview.filtertable:
         repoview.filtertable[FILTERNAME] = computeunservedtopic
-        repoviewutil.subsettable[FILTERNAME] = b'immutable'
-        repoviewutil.subsettable[b'served'] = FILTERNAME
+        # hg <= 4.9 (caebe5e7f4bd)
+        branchmap.subsettable[FILTERNAME] = b'immutable'
+        branchmap.subsettable[b'served'] = FILTERNAME
--- a/hgext3rd/topic/topicmap.py	Sun Feb 05 19:55:48 2023 +0400
+++ b/hgext3rd/topic/topicmap.py	Mon Feb 06 18:37:59 2023 +0400
@@ -45,6 +45,7 @@
 def _setuptopicfilter(ui):
     """extend the filter related mapping with topic related one"""
     funcmap = repoview.filtertable
+    # hg <= 4.9 (caebe5e7f4bd)
     partialmap = branchmap.subsettable
 
     # filter level not affected by topic that we should not override