Patchwork tests: drop some unnecessary globs for Windows

login
register
mail settings
Submitter Matt Harbison
Date Feb. 2, 2019, 3:49 a.m.
Message ID <2cdacfe6002918eddc7f.1549079399@Envy>
Download mbox | patch
Permalink /patch/38320/
State New
Headers show

Comments

Matt Harbison - Feb. 2, 2019, 3:49 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1549077873 18000
#      Fri Feb 01 22:24:33 2019 -0500
# Node ID 2cdacfe6002918eddc7fb75d47e42f1b26214703
# Parent  1bf9a0827395c593144ffd1fd4cd0713bf0b62e6
tests: drop some unnecessary globs for Windows

This changed in 1d6eae696cf1.
Yuya Nishihara - Feb. 3, 2019, 1:28 a.m.
On Fri, 01 Feb 2019 22:49:59 -0500, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_harbison@yahoo.com>
> # Date 1549077873 18000
> #      Fri Feb 01 22:24:33 2019 -0500
> # Node ID 2cdacfe6002918eddc7fb75d47e42f1b26214703
> # Parent  1bf9a0827395c593144ffd1fd4cd0713bf0b62e6
> tests: drop some unnecessary globs for Windows
> 
> This changed in 1d6eae696cf1.
> 
> diff --git a/tests/test-status-color.t b/tests/test-status-color.t
> --- a/tests/test-status-color.t
> +++ b/tests/test-status-color.t
> @@ -31,19 +31,19 @@ hg status in repo root:
>    [status.unknown|? ][status.unknown|in_root]
>  HGPLAIN disables color
>    $ HGPLAIN=1 hg status --color=debug
> -  ? a/1/in_a_1 (glob)
> -  ? a/in_a (glob)
> -  ? b/1/in_b_1 (glob)
> -  ? b/2/in_b_2 (glob)
> -  ? b/in_b (glob)
> +  ? a/1/in_a_1
> +  ? a/in_a
> +  ? b/1/in_b_1
> +  ? b/2/in_b_2
> +  ? b/in_b

Is this '\' vs '/' thing? Sounds like a bug of 1d6eae696cf1.
Matt Harbison - Feb. 3, 2019, 2:06 a.m.
> On Feb 2, 2019, at 8:28 PM, Yuya Nishihara <yuya@tcha.org> wrote:
> 
>> On Fri, 01 Feb 2019 22:49:59 -0500, Matt Harbison wrote:
>> # HG changeset patch
>> # User Matt Harbison <matt_harbison@yahoo.com>
>> # Date 1549077873 18000
>> #      Fri Feb 01 22:24:33 2019 -0500
>> # Node ID 2cdacfe6002918eddc7fb75d47e42f1b26214703
>> # Parent  1bf9a0827395c593144ffd1fd4cd0713bf0b62e6
>> tests: drop some unnecessary globs for Windows
>> 
>> This changed in 1d6eae696cf1.
>> 
>> diff --git a/tests/test-status-color.t b/tests/test-status-color.t
>> --- a/tests/test-status-color.t
>> +++ b/tests/test-status-color.t
>> @@ -31,19 +31,19 @@ hg status in repo root:
>>   [status.unknown|? ][status.unknown|in_root]
>> HGPLAIN disables color
>>   $ HGPLAIN=1 hg status --color=debug
>> -  ? a/1/in_a_1 (glob)
>> -  ? a/in_a (glob)
>> -  ? b/1/in_b_1 (glob)
>> -  ? b/2/in_b_2 (glob)
>> -  ? b/in_b (glob)
>> +  ? a/1/in_a_1
>> +  ? a/in_a
>> +  ? b/1/in_b_1
>> +  ? b/2/in_b_2
>> +  ? b/in_b
> 
> Is this '\' vs '/' thing? Sounds like a bug of 1d6eae696cf1.

