Porting test-tag.t

Adrian Buehlmann adrian at cadifra.com
Fri Jun 1 11:59:10 CDT 2012


I've been trying to port test-tag.t for testing with MSYS on Windows, but failed so far.

The closest thing I got half-way working for now is:

diff --git a/tests/test-tag.t b/tests/test-tag.t
--- a/tests/test-tag.t
+++ b/tests/test-tag.t
@@ -1,5 +1,3 @@
-  $ "$TESTDIR/hghave" system-sh || exit 80
-
   $ hg init test
   $ cd test
 
@@ -219,8 +217,7 @@
   > echo "custom tag message" > "$1"
   > echo "second line" >> "$1"
   > __EOF__
-  $ chmod +x editor
-  $ HGEDITOR="'`pwd`'"/editor hg tag custom-tag -e
+  $ HGEDITOR="sh editor" hg tag custom-tag -e
   $ hg log -l1 --template "{desc}\n"
   custom tag message
   second line
@@ -305,7 +302,7 @@
 
   $ hg init repo-tag
   $ hg init repo-tag-target
-  $ hg -R repo-tag --config hooks.commit="hg push \"`pwd`/repo-tag-target\"" tag tag
+  $ hg -R repo-tag --config hooks.commit="hg push \"$TESTTMP/repo-tag-target\"" tag tag
   pushing to $TESTTMP/repo-tag-target
   searching for changes
   adding changesets

which I would expect to work, but it doesn't. I fails with

--- c:\users\adi\hgrepos\hg-main\tests\test-tag.t
+++ c:\users\adi\hgrepos\hg-main\tests\test-tag.t.err
@@ -303,10 +303,7 @@
   $ hg init repo-tag
   $ hg init repo-tag-target
   $ hg -R repo-tag --config hooks.commit="hg push \"$TESTTMP/repo-tag-target\"" tag tag
-  pushing to $TESTTMP/repo-tag-target
-  searching for changes
-  adding changesets
-  adding manifests
-  adding file changes
-  added 1 changesets with 1 changes to 1 files
-
+  pushing to c;C:\Users\adi\AppData\Local\Temp\hgtests.wbaa4t\test-tag.t\repo-tag-target
+  abort: repository c;C:\Users\adi\AppData\Local\Temp\hgtests.wbaa4t\test-tag.t\repo-tag-target not found!
+  warning: commit hook exited with status 255
+

If I insert a --debug I get:

--- c:\users\adi\hgrepos\hg-main\tests\test-tag.t
+++ c:\users\adi\hgrepos\hg-main\tests\test-tag.t.err
@@ -303,10 +303,9 @@
   $ hg init repo-tag
   $ hg init repo-tag-target
   $ hg --debug -R repo-tag --config hooks.commit="hg push \"$TESTTMP/repo-tag-target\"" tag tag
-  pushing to $TESTTMP/repo-tag-target
-  searching for changes
-  adding changesets
-  adding manifests
-  adding file changes
-  added 1 changesets with 1 changes to 1 files
-
+  .hgtags
+  running hook commit: hg push "c;C:\Users\adi\AppData\Local\Temp\hgtests.kwyoh7\test-tag.t\repo-tag-target"
+  pushing to c;C:\Users\adi\AppData\Local\Temp\hgtests.kwyoh7\test-tag.t\repo-tag-target
+  abort: repository c;C:\Users\adi\AppData\Local\Temp\hgtests.kwyoh7\test-tag.t\repo-tag-target not found!
+  warning: commit hook exited with status 255
+

Right now, I have no idea where this funny "c;" is coming from.

Ideas would be welcome.

TIA




More information about the Mercurial-devel mailing list