1. Yuya Nishihara
  2. hgext-workarounds

Commits

Yuya Nishihara  committed df2f5a0

add workaround for TortoiseHg issue 2329

  • Participants
  • Parent commits d4c1271
  • Branches default

Comments (0)

Files changed (1)

File hgext/thgissue2329.py

View file
+# 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)