D5514: test: change test's diff generation to use mdiff for nicer output
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Thu Jan 10 15:19:31 UTC 2019
durin42 added inline comments.
INLINE COMMENTS
> mdiff.py:554
> +
> +def new_diff(expected, output, ref, err):
> + exp, date1, out, date2, opts = prepare_mdiff(expected, output)
At least add a docstring taht explains this is designed to be a similar API to `difflib.unified_diff`?
> run-tests.py:50
> import collections
> +import datetime
> import difflib
unused?
> run-tests.py:54
> import errno
> +import itertools
> import json
unused?
> run-tests.py:81
> + _diff = mdiff.new_diff
> +except Exception:
> + print("Falling back to unified_diff")
Nit: `except (ImportError, AttributeError):` instead of just catching `Exception`.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D5514
To: sangeet259, #hg-reviewers, durin42
Cc: pulkit, durin42, mercurial-devel
More information about the Mercurial-devel
mailing list