[PATCH] tests: allow more flexibility in git diffstat output

Matt Harbison mharbison72 at gmail.com
Sat Dec 13 11:04:30 CST 2014


On Sat, 13 Dec 2014 10:40:44 -0500, Mathias De Maré  
<mathias.demare at gmail.com> wrote:

> # HG changeset patch
> # User Mathias De Maré <mathias.demare at gmail.com>
> # Date 1418460300 -3600
> #      Sam Dez 13 09:45:00 2014 +0100
> # Node ID eaf33fff7f2c31a5cc57b95898255221b0e3dc6f
> # Parent  495bc1b65d25872324a0220354f048b220304bd1
> tests: allow more flexibility in git diffstat output
>

This fixed the original spacing problem, but leaves this:

--- /home/matt/hg/tests/test-subrepo-git.t
+++ /home/matt/hg/tests/test-subrepo-git.t.err
@@ -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)

  ensure adding include/exclude ignores the subrepo
    $ hg diff --subrepos -I s/foobar

ERROR: test-subrepo-git.t output changed
!
Failed test-subrepo-git.t: output changed

I guess regex the singular/plural too, or maybe make it report 2 or more  
deletions to avoid the issue?

--Matt


More information about the Mercurial-devel mailing list