--- a/hgext3rd/topic/__init__.py Thu Mar 12 02:08:39 2020 +0100
+++ b/hgext3rd/topic/__init__.py Wed Apr 08 01:02:23 2020 +0800
@@ -382,7 +382,10 @@
# Wrap changelog.add to drop empty topic
extensions.wrapfunction(changelog.changelog, 'add', wrapadd)
# Make exchange._checkpublish handle experimental.topic.publish-bare-branch
- extensions.wrapfunction(exchange, '_checkpublish', flow.replacecheckpublish)
+ if util.safehasattr(exchange, '_checkpublish'):
+ # hg <= 4.8 (33d30fb1e4ae)
+ extensions.wrapfunction(exchange, '_checkpublish',
+ flow.replacecheckpublish)
server.setupserver(ui)