Mercurial > evolve
diff hgext3rd/topic/__init__.py @ 6237:0b9042408809
topic: formatting branch, namespace and topic into fully qualified branch name
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Tue, 03 May 2022 21:46:23 +0400 |
parents | 7ad8107d953a |
children | 6bbd16579f0f |
line wrap: on
line diff
--- a/hgext3rd/topic/__init__.py Tue May 03 21:35:28 2022 +0400 +++ b/hgext3rd/topic/__init__.py Tue May 03 21:46:23 2022 +0400 @@ -1512,3 +1512,13 @@ fm.write(b'topic_namespace', b'namespace: %s\n', tns) fm.write(b'topic', b'topic: %s\n', topic) fm.end() + +@command(b'debug-format-fqbn', [ + (b'b', b'branch', b'', b'branch'), + (b'n', b'topic-namespace', b'', b'topic namespace'), + (b't', b'topic', b'', b'topic'), + ], optionalrepo=True) +def debugformatfqbn(ui, repo, **opts): + """format branch, namespace and topic into branch//namespace/topic string""" + short = common.formatfqbn(opts.get('branch'), opts.get('topic_namespace'), opts.get('topic')) + ui.write(b'%s\n' % short)