# HG changeset patch # User Pierre-Yves David # Date 1533168948 -7200 # Node ID 9839463088acbbfc45b77acd8b9cdd927d7ca2e7 # Parent 28824ad64a12ca3c67063e061a72d042dfbe64c3 compat: disable empty topic warning on `hg phases` for hg <=4.5 This is annoying to support for lower version. diff -r 28824ad64a12 -r 9839463088ac hgext3rd/topic/__init__.py --- 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: