[PATCH] test-tags: enable for Windows

Adrian Buehlmann adrian at cadifra.com
Mon Jun 4 14:42:12 CDT 2012


# HG changeset patch
# User Adrian Buehlmann <adrian at cadifra.com>
# Date 1338838838 -7200
# Node ID c67273583b5d8f7e0510994fd2094f516c980382
# Parent  0f10c804d30f92408986dc738cd2a1e455618505
test-tags: enable for Windows

It turns out that MSYS does have a chmod.exe, but it has no effect. So, the
inserted "#if unix-permissions" is somewhat redundant, as the test would pass
without it as well: it would simply write the tag cache, despite what the
comment says.

But I'm actually in favor of inserting the #if, as it makes it clearer what's
going on.

diff --git a/tests/test-tags.t b/tests/test-tags.t
--- a/tests/test-tags.t
+++ b/tests/test-tags.t
@@ -1,5 +1,3 @@
-  $ "$TESTDIR/hghave" unix-permissions || exit 80
-
 Helper functions:
 
   $ cacheexists() {
@@ -77,11 +75,13 @@
 
 And again, but now unable to write tag cache:
 
+#if unix-permissions
   $ rm -f .hg/cache/tags
   $ chmod 555 .hg
   $ hg identify
   b9154636be93 tip
   $ chmod 755 .hg
+#endif
 
 Create a branch:
 


More information about the Mercurial-devel mailing list