--- a/mercurial/cmdutil.py Fri Nov 19 12:57:53 2021 -0800
+++ b/mercurial/cmdutil.py Fri Nov 19 09:17:30 2021 -0800
@@ -2025,7 +2025,12 @@
similarity=sim / 100.0,
)
except error.PatchParseError as e:
- raise error.InputError(pycompat.bytestr(e))
+ raise error.InputError(
+ pycompat.bytestr(e),
+ hint=_(
+ b'check that whitespace in the patch has not been mangled'
+ ),
+ )
except error.PatchApplicationError as e:
if not partial:
raise error.StateError(pycompat.bytestr(e))
@@ -2086,7 +2091,12 @@
eolmode=None,
)
except error.PatchParseError as e:
- raise error.InputError(stringutil.forcebytestr(e))
+ raise error.InputError(
+ stringutil.forcebytestr(e),
+ hint=_(
+ b'check that whitespace in the patch has not been mangled'
+ ),
+ )
except error.PatchApplicationError as e:
raise error.StateError(stringutil.forcebytestr(e))
if opts.get(b'exact'):