[PATCH 1 of 3] tests: test of case-folding merge collisions

Mads Kiilerich mads at kiilerich.com
Wed Oct 14 08:58:47 UTC 2015


# HG changeset patch
# User Mads Kiilerich <madski at unity3d.com>
# Date 1444688185 -7200
#      Tue Oct 13 00:16:25 2015 +0200
# Node ID b7a28c7c17f4e0888ed0d90f6a35284aa44444e6
# Parent  79d86ab65c9def3fdd65ec972bc5fa89688a19ff
tests: test of case-folding merge collisions

diff --git a/tests/test-casecollision-merge.t b/tests/test-casecollision-merge.t
--- a/tests/test-casecollision-merge.t
+++ b/tests/test-casecollision-merge.t
@@ -191,6 +191,46 @@ safely removed in merging between #2 and
 
   $ cd ..
 
+Prepare for tests of directory case-folding collisions
+
+  $ hg init directory-casing
+  $ cd directory-casing
+  $ touch 0 # test: file without directory
+  $ mkdir 0a
+  $ touch 0a/f
+  $ mkdir aA
+  $ touch aA/a
+  $ hg ci -Aqm0
+
+Directory/file case-folding collision:
+
+  $ hg up -q null
+  $ touch 00 # test: starts as '0'
+  $ mkdir 000 # test: starts as '0'
+  $ touch 000/f
+  $ touch Aa # test: collision with 'aA/a'
+  $ hg ci -Aqm1
+
+  $ hg merge 0
+  abort: Not a directory: '$TESTTMP/directory-casing/aA/a'
+  [255]
+(note: no collision between 0 and 00 or 000/f)
+
+Directory case-folding collision:
+
+  $ hg up -qC null
+  $ hg --config extensions.purge= purge
+  $ mkdir 0A0
+  $ touch 0A0/f # test: starts as '0a'
+  $ mkdir Aa
+  $ touch Aa/b # test: collision with 'aA/a'
+  $ hg ci -Aqm2
+
+  $ hg merge 0
+  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  (branch merge, don't forget to commit)
+
+  $ cd ..
 
 ################################
 test for linear updates


More information about the Mercurial-devel mailing list