test-subrepo-git.t on windows

Eduard-Cristian Stefan alexandrul.ct at gmail.com
Tue Jun 19 14:41:41 CDT 2012


On 2012-06-19 18:02, Benjamin Pollack wrote:
> I already submitted a patch last week that fixes this a week ago (http://www.selenic.com/pipermail/mercurial-devel/2012-June/041457.html). Basically, the most common Git on Windows (MSYS) only installs git.cmd in the path, and subprocess.Popen, for whatever reason, doesn't find that kind of batch file.  My patch tries plain "git", then falls back to an explicit git.cmd on Windows on failure.  It works fine and passes the test suite, both with and without Git installed.

The patch works just fine, but test-subrepo-git.t fails on my PC.

On default branch rev 132ea1736751 + your patches I get these errors:

--- d:\hg\tests\test-subrepo-git.t
+++ d:\hg\tests\test-subrepo-git.t.err
@@ -25,6 +25,8 @@
    $ git init -q
    $ echo g > g
    $ git add g
+  warning: LF will be replaced by CRLF in g.
+  The file will have its original line endings in your working directory.
    $ git commit -q -m g

  add subrepo clone
@@ -45,6 +47,8 @@
    $ git checkout -q -b testing
    $ echo gg >> g
    $ git commit -q -a -m gg
+  warning: LF will be replaced by CRLF in g.
+  The file will have its original line endings in your working directory.

    $ cd ../t/s
    $ git pull -q >/dev/null 2>/dev/null
@@ -102,6 +106,12 @@
    $ hg status --subrepos
    M s/g
    $ hg commit --subrepos -m ggg
+  warning: LF will be replaced by CRLF in g.
+  The file will have its original line endings in your working directory.
+  warning: LF will be replaced by CRLF in g.
+  The file will have its original line endings in your working directory.
+  warning: LF will be replaced by CRLF in g.
+  The file will have its original line endings in your working directory.
    committing subrepository s
    $ hg debugsub
    path s
@@ -119,11 +129,17 @@
    $ cd ../tb/s
    $ echo f > f
    $ git add f
+  warning: LF will be replaced by CRLF in f.
+  The file will have its original line endings in your working directory.
    $ cd ..

    $ hg status --subrepos
    A s/f
    $ hg commit --subrepos -m f
+  warning: LF will be replaced by CRLF in f.
+  The file will have its original line endings in your working directory.
+  warning: LF will be replaced by CRLF in f.
+  The file will have its original line endings in your working directory.
    committing subrepository s
    $ hg debugsub
    path s
@@ -133,7 +149,7 @@
  user b push changes

    $ hg push 2>/dev/null
-  pushing to $TESTTMP/t
+  pushing to $TESTTMP\t
    pushing branch testing of subrepo s
    searching for changes
    adding changesets
@@ -145,7 +161,7 @@

    $ cd ../ta
    $ hg pull
-  pulling from $TESTTMP/t
+  pulling from $TESTTMP\t
    searching for changes
    adding changesets
    adding manifests
@@ -173,7 +189,7 @@
     source   ../gitroot
     revision f47b465e1bce645dbf37232a00574aa1546ca8d3
    $ hg push 2>/dev/null
-  pushing to $TESTTMP/t
+  pushing to $TESTTMP\t
    pushing branch testing of subrepo s
    searching for changes
    adding changesets
@@ -188,8 +204,12 @@
    $ cd gitclone
    $ echo ff >> f
    $ git commit -q -a -m ff
+  warning: LF will be replaced by CRLF in f.
+  The file will have its original line endings in your working directory.
    $ echo fff >> f
    $ git commit -q -a -m fff
+  warning: LF will be replaced by CRLF in f.
+  The file will have its original line endings in your working directory.
    $ git push origin testing 2>/dev/null

  make and push changes to hg without updating the subrepo
@@ -205,7 +225,7 @@
    $ echo aa >> a
    $ hg commit -m aa
    $ hg push
-  pushing to $TESTTMP/t
+  pushing to $TESTTMP\t
    searching for changes
    adding changesets
    adding manifests
@@ -291,8 +311,14 @@
    $ hg status --subrepos
    M inner/s/f
    $ hg commit --subrepos -m nested
+  warning: LF will be replaced by CRLF in f.
+  The file will have its original line endings in your working directory.
+  warning: LF will be replaced by CRLF in f.
+  The file will have its original line endings in your working directory.
+  warning: LF will be replaced by CRLF in f.
+  The file will have its original line endings in your working directory.
    committing subrepository inner
-  committing subrepository inner/s
+  committing subrepository inner\s

  nested archive

@@ -378,6 +404,8 @@
    $ echo c1 > f1
    $ echo c1 > f2
    $ git add f1
+  warning: LF will be replaced by CRLF in f1.
+  The file will have its original line endings in your working directory.
    $ cd ..
    $ hg status -S
    M s/g
@@ -416,6 +444,8 @@
    $ touch s/f1
    $ cd s
    $ git add f1
+  warning: LF will be replaced by CRLF in f1.
+  The file will have its original line endings in your working directory.
    $ cd ..
    $ hg id -n
    1
@@ -464,6 +494,8 @@
    $ touch s/f1
    $ cd s
    $ git add f1
+  warning: LF will be replaced by CRLF in f1.
+  The file will have its original line endings in your working directory.
    $ git rev-parse HEAD
    aa84837ccfbdfedcdcdeeedc309d73e6eb069edc
    $ cd ..
@@ -510,7 +542,7 @@
  Test forgetting files, not implemented in git subrepo, used to
  traceback
    $ hg forget 'notafile*'
-  notafile*: No such file or directory
+  notafile*: The filename, directory name, or volume label syntax is incorrect
    [1]

    $ cd ..

ERROR: d:\hg\tests\test-subrepo-git.t output changed
!
Failed test-subrepo-git.t: output changed
# Ran 1 tests, 0 skipped, 1 failed.

I'll send a patch in a minute.

Have a nice day,
   Eduard


More information about the Mercurial-devel mailing list