2010-09-27 22:13:34 +04:00
|
|
|
$ "$TESTDIR/hghave" icasefs || exit 80
|
|
|
|
|
2011-11-21 02:09:32 +04:00
|
|
|
$ hg debugfs | grep 'case-sensitive:'
|
|
|
|
case-sensitive: no
|
|
|
|
|
2010-09-27 22:13:34 +04:00
|
|
|
test file addition with bad case
|
|
|
|
|
|
|
|
$ hg init repo1
|
|
|
|
$ cd repo1
|
|
|
|
$ echo a > a
|
|
|
|
$ hg add A
|
|
|
|
adding a
|
|
|
|
$ hg st
|
|
|
|
A a
|
|
|
|
$ hg ci -m adda
|
|
|
|
$ hg manifest
|
|
|
|
a
|
|
|
|
$ cd ..
|
|
|
|
|
|
|
|
test case collision on rename (issue750)
|
|
|
|
|
|
|
|
$ hg init repo2
|
|
|
|
$ cd repo2
|
|
|
|
$ echo a > a
|
|
|
|
$ hg --debug ci -Am adda
|
|
|
|
adding a
|
|
|
|
a
|
|
|
|
committed changeset 0:07f4944404050f47db2e5c5071e0e84e7a27bba9
|
|
|
|
|
2012-03-27 22:57:54 +04:00
|
|
|
Case-changing renames should work:
|
2010-09-27 22:13:34 +04:00
|
|
|
|
2012-03-27 22:57:54 +04:00
|
|
|
$ hg mv a A
|
|
|
|
$ hg mv A a
|
2010-09-27 22:13:34 +04:00
|
|
|
$ hg st
|
2012-04-28 22:29:21 +04:00
|
|
|
|
|
|
|
test changing case of path components
|
|
|
|
|
|
|
|
$ mkdir D
|
|
|
|
$ echo b > D/b
|
|
|
|
$ hg ci -Am addb D/b
|
|
|
|
$ hg mv D/b d/b
|
|
|
|
D/b: not overwriting - file exists
|
|
|
|
$ hg mv D/b d/c
|
|
|
|
$ hg st
|
|
|
|
A D/c
|
|
|
|
R D/b
|
|
|
|
$ mv D temp
|
|
|
|
$ mv temp d
|
|
|
|
$ hg st
|
|
|
|
A D/c
|
|
|
|
R D/b
|
|
|
|
$ hg revert -aq
|
|
|
|
$ rm d/c
|
|
|
|
$ echo c > D/c
|
|
|
|
$ hg add D/c
|
|
|
|
$ hg st
|
|
|
|
A D/c
|
|
|
|
$ hg ci -m addc D/c
|
|
|
|
$ hg mv d/b d/e
|
2012-05-07 02:48:51 +04:00
|
|
|
moving D/b to D/e (glob)
|
2012-04-28 22:29:21 +04:00
|
|
|
$ hg st
|
|
|
|
A D/e
|
|
|
|
R D/b
|
|
|
|
$ hg revert -aq
|
|
|
|
$ rm d/e
|
|
|
|
$ hg mv d/b D/B
|
2012-05-07 02:48:51 +04:00
|
|
|
moving D/b to D/B (glob)
|
2012-04-28 22:29:21 +04:00
|
|
|
$ hg st
|
|
|
|
A D/B
|
|
|
|
R D/b
|
2010-09-27 22:13:34 +04:00
|
|
|
$ cd ..
|
|
|
|
|
|
|
|
test case collision between revisions (issue912)
|
|
|
|
|
|
|
|
$ hg init repo3
|
|
|
|
$ cd repo3
|
|
|
|
$ echo a > a
|
|
|
|
$ hg ci -Am adda
|
|
|
|
adding a
|
|
|
|
$ hg rm a
|
|
|
|
$ hg ci -Am removea
|
|
|
|
$ echo A > A
|
|
|
|
|
|
|
|
on linux hfs keeps the old case stored, force it
|
|
|
|
|
|
|
|
$ mv a aa
|
|
|
|
$ mv aa A
|
|
|
|
$ hg ci -Am addA
|
|
|
|
adding A
|
|
|
|
|
|
|
|
used to fail under case insensitive fs
|
|
|
|
|
|
|
|
$ hg up -C 0
|
|
|
|
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
|
|
|
$ hg up -C
|
|
|
|
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
2011-11-21 02:09:32 +04:00
|
|
|
|
|
|
|
no clobbering of untracked files with wrong casing
|
|
|
|
|
|
|
|
$ hg up -r null
|
|
|
|
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
|
|
|
$ echo gold > a
|
|
|
|
$ hg up
|
2012-03-27 01:41:54 +04:00
|
|
|
A: untracked file differs
|
2012-01-12 00:53:42 +04:00
|
|
|
abort: untracked files in working directory differ from files in requested revision
|
2011-11-21 02:09:32 +04:00
|
|
|
[255]
|
|
|
|
$ cat a
|
|
|
|
gold
|
|
|
|
|
2010-09-27 22:13:34 +04:00
|
|
|
$ cd ..
|
dirstate: avoid normalizing letter case on icasefs for exact match (issue3340)
on icasefs, "hg qnew" fails to import changing letter case of filename
already occurred in working directory, for example:
$ hg rename a tmp
$ hg rename tmp A
$ hg qnew casechange
$ hg status
R a
$
"hg qnew" invokes 'dirstate.walk()' via 'localrepository.commit()'
with 'exact match' matching object having exact filenames of targets
in ones 'files()'.
current implementation of 'dirstate.walk()' always normalizes letter
case of filenames from 'match.files()' on icasefs, even though exact
matching is required.
then, files only different in letter case are treated as one file.
this patch prevents 'dirstate.walk()' from normalizing, if exact
matching is required, even on icasefs.
filenames for 'exact matching' are given not from user command line,
but from dirstate walk result, manifest of changecontext, patch files
or fixed list for specific system files (e.g.: '.hgtags').
in such case, case normalization should not be done, so this patch
works well.
2012-03-30 19:04:08 +04:00
|
|
|
|
2012-03-31 10:55:03 +04:00
|
|
|
issue 3342: file in nested directory causes unexpected abort
|
|
|
|
|
|
|
|
$ hg init issue3342
|
|
|
|
$ cd issue3342
|
|
|
|
|
|
|
|
$ mkdir -p a/B/c/D
|
|
|
|
$ echo e > a/B/c/D/e
|
|
|
|
$ hg add a/B/c/D/e
|
|
|
|
|
|
|
|
$ cd ..
|
|
|
|
|
dirstate: avoid normalizing letter case on icasefs for exact match (issue3340)
on icasefs, "hg qnew" fails to import changing letter case of filename
already occurred in working directory, for example:
$ hg rename a tmp
$ hg rename tmp A
$ hg qnew casechange
$ hg status
R a
$
"hg qnew" invokes 'dirstate.walk()' via 'localrepository.commit()'
with 'exact match' matching object having exact filenames of targets
in ones 'files()'.
current implementation of 'dirstate.walk()' always normalizes letter
case of filenames from 'match.files()' on icasefs, even though exact
matching is required.
then, files only different in letter case are treated as one file.
this patch prevents 'dirstate.walk()' from normalizing, if exact
matching is required, even on icasefs.
filenames for 'exact matching' are given not from user command line,
but from dirstate walk result, manifest of changecontext, patch files
or fixed list for specific system files (e.g.: '.hgtags').
in such case, case normalization should not be done, so this patch
works well.
2012-03-30 19:04:08 +04:00
|
|
|
issue 3340: mq does not handle case changes correctly
|
|
|
|
|
|
|
|
in addition to reported case, 'hg qrefresh' is also tested against
|
|
|
|
case changes.
|
|
|
|
|
|
|
|
$ echo "[extensions]" >> $HGRCPATH
|
|
|
|
$ echo "mq=" >> $HGRCPATH
|
|
|
|
|
|
|
|
$ hg init issue3340
|
|
|
|
$ cd issue3340
|
|
|
|
|
|
|
|
$ echo a > mIxEdCaSe
|
|
|
|
$ hg add mIxEdCaSe
|
|
|
|
$ hg commit -m '#0'
|
|
|
|
$ hg rename mIxEdCaSe tmp
|
|
|
|
$ hg rename tmp MiXeDcAsE
|
|
|
|
$ hg status -A
|
|
|
|
A MiXeDcAsE
|
|
|
|
mIxEdCaSe
|
|
|
|
R mIxEdCaSe
|
|
|
|
$ hg qnew changecase
|
|
|
|
$ hg status -A
|
|
|
|
C MiXeDcAsE
|
|
|
|
|
|
|
|
$ hg qpop -a
|
|
|
|
popping changecase
|
|
|
|
patch queue now empty
|
|
|
|
$ hg qnew refresh-casechange
|
|
|
|
$ hg status -A
|
|
|
|
C mIxEdCaSe
|
|
|
|
$ hg rename mIxEdCaSe tmp
|
|
|
|
$ hg rename tmp MiXeDcAsE
|
|
|
|
$ hg status -A
|
|
|
|
A MiXeDcAsE
|
|
|
|
mIxEdCaSe
|
|
|
|
R mIxEdCaSe
|
|
|
|
$ hg qrefresh
|
|
|
|
$ hg status -A
|
|
|
|
C MiXeDcAsE
|
|
|
|
|
|
|
|
$ cd ..
|