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.
--- a/tests/test-subrepo-git.t Sun Dec 14 11:34:51 2014 +0100
+++ b/tests/test-subrepo-git.t Sun Dec 14 21:00:58 2014 +0100
@@ -778,7 +778,7 @@
$ 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