Mercurial > evolve
changeset 3922:9839463088ac stable
compat: disable empty topic warning on `hg phases` for hg <=4.5
This is annoying to support for lower version.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 02 Aug 2018 02:15:48 +0200 |
parents | 28824ad64a12 |
children | 257481642686 3c2a464ae6fc |
files | hgext3rd/topic/__init__.py |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/topic/__init__.py Thu Aug 02 01:31:02 2018 +0200 +++ b/hgext3rd/topic/__init__.py Thu Aug 02 02:15:48 2018 +0200 @@ -487,8 +487,9 @@ empty = csetcount == 0 if empty and not ctwasempty: ui.status('active topic %r is now empty\n' % ct) - if ('phase' in tr.names - or any(n.startswith('push-response') for n in tr.names)): + if ('phase' in getattr(tr, 'names', ()) + or any(n.startswith('push-response') + for n in getattr(tr, 'names', ()))): ui.status(_("(use 'hg topic --clear' to clear it if needed)\n")) hint = _("(see 'hg help topics' for more information)\n") if ctwasempty and not empty: