changeset 23551:7651621507cf

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.
author Mathias De Maré <mathias.demare@gmail.com>
date Sun, 14 Dec 2014 21:00:58 +0100
parents 7fa2189c1e87
children 72319005f5fb
files tests/test-subrepo-git.t
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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