Commits

Yuya Nishihara committed df2f5a0

add workaround for TortoiseHg issue 2329

Comments (0)

Files changed (1)

hgext/thgissue2329.py

+# thgissue2329.py - disable MQ patch grapher of TortoiseHg
+"""disable MQ patch grapher of TortoiseHg (issue2329)
+
+Usage::
+
+    [extensions]
+    thgissue2329 = path/to/hgext/thgissue2329.py
+"""
+
+import sys
+from mercurial import extensions
+
+def _nullgrapher(orig, repo):
+    return []
+
+def uisetup(ui):
+    if 'tortoisehg.hgqt.run' not in sys.modules:
+        return  # not a TortoiseHg
+
+    from tortoisehg.hgqt import graph
+    extensions.wrapfunction(graph, 'mq_patch_grapher', _nullgrapher)