Mercurial > evolve
comparison hgext3rd/topic/__init__.py @ 6268:63d6cc96557c
topic: get branch from extra data in ctx.fqbn()
At some point ctx.branch() will be wrapped to return ctx.fqbn() and this patch
lets us avoid infinite recursion.
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Fri, 08 Jul 2022 17:49:48 +0400 |
parents | 213db29a19e9 |
children | caf302fb8f4d |
comparison
equal
deleted
inserted
replaced
6267:1eb543272657 | 6268:63d6cc96557c |
---|---|
343 | 343 |
344 def _contextfqbn(self): | 344 def _contextfqbn(self): |
345 """return branch//namespace/topic of the changeset, also known as fully | 345 """return branch//namespace/topic of the changeset, also known as fully |
346 qualified branch name | 346 qualified branch name |
347 """ | 347 """ |
348 return common.formatfqbn(self.branch(), self.topic_namespace(), self.topic()) | 348 branch = encoding.tolocal(self.extra()[b'branch']) |
349 return common.formatfqbn(branch, self.topic_namespace(), self.topic()) | |
349 | 350 |
350 context.basectx.fqbn = _contextfqbn | 351 context.basectx.fqbn = _contextfqbn |
351 | 352 |
352 stackrev = re.compile(br'^s\d+$') | 353 stackrev = re.compile(br'^s\d+$') |
353 topicrev = re.compile(br'^t\d+$') | 354 topicrev = re.compile(br'^t\d+$') |