Patchwork [7,of,7,STABLE] tests: discard useless "(glob)" in "reverting subrepo" lines

login
register
mail settings
Submitter Katsunori FUJIWARA
Date Jan. 21, 2015, 3:10 p.m.
Message ID <7ded951d7bd7d4906e3b.1421853054@juju>
Download mbox | patch
Permalink /patch/7531/
State Accepted
Commit fd5b9417d315ca85b197c588c0697e556c4a4683
Headers show

Comments

Katsunori FUJIWARA - Jan. 21, 2015, 3:10 p.m.
# HG changeset patch
# User FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
# Date 1421853026 -32400
#      Thu Jan 22 00:10:26 2015 +0900
# Branch stable
# Node ID 7ded951d7bd7d4906e3b9247a3b98085a7c87fa0
# Parent  e6797a86b8c3b05aedfc7d0b1fccda0f476cae87
tests: discard useless "(glob)" in "reverting subrepo" lines
Matt Mackall - Jan. 21, 2015, 10:48 p.m.
On Thu, 2015-01-22 at 00:10 +0900, FUJIWARA Katsunori wrote:
> # HG changeset patch
> # User FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
> # Date 1421853026 -32400
> #      Thu Jan 22 00:10:26 2015 +0900
> # Branch stable
> # Node ID 7ded951d7bd7d4906e3b9247a3b98085a7c87fa0
> # Parent  e6797a86b8c3b05aedfc7d0b1fccda0f476cae87
> tests: discard useless "(glob)" in "reverting subrepo" lines

Ok, I've queued most of these, thanks. However, I haven't queued 3 and 5
because I think we're actually pretty negative on using hg.bat at all
these days (precisely because it needs these sorts of hacky fixups).
Katsunori FUJIWARA - Jan. 22, 2015, 3:30 p.m.
At Wed, 21 Jan 2015 16:48:00 -0600,
Matt Mackall wrote:
> 
> On Thu, 2015-01-22 at 00:10 +0900, FUJIWARA Katsunori wrote:
> > # HG changeset patch
> > # User FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
> > # Date 1421853026 -32400
> > #      Thu Jan 22 00:10:26 2015 +0900
> > # Branch stable
> > # Node ID 7ded951d7bd7d4906e3b9247a3b98085a7c87fa0
> > # Parent  e6797a86b8c3b05aedfc7d0b1fccda0f476cae87
> > tests: discard useless "(glob)" in "reverting subrepo" lines
> 
> Ok, I've queued most of these, thanks. However, I haven't queued 3 and 5
> because I think we're actually pretty negative on using hg.bat at all
> these days (precisely because it needs these sorts of hacky fixups).

I agree on rejecting #3, but #5 seems to be needed to run test-tag.t
successfully on Windows, because the latter of problems below occurs
on Windows (+ MinGW) regardless of using "hg.bat".

> >   - quoted hg command ('"hg"') prevents "hg.bat" from working correctly
> >     (only at testing with pure Python build)
> > 
> >     "%~f0" and "%~dp0hg" in "hg.bat" cause unexpected result in this
> >     case. BTW, quoted "\path\to\hg" works correctly.
> > 
> >   - "`pwd`" in the command line is expanded unexpectedly
> > 
> >     not "C:\path\to\TESTTMP" but "C;C:\path\to\TESTTMP"

As far as I confirmed, MinGW shell seems to convert sub-string in each
arguments just before forking process, if:

  - it is a path like string (e.g. "c:/foo/bar" form), and
  - it is NOT the 1st element of argument

For example:

    $ python -c "import sys; print sys.argv" "C:/foo/bar" "foo C:/bar/baz"

"test-sample.t" above invoked via "run-tests.py --debug" causes result
below. (BTW, I can reproduce this with Windows native "python.exe".
Does MinGW python avoid this problem ?)

    + python -c 'import sys; print sys.argv' C:/foo/bar 'foo C:/foo/bar'
    ['-c', 'C:/foo/bar', 'foo C;C:\\MinGW\\msys\\1.0\\foo\\bar']
                             ^^^^ <<<< !!!!

This unexpected "C;" prefix of the path causes missing the target
repository in "test-tag.t" on Windows.

> > diff --git a/tests/test-tag.t b/tests/test-tag.t
> > --- a/tests/test-tag.t
> > +++ b/tests/test-tag.t
> > @@ -395,7 +395,10 @@ commit hook on tag used to be run withou
> >    $ hg -R repo-tag commit -A -m "test"
> >    adding test
> >    $ hg init repo-tag-target
> > -  $ hg -R repo-tag --config hooks.commit="\"hg\" push \"`pwd`/repo-tag-target\"" tag tag
> > +  $ cat > "$TESTTMP/issue3344.sh" <<EOF
> > +  > hg push "$TESTTMP/repo-tag-target"
> > +  > EOF
> > +  $ hg -R repo-tag --config hooks.commit="sh ../issue3344.sh" tag tag
> >    pushing to $TESTTMP/repo-tag-target (glob)
> >    searching for changes
> >    adding changesets

----------------------------------------------------------------------
[FUJIWARA Katsunori]                             foozy@lares.dti.ne.jp

Patch

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
@@ -787,7 +787,7 @@  ensure adding include/exclude ignores th
 
 revert the subrepository
   $ hg revert --all
-  reverting subrepo ../gitroot (glob)
+  reverting subrepo ../gitroot
 
   $ hg status --subrepos
   ? s/barfoo
@@ -796,7 +796,7 @@  revert the subrepository
   $ mv s/foobar.orig s/foobar
 
   $ hg revert --no-backup s
-  reverting subrepo ../gitroot (glob)
+  reverting subrepo ../gitroot
 
   $ hg status --subrepos
   ? s/barfoo