# HG changeset patch
# User Matt Harbison <
matt_h...@yahoo.com>
# Date 1659994294 14400
# Mon Aug 08 17:31:34 2022 -0400
# Branch stable
# Node ID 6d6fb5d21fc573a920071989e090bb12a6485538
# Parent 5636e98ee6b9b10c695f15445b3b174e52a3e88e
hglib: avoid crash when no options are configured for extdiff cmd (fixes #5551)
There's a deprecation warning in `shlex.split()` on py3 about passing `None`,
but the `pycompat` wrapper on py3 never supported it in the first place.
diff --git a/tortoisehg/util/hglib.py b/tortoisehg/util/hglib.py
--- a/tortoisehg/util/hglib.py
+++ b/tortoisehg/util/hglib.py
@@ -604,7 +604,7 @@
if not path:
path = cmd
diffopts = ui.config(b'extdiff', b'opts.' + cmd)
- diffopts = pycompat.shlexsplit(diffopts)
+ diffopts = pycompat.shlexsplit(diffopts) if diffopts else []
diffopts, mergeopts = fixup_extdiff(diffopts)
tools[cmd] = (path, diffopts, mergeopts)
elif cmd.startswith(b'opts.'):