Mercurial > public > mercurial-scm > evolve
diff hgext3rd/topic/__init__.py @ 6266:213db29a19e9
topic: ability to shorten branch//namespace/topic strings when possible
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Tue, 31 May 2022 12:14:51 +0400 |
parents | a54db3e55c88 |
children | 63d6cc96557c |
line wrap: on
line diff
--- a/hgext3rd/topic/__init__.py Thu Jun 23 18:18:55 2022 +0400 +++ b/hgext3rd/topic/__init__.py Tue May 31 12:14:51 2022 +0400 @@ -1629,8 +1629,9 @@ (b'b', b'branch', b'', b'branch'), (b'n', b'topic-namespace', b'', b'topic namespace'), (b't', b'topic', b'', b'topic'), + (b's', b'short', False, b'short format'), ], 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')) + short = common.formatfqbn(opts.get('branch'), opts.get('topic_namespace'), opts.get('topic'), opts.get('short')) ui.write(b'%s\n' % short)