Show More
@@ -677,7 +677,7 b' class dirstate(object):' | |||||
677 | results[nf] = None |
|
677 | results[nf] = None | |
678 | if matchedir: |
|
678 | if matchedir: | |
679 | matchedir(nf) |
|
679 | matchedir(nf) | |
680 | foundadd(nf) |
|
680 | foundadd((nf, ff)) | |
681 | elif kind == regkind or kind == lnkkind: |
|
681 | elif kind == regkind or kind == lnkkind: | |
682 | results[nf] = st |
|
682 | results[nf] = st | |
683 | else: |
|
683 | else: | |
@@ -753,15 +753,16 b' class dirstate(object):' | |||||
753 | results, work, dirsnotfound = self._walkexplicit(match, subrepos) |
|
753 | results, work, dirsnotfound = self._walkexplicit(match, subrepos) | |
754 |
|
754 | |||
755 | skipstep3 = skipstep3 and not (work or dirsnotfound) |
|
755 | skipstep3 = skipstep3 and not (work or dirsnotfound) | |
756 | work = [d for d in work if not dirignore(d)] |
|
756 | work = [d for d in work if not dirignore(d[0])] | |
757 | wadd = work.append |
|
757 | wadd = work.append | |
758 |
|
758 | |||
759 | # step 2: visit subdirectories |
|
759 | # step 2: visit subdirectories | |
760 | while work: |
|
760 | while work: | |
761 | nd = work.pop() |
|
761 | nd, d = work.pop() | |
762 | skip = None |
|
762 | skip = None | |
763 | if nd == '.': |
|
763 | if nd == '.': | |
764 | nd = '' |
|
764 | nd = '' | |
|
765 | d = '' | |||
765 | else: |
|
766 | else: | |
766 | skip = '.hg' |
|
767 | skip = '.hg' | |
767 | try: |
|
768 | try: | |
@@ -776,22 +777,24 b' class dirstate(object):' | |||||
776 | # even though f might be a directory, we're only interested |
|
777 | # even though f might be a directory, we're only interested | |
777 | # in comparing it to files currently in the dmap -- |
|
778 | # in comparing it to files currently in the dmap -- | |
778 | # therefore normalizefile is enough |
|
779 | # therefore normalizefile is enough | |
|
780 | f = d and (d + "/" + f) or f | |||
779 | nf = normalizefile(nd and (nd + "/" + f) or f, True, True) |
|
781 | nf = normalizefile(nd and (nd + "/" + f) or f, True, True) | |
780 | else: |
|
782 | else: | |
781 | nf = nd and (nd + "/" + f) or f |
|
783 | nf = nd and (nd + "/" + f) or f | |
|
784 | f = nf | |||
782 | if nf not in results: |
|
785 | if nf not in results: | |
783 | if kind == dirkind: |
|
786 | if kind == dirkind: | |
784 | if not ignore(nf): |
|
787 | if not ignore(nf): | |
785 | if matchtdir: |
|
788 | if matchtdir: | |
786 | matchtdir(nf) |
|
789 | matchtdir(nf) | |
787 | wadd(nf) |
|
790 | wadd((nf, f)) | |
788 | if nf in dmap and (matchalways or matchfn(nf)): |
|
791 | if nf in dmap and (matchalways or matchfn(nf)): | |
789 | results[nf] = None |
|
792 | results[nf] = None | |
790 | elif kind == regkind or kind == lnkkind: |
|
793 | elif kind == regkind or kind == lnkkind: | |
791 | if nf in dmap: |
|
794 | if nf in dmap: | |
792 | if matchalways or matchfn(nf): |
|
795 | if matchalways or matchfn(nf): | |
793 | results[nf] = st |
|
796 | results[nf] = st | |
794 |
elif (matchalways or matchfn( |
|
797 | elif (matchalways or matchfn(f)) and not ignore(nf): | |
795 | results[nf] = st |
|
798 | results[nf] = st | |
796 | elif nf in dmap and (matchalways or matchfn(nf)): |
|
799 | elif nf in dmap and (matchalways or matchfn(nf)): | |
797 | results[nf] = None |
|
800 | results[nf] = None |
@@ -1391,13 +1391,13 b' User interface controls.' | |||||
1391 | format. |
|
1391 | format. | |
1392 | Defaults to showing the hash, tags, branches, bookmarks, author, and |
|
1392 | Defaults to showing the hash, tags, branches, bookmarks, author, and | |
1393 | the first line of the commit description. |
|
1393 | the first line of the commit description. | |
1394 | You have to pay attention to encodings of managed files, if you |
|
1394 | If you use non-ASCII characters in names for tags, branches, bookmarks, | |
1395 | use non-ASCII characters in tags, branches, bookmarks, author |
|
1395 | authors, and/or commit descriptions, you must pay attention to encodings of | |
1396 |
|
|
1396 | managed files. At template expansion, non-ASCII characters use the encoding | |
1397 | characters use the encoding specified by ``--encoding`` global |
|
1397 | specified by the ``--encoding`` global option, ``HGENCODING`` or other | |
1398 | option, ``HGENCODING`` or other locale setting environment |
|
1398 | environment variables that govern your locale. If the encoding of the merge | |
1399 |
|
|
1399 | markers is different from the encoding of the merged files, | |
1400 | conflict markers causes serious problem. |
|
1400 | serious problems may occur. | |
1401 |
|
1401 | |||
1402 | ``portablefilenames`` |
|
1402 | ``portablefilenames`` | |
1403 | Check for portable filenames. Can be ``warn``, ``ignore`` or ``abort``. |
|
1403 | Check for portable filenames. Can be ``warn``, ``ignore`` or ``abort``. |
@@ -169,4 +169,16 b' forgotten before file with same name is ' | |||||
169 | $ cat d |
|
169 | $ cat d | |
170 | file d |
|
170 | file d | |
171 |
|
171 | |||
|
172 | Test that adding a directory doesn't require case matching (issue4578) | |||
|
173 | #if icasefs | |||
|
174 | $ mkdir -p CapsDir1/CapsDir | |||
|
175 | $ echo abc > CapsDir1/CapsDir/AbC.txt | |||
|
176 | $ mkdir CapsDir1/CapsDir/SubDir | |||
|
177 | $ echo def > CapsDir1/CapsDir/SubDir/Def.txt | |||
|
178 | ||||
|
179 | $ hg add -v capsdir1/capsdir | |||
|
180 | adding CapsDir1/CapsDir/AbC.txt (glob) | |||
|
181 | adding CapsDir1/CapsDir/SubDir/Def.txt (glob) | |||
|
182 | #endif | |||
|
183 | ||||
172 | $ cd .. |
|
184 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now