I believe so. Past experience says that the test harness will leave stray globs on non Windows platforms, but will remove them if there are no ‘/‘ on Windows.  And now the test harness can make that conversion without marking a glob.  I figured we didn’t care about the minor style change, because it’s already fairly inconsistent on Windows, depending on the command and options given.
Yuya Nishihara - Feb. 3, 2019, 2:39 a.m.
On Sat, 2 Feb 2019 21:06:54 -0500, Matt Harbison wrote:
> 
> > On Feb 2, 2019, at 8:28 PM, Yuya Nishihara <yuya@tcha.org> wrote:
> > 
> >> On Fri, 01 Feb 2019 22:49:59 -0500, Matt Harbison wrote:
> >> # HG changeset patch
> >> # User Matt Harbison <matt_harbison@yahoo.com>
> >> # Date 1549077873 18000
> >> #      Fri Feb 01 22:24:33 2019 -0500
> >> # Node ID 2cdacfe6002918eddc7fb75d47e42f1b26214703
> >> # Parent  1bf9a0827395c593144ffd1fd4cd0713bf0b62e6
> >> tests: drop some unnecessary globs for Windows
> >> 
> >> This changed in 1d6eae696cf1.
> >> 
> >> diff --git a/tests/test-status-color.t b/tests/test-status-color.t
> >> --- a/tests/test-status-color.t
> >> +++ b/tests/test-status-color.t
> >> @@ -31,19 +31,19 @@ hg status in repo root:
> >>   [status.unknown|? ][status.unknown|in_root]
> >> HGPLAIN disables color
> >>   $ HGPLAIN=1 hg status --color=debug
> >> -  ? a/1/in_a_1 (glob)
> >> -  ? a/in_a (glob)
> >> -  ? b/1/in_b_1 (glob)
> >> -  ? b/2/in_b_2 (glob)
> >> -  ? b/in_b (glob)
> >> +  ? a/1/in_a_1
> >> +  ? a/in_a
> >> +  ? b/1/in_b_1
> >> +  ? b/2/in_b_2
> >> +  ? b/in_b
> > 
> > Is this '\' vs '/' thing? Sounds like a bug of 1d6eae696cf1.
> 
> I believe so. Past experience says that the test harness will leave stray globs on non Windows platforms, but will remove them if there are no ‘/‘ on Windows.  And now the test harness can make that conversion without marking a glob.  I figured we didn’t care about the minor style change, because it’s already fairly inconsistent on Windows, depending on the command and options given.

We don't care minor change in error/warning messages, but I think we should
preserve the existing behavior because paths are the most important data
"hg status" provides.

Patch

diff --git a/tests/test-status-color.t b/tests/test-status-color.t
--- a/tests/test-status-color.t
+++ b/tests/test-status-color.t
@@ -31,19 +31,19 @@  hg status in repo root:
   [status.unknown|? ][status.unknown|in_root]
 HGPLAIN disables color
   $ HGPLAIN=1 hg status --color=debug
-  ? a/1/in_a_1 (glob)
-  ? a/in_a (glob)
-  ? b/1/in_b_1 (glob)
-  ? b/2/in_b_2 (glob)
-  ? b/in_b (glob)
+  ? a/1/in_a_1
+  ? a/in_a
+  ? b/1/in_b_1
+  ? b/2/in_b_2
+  ? b/in_b
   ? in_root
 HGPLAINEXCEPT=color does not disable color
   $ HGPLAINEXCEPT=color hg status --color=debug
-  [status.unknown|? ][status.unknown|a/1/in_a_1] (glob)
-  [status.unknown|? ][status.unknown|a/in_a] (glob)
-  [status.unknown|? ][status.unknown|b/1/in_b_1] (glob)
-  [status.unknown|? ][status.unknown|b/2/in_b_2] (glob)
-  [status.unknown|? ][status.unknown|b/in_b] (glob)
+  [status.unknown|? ][status.unknown|a/1/in_a_1]
+  [status.unknown|? ][status.unknown|a/in_a]
+  [status.unknown|? ][status.unknown|b/1/in_b_1]
+  [status.unknown|? ][status.unknown|b/2/in_b_2]
+  [status.unknown|? ][status.unknown|b/in_b]
   [status.unknown|? ][status.unknown|in_root]
 
 hg status with template
diff --git a/tests/test-status.t b/tests/test-status.t
--- a/tests/test-status.t
+++ b/tests/test-status.t
@@ -116,11 +116,11 @@  tweaking defaults works
   ? ../b/in_b
   ? ../in_root
   $ HGPLAIN=1 hg status --cwd a --config ui.tweakdefaults=yes
-  ? a/1/in_a_1 (glob)
-  ? a/in_a (glob)
-  ? b/1/in_b_1 (glob)
-  ? b/2/in_b_2 (glob)
-  ? b/in_b (glob)
+  ? a/1/in_a_1
+  ? a/in_a
+  ? b/1/in_b_1
+  ? b/2/in_b_2
+  ? b/in_b
   ? in_root
   $ HGPLAINEXCEPT=tweakdefaults hg status --cwd a --config ui.tweakdefaults=yes
   ? 1/in_a_1
@@ -160,11 +160,11 @@  commands.status.relative overrides ui.re
   ? ../b/in_b
   ? ../in_root
   $ HGPLAIN=1 hg status --cwd a
-  ? a/1/in_a_1 (glob)
-  ? a/in_a (glob)
-  ? b/1/in_b_1 (glob)
-  ? b/2/in_b_2 (glob)
-  ? b/in_b (glob)
+  ? a/1/in_a_1
+  ? a/in_a
+  ? b/1/in_b_1
+  ? b/2/in_b_2
+  ? b/in_b
   ? in_root
 
 if relative paths are explicitly off, tweakdefaults doesn't change it