[PATCH 2 of 2] test-static-http.t: increase test coverage on filenames

Adrian Buehlmann adrian at cadifra.com
Sun Dec 26 05:25:37 CST 2010


# HG changeset patch
# User Adrian Buehlmann <adrian at cadifra.com>
# Date 1293361700 -3600
# Node ID 588fec8651ea159204c8a3d3a27137dd72c86d59
# Parent  2e114ecae3fdd1268615633989fa99bb345aa7fd
test-static-http.t: increase test coverage on filenames

Tracked files starting with a period in the name begin with '~2e' in the
store for the dotencode repository format, which is encoded as '%7E2e' in
URLs when accessing the repo over static-http.

The spaces in filenames are encoded with %20 in URLs.

See also issue 2566.

diff --git a/tests/test-static-http.t b/tests/test-static-http.t
--- a/tests/test-static-http.t
+++ b/tests/test-static-http.t
@@ -27,10 +27,13 @@ one pull
   $ cd remote
   $ hg init
   $ echo foo > bar
-  $ hg add bar
+  $ echo c2 > '.dotfile with spaces'
+  $ hg add
+  adding .dotfile with spaces
+  adding bar
   $ hg commit -m"test"
   $ hg tip
-  changeset:   0:61c9426e69fe
+  changeset:   0:02770d679fb8
   tag:         tip
   user:        test
   date:        Thu Jan 01 00:00:00 1970 +0000
@@ -42,16 +45,16 @@ one pull
   adding changesets
   adding manifests
   adding file changes
-  added 1 changesets with 1 changes to 1 files
+  added 1 changesets with 2 changes to 2 files
   updating to branch default
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ cd local
   $ hg verify
   checking changesets
   checking manifests
   crosschecking files in changesets and manifests
   checking files
-  1 files, 1 changesets, 1 total revisions
+  2 files, 1 changesets, 2 total revisions
   $ cat bar
   foo
   $ cd ../remote
@@ -66,7 +69,7 @@ check for HTTP opener failures when cach
   $ echo '[hooks]' >> .hg/hgrc
   $ echo 'changegroup = python ../printenv.py changegroup' >> .hg/hgrc
   $ hg pull
-  changegroup hook: HG_NODE=822d6e31f08b9d6e3b898ce5e52efc0a4bf4905a HG_SOURCE=pull HG_URL=http://localhost:$HGPORT/remote 
+  changegroup hook: HG_NODE=4ac2e3648604439c580c69b09ec9d93a88d93432 HG_SOURCE=pull HG_URL=http://localhost:$HGPORT/remote 
   pulling from static-http://localhost:$HGPORT/remote
   searching for changes
   adding changesets
@@ -96,9 +99,9 @@ trying clone -r
   adding changesets
   adding manifests
   adding file changes
-  added 1 changesets with 1 changes to 1 files
+  added 1 changesets with 2 changes to 2 files
   updating to branch default
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
 test with "/" URI (issue 747)
 


More information about the Mercurial-devel mailing list