# HG changeset patch # User Pierre-Yves David # Date 1555578819 -7200 # Node ID 24662f94d1261c638b6da0ee1a4af88ee6abda2b # Parent 51317ce90bdc8f245ebf058d7596277be8bf8c34 topic: only wrap committext for repo with topic This helps repository with and without topic to coexist in the same process. diff -r 51317ce90bdc -r 24662f94d126 hgext3rd/topic/__init__.py --- a/hgext3rd/topic/__init__.py Thu Apr 18 11:13:24 2019 +0200 +++ b/hgext3rd/topic/__init__.py Thu Apr 18 11:13:39 2019 +0200 @@ -1165,10 +1165,11 @@ def committextwrap(orig, repo, ctx, subs, extramsg): ret = orig(repo, ctx, subs, extramsg) - t = repo.currenttopic - if t: - ret = ret.replace("\nHG: branch", - "\nHG: topic '%s'\nHG: branch" % t) + if hastopicext(repo): + t = repo.currenttopic + if t: + ret = ret.replace("\nHG: branch", + "\nHG: topic '%s'\nHG: branch" % t) return ret def pushoutgoingwrap(orig, ui, repo, *args, **opts):