hgext3rd/topic/__init__.py
branchstable
changeset 3922 9839463088ac
parent 3902 9c4847b93d3c
child 3925 3c2a464ae6fc
--- 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: