[PATCH 6 of 6 V2] tests: add alias to detect external diff invocation via extdiff

Yuya Nishihara yuya at tcha.org
Tue Feb 9 09:44:33 EST 2016


On Mon, 08 Feb 2016 18:39:22 +0900, FUJIWARA Katsunori wrote:
> # HG changeset patch
> # User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
> # Date 1454923758 -32400
> #      Mon Feb 08 18:29:18 2016 +0900
> # Node ID 8bfab6803b7ef9c4e26c5834c9d2deeccc4f074b
> # Parent  2d91a08cbf07bcb0413f5de8cc880571d9522987
> tests: add alias to detect external diff invocation via extdiff
> 
> As previous patch described, direct usage of external "diff" command
> via extdiff extension isn't portable.
> 
> To detect unintentional external "diff" command invocation via extdiff
> immediately, this patch adds HGRCPATH file an alias definition below,
> which shadows original "hg extdiff".
> 
>     [alias]
>     extdiff = !echo use tests/pdiff via extdiff extension for portability

Can't it be a check-code rule?
I think "hg extdiff" with no -p/-o will catch most of errors.

The patch 5 looks good but I've not pushed yet as you might want to fold
check-code rule into it.


More information about the Mercurial-devel mailing list