topic: add a compatibility to access transaction's names
The attribute was made private in 4024c363cd33.
--- a/hgext3rd/topic/__init__.py Fri Sep 21 17:50:28 2018 +0200
+++ b/hgext3rd/topic/__init__.py Fri Sep 21 19:49:28 2018 +0200
@@ -516,9 +516,10 @@
empty = csetcount == 0
if empty and not ctwasempty:
ui.status('active topic %r is now empty\n' % ct)
- if ('phase' in getattr(tr, 'names', ())
+ trnames = getattr(tr, 'names', getattr(tr, '_names', ()))
+ if ('phase' in trnames
or any(n.startswith('push-response')
- for n in getattr(tr, 'names', ()))):
+ for n in trnames)):
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: