diff hgext3rd/topic/__init__.py @ 4628:c4097632a1a3

topic: drop support for accessing csets in branch stack using bxx (issue6119) When topic extension is enabled and we have some cset whose hash is `b1234`, topic extension thinks that we are accessing 1234 cset in current branch stack. However that's not the case generally. Also I am not sure many people use this bxxx thing. Since we have a generic sxxx way to access csets, let's drop support for accessing csets using bxx which leads to bad behavior. Looking at the tests, we don't show bxxx in hg stack output anymore. I update the test to use sxxx instead of bxxxx.
author Pulkit Goyal <7895pulkit@gmail.com>
date Sat, 27 Apr 2019 01:18:08 +0300
parents 48521a49a07e
children 7b986968700b
line wrap: on
line diff
--- a/hgext3rd/topic/__init__.py	Sun Apr 28 00:21:28 2019 -0400
+++ b/hgext3rd/topic/__init__.py	Sat Apr 27 01:18:08 2019 +0300
@@ -256,7 +256,6 @@
 
 stackrev = re.compile(r'^s\d+$')
 topicrev = re.compile(r'^t\d+$')
-branchrev = re.compile(r'^b\d+$')
 
 hastopicext = common.hastopicext
 
@@ -279,11 +278,6 @@
         if not tname:
             raise error.Abort(_('cannot resolve "%s": no active topic') % name)
         revs = list(stack.stack(repo, topic=topic))
-    elif branchrev.match(name):
-        ttype = 'branch'
-        idx = int(name[1:])
-        tname = branch = repo[None].branch()
-        revs = list(stack.stack(repo, branch=branch))
 
     if revs is not None:
         try:
@@ -294,7 +288,7 @@
             elif ttype == 'branch':
                 msg = _('cannot resolve "%s": %s "%s" has only %d non-public changesets')
             raise error.Abort(msg % (name, ttype, tname, len(revs) - 1))
-        # b0 or t0 or s0 can be None
+        # t0 or s0 can be None
         if r == -1 and idx == 0:
             msg = _('the %s "%s" has no %s')
             raise error.Abort(msg % (ttype, tname, name))