compat: disable empty topic warning on `hg phases` for hg <=4.5
This is annoying to support for lower version.
--- 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: