# HG changeset patch # User Mathias De Maré # Date 2014-12-14 20:00:58 # Node ID 7651621507cf868170bd6f2c765958662f4a26f3 # Parent 7fa2189c1e87f1c6830c7841dacbc3fb61b3b545 tests: avoid git diffstat singular/plural output difference 'git diff --stat' output changed with regard to the amount of changes/insertions/deletions shown. In older git versions (1.7.7.6), output was shown as: 2 files changed, 2 insertions(+), 1 deletions(-) In newer versions, output is shown as: 2 files changed, 2 insertions(+), 1 deletion(-) This patch uses a regex to handle both cases. diff --git a/tests/test-subrepo-git.t b/tests/test-subrepo-git.t --- a/tests/test-subrepo-git.t +++ b/tests/test-subrepo-git.t @@ -778,7 +778,7 @@ the output contains a regex, because git $ hg diff --subrepos --stat \s*barfoo |\s*1 + (re) \s*foobar |\s*2 +- (re) - 2 files changed, 2 insertions(+), 1 deletion(-) (no-eol) + 2 files changed, 2 insertions\(\+\), 1 deletions?\(-\) \(no-eol\) (re) ensure adding include/exclude ignores the subrepo $ hg diff --subrepos -I s/foobar