annotate ja/filenames.tex @ 380:38f034c1da53

finished daily.tex
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Thu, 19 Feb 2009 14:37:50 +0900
parents 1b372620963a
children 5276f40fca1c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
1 %\chapter{File names and pattern matching}
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
2 \chapter{$B%U%!%$%kL>$H%Q%?!<%s%^%C%A%s%0(B}
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
3 \label{chap:names}
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
4
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
5 %Mercurial provides mechanisms that let you work with file names in a
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
6 %consistent and expressive way.
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
7
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
8 Mercurial$B$O%U%!%$%kL>$K$D$$$F0l4S@-$N$"$jJ,$+$j$d$9$$%a%+%K%:%`$rDs6!$9(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
9 $B$k!%(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
10
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
11 %\section{Simple file naming}
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
12 \section{$B%7%s%W%k$J%U%!%$%kL?L>(B}
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
13
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
14 %Mercurial uses a unified piece of machinery ``under the hood'' to
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
15 %handle file names. Every command behaves uniformly with respect to
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
16 %file names. The way in which commands work with file names is as
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
17 %follows.
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
18
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
19 Mercurial$B$O%U%!%$%kL>$r<h$j07$&FbIt$N%a%+%K%:%`$r;}$C$F$$$k!%$"$i$f$k%3%^(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
20 $B%s%I$O%U%!%$%kL>$KBP$7$FF10l$K$U$k$^$&!%%3%^%s%I$,%U%!%$%kL>$r07$&$d$jJ}(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
21 $B$r0J2<$K<($9!%(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
22
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
23 %If you explicitly name real files on the command line, Mercurial works
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
24 %with exactly those files, as you would expect.
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
25 $B%3%^%s%I%i%$%s$K<B:]$N%U%!%$%kL>$rL@<(E*$KM?$($?;~$O!$(BMercurial$B$O$=$l$i(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
26 $B$N%U%!%$%k$=$N$b$N$r07$&!%(B
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
27 \interaction{filenames.files}
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
28
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
29 %When you provide a directory name, Mercurial will interpret this as
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
30 %``operate on every file in this directory and its subdirectories''.
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
31 %Mercurial traverses the files and subdirectories in a directory in
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
32 %alphabetical order. When it encounters a subdirectory, it will
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
33 %traverse that subdirectory before continuing with the current
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
34 %directory.
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
35
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
36 $B%G%#%l%/%H%jL>$rM?$($?>l9g$O!$(BMercurial$B$O(B``$B$3$N%G%#%l%/%H%j$H%5%V%G%#%l%/(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
37 $B%H%jFb$N$9$Y$F$N%U%!%$%k$KBP$7$F=hM}$r9T$&(B''$B$H2r<a$9$k!%(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
38 Mercurial$B$O%G%#%l%/%H%jFb$N%U%!%$%k$H%5%V%G%#%l%/%H%j$r%"%k%U%!%Y%C%H=g(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
39 $B$KEO$jJb$/!%%5%V%G%#%l%/%H%j$r8+$D$1$k$H!$%+%l%s%H%G%#%l%/%H%j$N=hM}$rB3(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
40 $B$1$k$N$G$O$J$/!$%5%V%G%#%l%/%H%jFb$r8+$K9T$/!%(B
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
41 \interaction{filenames.dirs}
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
42
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
43 %\section{Running commands without any file names}
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
44 \section{$B%U%!%$%kL>$J$7$G%3%^%s%I$r<B9T$9$k(B}
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
45
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
46 %Mercurial's commands that work with file names have useful default
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
47 %behaviours when you invoke them without providing any file names or
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
48 %patterns. What kind of behaviour you should expect depends on what
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
49 %the command does. Here are a few rules of thumb you can use to
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
50 %predict what a command is likely to do if you don't give it any names
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
51 %to work with.
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
52
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
53 $B%U%!%$%kL>$r<h$k(BMercurial$B%3%^%s%I$O%U%!%$%kL>$d%Q%?!<%s$rM?$($J$$$G5/F0$7(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
54 $B$?>l9g$G$bM-MQ$J%G%U%)%k%H$N?6Iq$r;}$D!%4|BT$9$k5sF0$O!$2?$r$9$k%3%^%s%I(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
55 $B$+$K$h$k!%%3%^%s%I$K%U%!%$%kL>Ey$rM?$($J$+$C$?>l9g$K%3%^%s%I$,$I$N$h$&$K(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
56 $BF0$/$+?dB,$9$kBg$^$+$J%k!<%k$r$$$/$D$+5s$2$k!%(B
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
57
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
58 \begin{itemize}
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
59 %\item Most commands will operate on the entire working directory.
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
60 % This is what the \hgcmd{add} command does, for example.
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
61 \item $BBgH>$N%3%^%s%I$O%o!<%-%s%0%G%#%l%/%H%jA4BN$KBP$7$FF/$/!%Nc$($P(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
62 \hgcmd{add}$B%3%^%s%I$N$U$k$^$$$,$3$l$K$"$?$k!%(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
63
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
64 %\item If the command has effects that are difficult or impossible to
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
65 % reverse, it will force you to explicitly provide at least one name
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
66 % or pattern (see below). This protects you from accidentally
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
67 % deleting files by running \hgcmd{remove} with no arguments, for
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
68 % example.
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
69 \item $BI|85$,Fq$7$+$C$?$jIT2DG=$G$"$k$h$&$J8z2L$r;}$D%3%^%s%I$N>l9g!$:GDc(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
70 1$B$D$NL>A0$d%Q%?!<%s$rM[$KMW5a$9$k!%!J2<5-$r;2>H!%!K$3$l$K$h$j!$Nc(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
71 $B$($P(B\hgcmd{remove}$B$K0z?t$rM?$($J$+$C$?$3$H$K$h$C$F8m$C$F%U%!%$%k$r(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
72 $B$9$Y$F>C$7$?$j$9$k$3$H$,$J$/$J$k!%(B
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
73 \end{itemize}
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
74
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
75 %It's easy to work around these default behaviours if they don't suit
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
76 %you. If a command normally operates on the whole working directory,
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
77 %you can invoke it on just the current directory and its subdirectories
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
78 %by giving it the name ``\dirname{.}''.
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
79 %\interaction{filenames.wdir-subdir}
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
80
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
81 $B%G%U%)%k%H$N5sF0$,5$$KF~$i$J$$>l9g!$$3$l$rJQ99$9$k$N$O$?$d$9$$!%(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
82 $B%3%^%s%I$,DL>o%o!<%-%s%0%G%#%l%/%H%jA4BN$KBP$7$FF0:n$9$k$H$7$h$&!%(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
83 $B$3$l$r%+%l%s%H%G%#%l%/%H%j$H$=$N%5%V%G%#%l%/%H%j$KBP$7$F$N$_F0:n$9$k$h$&(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
84 $B$KJQ$($k$K$O!$(B``\dirname{.}''$B$rEO$;$PNI$$!%(B
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
85 \interaction{filenames.wdir-subdir}
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
86
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
87 %Along the same lines, some commands normally print file names relative
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
88 %to the root of the repository, even if you're invoking them from a
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
89 %subdirectory. Such a command will print file names relative to your
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
90
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
91 %subdirectory if you give it explicit names. Here, we're going to run
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
92
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
93 %\hgcmd{status} from a subdirectory, and get it to operate on the
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
94 %entire working directory while printing file names relative to our
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
95
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
96 %subdirectory, by passing it the output of the \hgcmd{root} command.
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
97 %\interaction{filenames.wdir-relname}
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
98
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
99 $B%5%V%G%#%l%/%H%j$+$i5/F0$7$F$b%j%]%8%H%j$N%k!<%H$X$NAjBP%Q%9$G%U%!%$%kL>(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
100 $B$rI=<($9$k%3%^%s%I$b$"$k!%$=$N$h$&$J%3%^%s%I$G$O!$%5%V%G%#%l%/%H%j$NL>A0(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
101 $B$rL@<(E*$KM?$($k$H!$%5%V%G%#%l%/%H%j$+$i$NAjBP%Q%9$rI=<($9$k$h$&$K$J$k!%(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
102
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
103 $B$3$3$G$O%5%V%G%#%l%/%H%j$+$i(B\hgcmd{status}$B$r<B9T$9$k:]$K!$(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
104
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
105
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
106 $B$7$F!$(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
107 $B%3%^%s%I$,%o!<%-%s%0%G%#%l%/%H%jA4BN$N%U%!%$%kL>$r%5%V%G%#%l%/%H%j$KBP$7$FAjBPE*$K(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
108 $BI=<($9$kMM$r8+$F$_$h$&!%(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
109
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
110
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
111
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
112
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
113 %\section{Telling you what's going on}
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
114 \section{$B2?$,5/$-$F$$$k$N$+(B}
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
115
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
116 %The \hgcmd{add} example in the preceding section illustrates something
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
117 %else that's helpful about Mercurial commands. If a command operates
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
118 %on a file that you didn't name explicitly on the command line, it will
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
119 %usually print the name of the file, so that you will not be surprised
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
120 %what's going on.
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
121
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
122 $BA0%;%/%7%g%s$N(B\hgcmd{add}$B$NNc$O(BMercurial$B%3%^%s%I$K$D$$$FJL$NM-MQ$J>pJs$r(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
123 $B<($7$F$$$k!%%3%^%s%I%i%$%s$GL@<(E*$KL>A0$r;XDj$7$J$+$C$?%U%!%$%k$KBP$7$F(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
124 $B%3%^%s%I=hM}$r9T$&>l9g!$%U%!%$%kL>$rI=<($7!$2?$,5/$3$C$F$$$k$N$+J,$+$i$J(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
125 $B$/$J$i$J$$$h$&$K$7$F$$$k!%(B
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
126
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
127 %The principle here is of \emph{least surprise}. If you've exactly
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
128 %named a file on the command line, there's no point in repeating it
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
129 %back at you. If Mercurial is acting on a file \emph{implicitly},
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
130 %because you provided no names, or a directory, or a pattern (see
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
131 %below), it's safest to tell you what it's doing.
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
132
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
133 \emph{$B$G$-$k$@$1$S$C$/$j$5$;$J$$(B}$B$H$$$&$N$,$3$3$G$N86B'$G$"$k!%%3%^%s%I%i(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
134 $B%$%s$G%U%!%$%kL>$r40A4$K;XDj$7$?>l9g!$%U%!%$%kL>$,I=<($5$l$k$3$H$O$J$$!%(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
135 Mercurial$B$O!$L>A0$rM?$($J$$$+!$%G%#%l%/%H%jL>!$0J2<$G2r@b$9$k%Q%?!<%s$rM?(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
136 $B$($?$?$a$K(B\emph{$B0EL[E*$K(B}$B;XDj$5$l$?%U%!%$%k$KBP$7$F%"%/%7%g%s$9$k>l9g$O!$(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
137 $B:G$b0BA4$J$d$jJ}$H$7$F!$8=:_$7$F$$$k$3$H$rI=<($9$k!%(B
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
138
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
139 %For commands that behave this way, you can silence them using the
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
140 %\hggopt{-q} option. You can also get them to print the name of every
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
141 %file, even those you've named explicitly, using the \hggopt{-v}
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
142 %option.
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
143
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
144 $B$3$N$h$&$K?6Iq$&%3%^%s%I$r!$(B\hggopt{-q}$B%*%W%7%g%s$rM?$($k$3$H$GD@L[$5$;$k(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
145 $B$3$H$b$G$-$k!%5U$KL@<(E*$K;XDj$7$?%U%!%$%k$X$NF0:n$G$"$C$F$b(B\hggopt{-v}$B%*(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
146 $B%W%7%g%s$rM?$($k$3$H$G$9$Y$F$N%U%!%$%kL>$rI=<($5$;$k$3$H$b$G$-$k!%(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
147
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
148 %\section{Using patterns to identify files}
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
149 \section{$B%U%!%$%kL><1JL$K%Q%?!<%s$rMQ$$$k(B}
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
150
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
151 %In addition to working with file and directory names, Mercurial lets
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
152 %you use \emph{patterns} to identify files. Mercurial's pattern
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
153 %handling is expressive.
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
154
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
155 $B%U%!%$%k$d%G%#%l%/%H%jL>$r;H$C$?F0:n$NB>$K!$(BMercurial$B$G$O(B\emph{patterns}
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
156 $B$r;H$C$F%U%!%$%k$r<1JL$9$k$3$H$b$G$-$k!%(BMercurial$B$N%Q%?!<%s=hM}$O6/NO$G(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
157 $B$"$k!%(B
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
158
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
159 %On Unix-like systems (Linux, MacOS, etc.), the job of matching file
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
160 %names to patterns normally falls to the shell. On these systems, you
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
161 %must explicitly tell Mercurial that a name is a pattern. On Windows,
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
162 %the shell does not expand patterns, so Mercurial will automatically
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
163 %identify names that are patterns, and expand them for you.
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
164
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
165 Unix$B7O$N%7%9%F%`(B(Linux, MacOS$BEy(B)$B$G$O%U%!%$%kL>$H%Q%?!<%s$r%^%C%A$5$;$k;E(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
166 $B;v$O%7%'%k$KG$$5$l$k!%$3$l$i$N%7%9%F%`$G$O!$L>A0$,%Q%?!<%s$G$"$k$3$H$rL@(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
167 $B<(E*$K(BMercurial$B$K<($5$J$1$l$P$J$i$J$$!%(B Windows$B$G$O%7%'%k$O%Q%?!<%s$rE83+(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
168 $B$7$J$$$N$G!$(BMercurial$B$OM?$($i$l$?L>A0$,<+F0E*$K%Q%?!<%s$G$"$k$3$H$rG'<1(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
169 $B$7!$E83+$9$k!%(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
170
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
171 %To provide a pattern in place of a regular name on the command line,
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
172 %the mechanism is simple:
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
173
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
174 $B%3%^%s%I%i%$%s$GDL>o$NL>A0$NBe$o$j$K%Q%?!<%s$rEO$9$?$a$N%a%+%K%:%`$O%7%s(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
175 $B%W%k$G$"$k!%(B:
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
176 \begin{codesample2}
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
177 syntax:patternbody
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
178 \end{codesample2}
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
179 %That is, a pattern is identified by a short text string that says what
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
180 %kind of pattern this is, followed by a colon, followed by the actual
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
181 %pattern.
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
182
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
183 $B$I$N$h$&$J%Q%?!<%s$J$N$+$r<1JL$9$k$?$a$NC;$$%F%-%9%H$N8e$m$K%3%m%s$r64$s(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
184 $B$G<B:]$N%Q%?!<%s$,B3$/!%(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
185
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
186 %Mercurial supports two kinds of pattern syntax. The most frequently
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
187 %used is called \texttt{glob}; this is the same kind of pattern
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
188 %matching used by the Unix shell, and should be familiar to Windows
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
189 %command prompt users, too.
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
190
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
191 Mercurial$B$O(B2$BDL$j$N%Q%?!<%s9=J8$r%5%]!<%H$9$k!%:G$b$h$/;H$o$l$k$N$O(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
192 \texttt{glob};$B$G!$(BUnix$B%7%'%k$,%Q%?!<%s%^%C%A%s%0$K;HMQ$7$F$$$k$b$N$HF1MM(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
193 $B$N%Q%?!<%s$G$"$j!$$3$l$O(BWindows$B$N%3%^%s%I%W%m%s%W%H%f!<%6$K$H$C$F$b?F$7(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
194 $B$_?<$$$b$N$G$"$k!%(B
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
195
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
196 %When Mercurial does automatic pattern matching on Windows, it uses
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
197 %\texttt{glob} syntax. You can thus omit the ``\texttt{glob:}'' prefix
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
198 %on Windows, but it's safe to use it, too.
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
199
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
200 Mercurial$B$O(BWindows$B$G$O<+F0E*$K%Q%?!<%s%^%C%A%s%0$r9T$&$H$-(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
201 $B$O!$(B\texttt{glob}$B9=J8$rMQ$$$k!%=>$C$F(BWindows$B$G$O(B``\texttt{glob:}''$B%W%l%U%#(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
202 $B%/%9$r>JN,$7$F$b0BA4$G$"$k!%(B
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
203
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
204 %The \texttt{re} syntax is more powerful; it lets you specify patterns
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
205 %using regular expressions, also known as regexps.
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
206
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
207 \texttt{re}$B9=J8$O$h$j6/NO$G!$@55,I=8=$rMQ$$$k$3$H$,$G$-$k!%(B
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
208
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
209 %By the way, in the examples that follow, notice that I'm careful to
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
210 %wrap all of my patterns in quote characters, so that they won't get
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
211 %expanded by the shell before Mercurial sees them.
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
212
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
213 $B8e$G<($9Nc$G$O!$(BMercurial$B$,8+$kA0$K%7%'%k$GE83+$5$l$k$N$rKI$0$?$a$K%Q%?!<(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
214 $B%s$r0zMQJ8;z$G$/$k$s$G$$$k$3$H$KCm0U$5$l$?$$!%(B
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
215
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
216 %\subsection{Shell-style \texttt{glob} patterns}
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
217 \subsection{$B%7%'%k7A<0$N(B\texttt{glob}$B%Q%?!<%s(B}
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
218
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
219 %This is an overview of the kinds of patterns you can use when you're
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
220 %matching on glob patterns.
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
221
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
222 glob$B%Q%?!<%s$G%^%C%A%s%0$r9T$&;~$K;H$($k%Q%?!<%s$N35N,$r<($9!%(B
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
223
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
224 %The ``\texttt{*}'' character matches any string, within a single
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
225 %directory.
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
226
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
227 ``\texttt{*}''$BJ8;z$O%G%#%l%/%H%jFb$NG$0U$NJ8;zNs$H%^%C%A$9$k!%(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
228
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
229 \interaction{filenames.glob.star}
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
230
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
231 %The ``\texttt{**}'' pattern matches any string, and crosses directory
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
232 %boundaries. It's not a standard Unix glob token, but it's accepted by
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
233 %several popular Unix shells, and is very useful.
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
234 %\interaction{filenames.glob.starstar}
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
235
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
236 ``\texttt{**}''$B%Q%?!<%s$O%G%#%l%/%H%j$r1[$($FG$0U$NJ8;zNs$K%^%C%A$9$k!%$3(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
237 $B$l$O(BUnix$BI8=`$N(Bglob$B%H!<%/%s$G$O$J$$$,!$$$$/$D$+$N?M5$$N$"$k(BUnix$B%7%'%k$G;H(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
238 $B$&$3$H$,$G$-!$$H$F$bM-MQ$G$"$k!%(B
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
239 \interaction{filenames.glob.starstar}
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
240
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
241 %The ``\texttt{?}'' pattern matches any single character.
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
242 %\interaction{filenames.glob.question}
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
243
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
244 ``\texttt{?}''$B%Q%?!<%s$OG$0U$N(B1$BJ8;z$K%^%C%A$9$k!%(B
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
245 \interaction{filenames.glob.question}
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
246
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
247 %The ``\texttt{[}'' character begins a \emph{character class}. This
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
248 %matches any single character within the class. The class ends with a
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
249 %``\texttt{]}'' character. A class may contain multiple \emph{range}s
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
250 %of the form ``\texttt{a-f}'', which is shorthand for
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
251 %``\texttt{abcdef}''.
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
252
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
253 ``\texttt{[}''$BJ8;z$O(B\emph{$BJ8;z%/%i%9(B}$B$r3+;O$9$k!%$3$l$O%/%i%9Fb$NG$0U$N(B1
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
254 $BJ8;z$K%^%C%A$9$k!%%/%i%9$O(B``\texttt{]}''$BJ8;z$G=*$k!%%/%i%9$O(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
255 ``\texttt{a-f}''$B$N$h$&$JHO0O$rJ#?t;}$D$3$H$,$G$-$k!%$3$NHO0O$O(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
256 ``\texttt{abcdef}''$B$NC;=L7A$KAjEv$9$k!%(B
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
257 \interaction{filenames.glob.range}
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
258
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
259 %If the first character after the ``\texttt{[}'' in a character class
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
260 %is a ``\texttt{!}'', it \emph{negates} the class, making it match any
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
261 %single character not in the class.
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
262
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
263 $BJ8;z%/%i%9$G(B``\texttt{[}''$B$N8e$K(B``\texttt{!}''$B$,Mh$?>l9g!$$3$l$O%/%i%9$N(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
264 $BH]Dj$H$J$j!$%/%i%9$K4^$^$l$J$$G$0U$N(B1$BJ8;z$H%^%C%A$9$k!%(B
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
265
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
266 %A ``\texttt{\{}'' begins a group of subpatterns, where the whole group
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
267 %matches if any subpattern in the group matches. The ``\texttt{,}''
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
268 %character separates subpatterns, and ``\texttt{\}}'' ends the group.
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
269
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
270 ``\texttt{\{}''$B$O%5%V%Q%?!<%s$N%0%k!<%W$r3+;O$9$k!%%0%k!<%W$G$O!$%0%k!<%W(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
271 $BFb$NG$0U$N%5%V%Q%?!<%s$,%^%C%A$9$l$P%0%k!<%WA4BN$,%^%C%A$7$?$3$H$K$J$k!%(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
272 ``\texttt{,}''$BJ8;z$O%5%V%Q%?!<%s$rJ,N%$7!$(B``\texttt{\}}''$B$O%0%k!<%W$r=*N;(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
273 $B$9$k!%(B
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
274 \interaction{filenames.glob.group}
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
275
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
276 %\subsubsection{Watch out!}
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
277 \subsubsection{$B$3$3$KCm0U!*(B}
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
278
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
279 %Don't forget that if you want to match a pattern in any directory, you
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
280 %should not be using the ``\texttt{*}'' match-any token, as this will
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
281 %only match within one directory. Instead, use the ``\texttt{**}''
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
282 %token. This small example illustrates the difference between the two.
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
283
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
284 $BG$0U$N%G%#%l%/%H%j$G%Q%?!<%s$r%^%C%A$5$;$k>l9g!$(B``\texttt{*}''$B$rA4$F$H%^%C(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
285 $B%A$9$k%H!<%/%s$H$7$F;H$&$3$H$O$G$-$J$$!%$3$NJ8;z$O(B1$B$D$N%G%#%l%/%H%jFb$G$N(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
286 $B$_%^%C%A$9$k!%$=$NBe$o$j!$(B``\texttt{**}''$B%H!<%/%s$r;H$&!%$3$l$i$N0c$$$r@b(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
287 $BL@$9$k$?$a$KNc$r<($9!%(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
288
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
289 \interaction{filenames.glob.star-starstar}
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
290
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
291 %\subsection{Regular expression matching with \texttt{re} patterns}
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
292 \subsection{\texttt{re}$B%Q%?!<%s$r;H$C$?@55,I=8=%^%C%A(B}
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
293
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
294 %Mercurial accepts the same regular expression syntax as the Python
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
295 %programming language (it uses Python's regexp engine internally).
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
296 %This is based on the Perl language's regexp syntax, which is the most
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
297 %popular dialect in use (it's also used in Java, for example).
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
298
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
299 Mercurial$B$O(BPython$B8@8l$HF1$8@55,I=8=9=J8$r<u$1IU$1$k!%!J(BMercurial$B$OFbIt$G(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
300 Python$B$N@55,I=8=%(%s%8%s$r;H$C$F$$$k!%!K$3$l$O(BPerl$B$N(Bregexp$B9=J8$r85$K$7$F(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
301 $B$$$k!%$3$N9=J8$O:G$b$h$/MQ$$$i$l$F$$$k$b$N$G$"$j!$$?$H$($P(BJava$B$G$bMxMQ$5(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
302 $B$l$F$$$k!%(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
303
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
304 %I won't discuss Mercurial's regexp dialect in any detail here, as
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
305 %regexps are not often used. Perl-style regexps are in any case
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
306 %already exhaustively documented on a multitude of web sites, and in
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
307 %many books. Instead, I will focus here on a few things you should
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
308 %know if you find yourself needing to use regexps with Mercurial.
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
309
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
310 regexp$B$,$=$l$[$I;H$o$l$F$$$J$$$+$N$h$&$K$3$3$G(BMercurial$B$N(Bregexp$B9=J8$K$D$$(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
311 $B$F5DO@$9$k$3$H$OHr$1$k!%(B Perl$B%9%?%$%k(Bregexp$B$O$9$G$KB?$/$N%&%'%V%5%$%H$d=q(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
312 $B@R$G$G>\:Y$KEO$C$F@bL@$5$l$F$$$k!%$=$NBe$o$j!$$3$3$G$O(BMercurial$B$G(Bregexp$B$r(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
313 $B;H$&:]$KCN$C$F$*$/$Y$-$$$/$D$+$NE@$K>GE@$rEv$F$k$3$H$K$9$k!%(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
314
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
315 %A regexp is matched against an entire file name, relative to the root
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
316 %of the repository. In other words, even if you're already in
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
317 %subbdirectory \dirname{foo}, if you want to match files under this
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
318 %directory, your pattern must start with ``\texttt{foo/}''.
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
319
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
320 regexp$B$O%U%!%$%kL>A4BN$H%^%C%A$9$k$,!$%U%!%$%kL>$O%j%]%8%H%j$N%k!<%H$+$i(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
321 $B$NAjBP%Q%9$GI=$5$l$k!%8@$$BX$($l$P!$$9$G$K%5%V%G%#%l%/%H%j(B\dirname{foo}$B$K(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
322 $B$$$k$H$7$F!$$3$N%G%#%l%/%H%jFb$N%U%!%$%k$K%^%C%A$5$;$?$1$l(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
323 $B$P!$(B``\texttt{foo/}''$B$G;O$^$k%Q%?!<%s$rEO$9I,MW$,$"$k!%(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
324
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
325 %One thing to note, if you're familiar with Perl-style regexps, is that
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
326 %Mercurial's are \emph{rooted}. That is, a regexp starts matching
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
327 %against the beginning of a string; it doesn't look for a match
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
328 %anywhere within the string. To match anywhere in a string, start
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
329 %your pattern with ``\texttt{.*}''.
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
330
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
331 Perl$B7A<0$N(Bregexp$B$K47$l$F$$$k$N$J$i!$(BMercurial$B$N(Bregexp$B$O(B\emph{root}$B$r;}$D(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
332 $B$H$$$&E@$KCm0U$7$F$*$/$H$h$$!%$9$J$o$A!$(Bregexp$B$OJ8;zNs$N;O$^$j$+$i%^%C%A(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
333 $B$7!$J8;zNs$NESCf$+$i$O%^%C%A$7$J$$!%J8;zNs$NESCf$+$i%^%C%A$5$;$?$$>l9g(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
334 $B$O!$%Q%?!<%s$r(B``\texttt{.*}''$B$G;O$a$kI,MW$,$"$k!%(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
335
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
336 %\section{Filtering files}
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
337 \section{$B%U%!%$%k$r%U%#%k%?$9$k(B}
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
338
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
339 %Not only does Mercurial give you a variety of ways to specify files;
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
340 %it lets you further winnow those files using \emph{filters}. Commands
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
341 %that work with file names accept two filtering options.
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
342
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
343 Mercurial$B$O%U%!%$%k$r;XDj$9$kMM!9$JJ}K!$rDs6!$9$k$@$1$G$J$/!$$5$i$K(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
344 \emph{$B%U%#%k%?(B}$B$K$h$C$F%U%!%$%k$rA*JL$9$kJ}K!$rDs6!$9$k!%%U%!%$%kL>$r<h$C(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
345 $B$FF0:n$9$k%3%^%s%I$O(B2$B$D$N%U%#%k%?%*%W%7%g%s$r<u$1IU$1$k!%(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
346
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
347 \begin{itemize}
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
348 %\item \hggopt{-I}, or \hggopt{--include}, lets you specify a pattern
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
349 % that file names must match in order to be processed.
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
350 \item \hggopt{-I}$B$^$?$O(B\hggopt{--include}$B%*%W%7%g%s$G;XDj$7$?%Q%?!<%s$K(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
351 $B%^%C%A$7$?%U%!%$%k$,=hM}$5$l$k!%(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
352 %\item \hggopt{-X}, or \hggopt{--exclude}, gives you a way to
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
353 % \emph{avoid} processing files, if they match this pattern.
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
354 \item \hggopt{-X}$B$^$?$O(B\hggopt{--exclude}$B%*%W%7%g%s$G;XDj$7$?%Q%?!<%s$K(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
355 $B%^%C%A$7$?%U%!%$%k$O=hM}$+$i=|30$5$l$k!%(B
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
356 \end{itemize}
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
357
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
358 %You can provide multiple \hggopt{-I} and \hggopt{-X} options on the
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
359 %command line, and intermix them as you please. Mercurial interprets
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
360 %the patterns you provide using glob syntax by default (but you can use
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
361 %regexps if you need to).
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
362
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
363 $B%3%^%s%I%i%$%s$GJ#?t$N(B\hggopt{-I}$B$*$h$S(B\hggopt{-X}$B%*%W%7%g%s$r;XDj$7!$=j(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
364 $BK>$NAH9g$;$K$9$k$3$H$,$G$-$k!%(B Mercurial$B$O%G%U%)%k%H$G$O(Bglob$B9=J8$GM?$($?(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
365 $B%Q%?!<%s$r2r<a$9$k$,!$@55,I=8=$r;H$&$3$H$b2DG=$G$"$k!%(B
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
366
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
367 %You can read a \hggopt{-I} filter as ``process only the files that
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
368 %match this filter''.
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
369
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
370 \hggopt{-I}$B%U%#%k%?$O(B``$B$3$N%U%#%k%?$K%^%C%A$9$k%U%!%$%k$@$1$r=hM}$9$k(B''
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
371 $B$HFI$_BX$($k$3$H$,$G$-$k!%(B
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
372 \interaction{filenames.filter.include}
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
373
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
374 %The \hggopt{-X} filter is best read as ``process only the files that
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
375 %don't match this pattern''.
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
376
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
377 \hggopt{-X}$B%U%#%k%?$O(B``$B$3$N%Q%?!<%s$K%^%C%A$7$J$$%U%!%$%k$@$1$r=hM}$9$k(B''$B$H(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
378 $BFI$_BX$($k$N$,:G$bAj1~$7$$!%(B
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
379 \interaction{filenames.filter.exclude}
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
380
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
381 %\section{Ignoring unwanted files and directories}
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
382 \section{$BITMW$J%U%!%$%k$d%G%#%l%/%H%j$rL5;k$9$k(B}
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
383
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
384 XXX.
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
385
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
386 %\section{Case sensitivity}
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
387 \section{$BBgJ8;z>.J8;z$N1F6A(B}
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
388 \label{sec:names:case}
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
389
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
390 %If you're working in a mixed development environment that contains
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
391 %both Linux (or other Unix) systems and Macs or Windows systems, you
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
392 %should keep in the back of your mind the knowledge that they treat the
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
393 %case (``N'' versus ``n'') of file names in incompatible ways. This is
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
394 %not very likely to affect you, and it's easy to deal with if it does,
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
395 %but it could surprise you if you don't know about it.
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
396
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
397 Linux$B$r$O$8$a$H$9$k(BUnix$B$d(BMac$B!$(BWindows$B$,:.:_$9$k3+H/4D6-$G:n6H$r$7$F$$$k$N(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
398 $B$J$i!$3F!9$N%7%9%F%`$O%U%!%$%kL>$N(B(``N''$B$H(B``n'')$B$N$h$&$JBg>.J8;z$r0[$J$C(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
399 $B$?$d$jJ}$G<h$j07$&$3$H$KN10U$9$Y$-$G$"$k!%$3$l$,LdBj$K$J$k$3$H$OLGB?$K$J(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
400 $B$/!$LdBj$K$J$k>l9g$G$b4JC1$K2r7h$G$-$k$,!$%7%9%F%`4V$G$N<h$j07$$$N0c$$$r(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
401 $BCN$i$J$1$l$P6C$/$3$H$K$J$k$@$m$&!%(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
402
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
403 %Operating systems and filesystems differ in the way they handle the
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
404 %\emph{case} of characters in file and directory names. There are
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
405 %three common ways to handle case in names.
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
406 $B%*%Z%l!<%F%#%s%0%7%9%F%`$H%U%!%$%k%7%9%F%`$O!$%U%!%$%kL>$H%G%#%l%/%H%jL>(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
407 $B$N(B\emph{$BBg>.J8;z(B}$B$N07$$$G0[$J$C$F$$$k!%Bg>.J8;z$r07$&J}K!$O(B3$BDL$j$"$k!%(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
408
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
409 \begin{itemize}
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
410 %\item Completely case insensitive. Uppercase and lowercase versions
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
411 % of a letter are treated as identical, both when creating a file and
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
412 % during subsequent accesses. This is common on older DOS-based
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
413 % systems.
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
414 \item $B40A4$KBg>.J8;z$r6hJL$7$J$$!%BgJ8;z$H>.J8;z$O!$%U%!%$%k$N:n@.$H$=(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
415 $B$N8e$N%"%/%;%9$GF10l$K07$o$l$k!%$3$l$O8E$$(BDOS$B%Y!<%9$N%7%9%F%`$GMQ(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
416 $B$$$i$l$F$$$?!%(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
417
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
418 %\item Case preserving, but insensitive. When a file or directory is
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
419 % created, the case of its name is stored, and can be retrieved and
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
420 % displayed by the operating system. When an existing file is being
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
421 % looked up, its case is ignored. This is the standard arrangement on
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
422 % Windows and MacOS. The names \filename{foo} and \filename{FoO}
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
423 % identify the same file. This treatment of uppercase and lowercase
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
424 % letters as interchangeable is also referred to as \emph{case
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
425 % folding}.
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
426 \item $BBg>.J8;z$N0c$$$OJ]B8$5$l$k$,6hJL$5$l$J$$!%%U%!%$%k$d%G%#%l%/%H%j$,(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
427 $B:n$i$l$k$H!$%*%Z%l!<%F%#%s%0%7%9%F%`$OL>A0$NBg>.J8;z$rJ]B8$7!$I=<((B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
428 $B$J$I$K;HMQ$9$k!%4{B8$N%U%!%$%k$,;2>H$5$l$k;~$O!$Bg>.J8;z$OL5;k$5$l(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
429 $B$k!%$3$l$O(BWindows$B$H(BMacOS$B$GI8=`E*$J<h$j07$$$G$"$k!%(B\filename{foo}$B$H(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
430 \filename{FoO}$B$OF10l$N%U%!%$%k$HG'<1$5$l$k!%$3$N$h$&$JBg>.J8;z$N<h(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
431 $B$j07$$$O(B\emph{case folding}$B$H8F$P$l$k$3$H$b$"$k!%(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
432
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
433 %\item Case sensitive. The case of a name is significant at all times.
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
434 % The names \filename{foo} and {FoO} identify different files. This
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
435 % is the way Linux and Unix systems normally work.
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
436 \item $BBg>.J8;z$r6hJL$9$k!%>o$KBg>.J8;z$GL>A0$r6hJL$9$k!%(B\filename{foo}
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
437 $B$H(B{FoO}$B$OJL$N%U%!%$%k$HG'<1$5$l$k!%$3$l$O(BLinux$B$d(BUnix$B%7%9%F%`$NDL(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
438 $B>o$N<h$j07$$$G$"$k!%(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
439
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
440 \end{itemize}
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
441
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
442 %On Unix-like systems, it is possible to have any or all of the above
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
443 %ways of handling case in action at once. For example, if you use a
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
444 %USB thumb drive formatted with a FAT32 filesystem on a Linux system,
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
445 %Linux will handle names on that filesystem in a case preserving, but
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
446 %insensitive, way.
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
447 Unix$B7O$N%7%9%F%`$G$OF1;~$K>e5-$NJ}K!$rMxMQ$9$k$3$H$,2DG=$G$"$k!%Nc$($P(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
448 USB$B%a%b%j$r(BLinux$B$G(BFAT32$B%U%!%$%k%7%9%F%`$H$7$F%U%)!<%^%C%H$7$?>l9g!$(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
449 Linux$B$O$=$N%U%!%$%k%7%9%F%`>e$N%U%!%$%kL>$rBg>.J8;zJ]B8$@$,6hJL$;$:$K<h$j(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
450 $B07$&!%(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
451
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
452
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
453 %\subsection{Safe, portable repository storage}
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
454 \subsection{$B0BA4$G2DHB$J%j%]%8%H%j%9%H%l!<%8(B}
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
455
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
456 %Mercurial's repository storage mechanism is \emph{case safe}. It
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
457 %translates file names so that they can be safely stored on both case
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
458 %sensitive and case insensitive filesystems. This means that you can
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
459 %use normal file copying tools to transfer a Mercurial repository onto,
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
460 %for example, a USB thumb drive, and safely move that drive and
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
461 %repository back and forth between a Mac, a PC running Windows, and a
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
462 %Linux box.
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
463
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
464 Mercurial$B$N%j%]%8%H%j3JG<%a%+%K%:%`$O(B\emph{$BBg>.J8;z%;!<%U(B}$B$G$"$k!%(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
465 Mercurial$B$OBg>.J8;z$N6hJL$r$9$k%7%9%F%`$G$b$7$J$$%7%9%F%`$G$b0BA4$KJ]B8$G(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
466 $B$-$k$h$&$K%U%!%$%kL>$rJQ49$9$k!%$3$N$?$a!$DL>o$N%U%!%$%k%3%T!<%D!<%k$r;H$C(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
467 $B$F(BMercurial$B%j%]%8%H%j$r(BUSB$B%a%b%j$KE>Aw$7!$(BMac$B!$(BWindows$B$NF0$/(BPC$B!$(BLinux$B%^%7(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
468 $B%s$N4V$G0\F0$7$F$b0BA4$G$"$k!%(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
469
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
470
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
471 %\subsection{Detecting case conflicts}
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
472 \subsection{$BBgJ8;z>.J8;z$N>WFM$r8!=P$9$k(B}
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
473
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
474 %When operating in the working directory, Mercurial honours the naming
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
475 %policy of the filesystem where the working directory is located. If
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
476 %the filesystem is case preserving, but insensitive, Mercurial will
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
477 %treat names that differ only in case as the same.
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
478
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
479 $B%o!<%-%s%0%G%#%l%/%H%j$G$NF0:n$N:]$K!$(B Mercurial$B$O%o!<%-%s%0%G%#%l%/%H%j(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
480 $B$N$"$k%U%!%$%k%7%9%F%`$N%M!<%_%s%0%]%j%7!<$rB:=E$9$k!%Bg>.J8;z$rJ]B8$9$k(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
481 $B$,6hJL$7$J$$%U%!%$%k%7%9%F%`$N>l9g!$(BMercurial$B$OL>A0$NBg>.$@$1$,0[$J$C$F$$(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
482 $B$k%U%!%$%k$rF1$8%U%!%$%k$H$7$F<h$j07$&!%(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
483
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
484 %An important aspect of this approach is that it is possible to commit
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
485 %a changeset on a case sensitive (typically Linux or Unix) filesystem
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
486 %that will cause trouble for users on case insensitive (usually Windows
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
487 %and MacOS) users. If a Linux user commits changes to two files, one
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
488 %named \filename{myfile.c} and the other named \filename{MyFile.C},
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
489 %they will be stored correctly in the repository. And in the working
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
490 %directories of other Linux users, they will be correctly represented
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
491 %as separate files.
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
492
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
493 $B$3$N%"%W%m!<%A$G=EMW$J$N$O!$Bg>.$r6hJL$9$k%U%!%$%k%7%9%F%`!JE57?E*$K$O(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
494 Linux$B$*$h$S(BUnix$B!K$GBg>.$r6hJL$7$J$$%7%9%F%`!JDL>o!$(BWindows$B$^$?$O(BMacOS$B!K$N(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
495 $B%f!<%6$K$H$C$F%H%i%V%k$H$J$k$h$&$J%A%'%s%8%;%C%H$r%3%_%C%H$9$k$3$H$,2DG=(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
496 $B$G$"$k$H$$$&E@$G$"$k!%$b$7(BLinux$B%f!<%6$,(B\filename{myfile.c}$B$H$$$&%U%!%$%k(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
497 $B$H(B\filename{MyFile.C}$B$H$$$&%U%!%$%k$KBP$9$k%A%'%s%8%;%C%H$r%3%_%C%H$7$?>l(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
498 $B9g!$$=$l$i$O%j%]%8%H%j$K@5$7$/J]B8$5$l!$B>$N(BLinux$B%f!<%6$N%o!<%-%s%0%G%#%l(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
499 $B%/%H%j$G$b@5$7$/JL!9$N%U%!%$%k$H$7$F8=$l$k!%(B
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
500
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
501 %If a Windows or Mac user pulls this change, they will not initially
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
502 %have a problem, because Mercurial's repository storage mechanism is
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
503 %case safe. However, once they try to \hgcmd{update} the working
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
504 %directory to that changeset, or \hgcmd{merge} with that changeset,
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
505 %Mercurial will spot the conflict between the two file names that the
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
506 %filesystem would treat as the same, and forbid the update or merge
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
507 %from occurring.
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
508
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
509 $B$3$3$G(BWindows$B$^$?$O(BMac$B$N%f!<%6$,$3$N%A%'%s%8%;%C%H$r(Bpull$B$9$k$H!$(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
510 Mercurial$B$N%j%]%8%H%j3JG<%a%+%K%:%`$OBg>.J8;z$KBP$7$F0BA4$J$?$a!$:G=i$N$&(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
511 $B$A$OLdBj$H$J$i$J$$!%$7$+$7%o!<%-%s%0%G%#%l%/%H%j$r$=$N%A%'%s%8%;%C%H$K(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
512 \hgcmd{update}$B$7$h$&$H$7$?$j!$$=$N%A%'%s%8%;%C%H$H(B\hgcmd{merge}$B$7$h$&$H$9(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
513 $B$k$H!$(BMercurial$B$O!$(B 2$B$D$N%U%!%$%kL>$r%U%!%$%k%7%9%F%`$,F1$8L>A0$H$7$F07$&(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
514 $B$?$a$K@8$8$k%3%s%U%j%/%H$r8!=P$7!$(B update$B$d(Bmerge$B$r5v$5$J$$!%(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
515
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
516 %\subsection{Fixing a case conflict}
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
517 \subsection{$BBgJ8;z>.J8;z$N>WFM$r2r7h$9$k(B}
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
518
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
519 %If you are using Windows or a Mac in a mixed environment where some of
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
520 %your collaborators are using Linux or Unix, and Mercurial reports a
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
521 %case folding conflict when you try to \hgcmd{update} or \hgcmd{merge},
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
522 %the procedure to fix the problem is simple.
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
523
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
524 $B$b$7$"$J$?$,(BWindows$B$d(BMac$B$r;H$C$F$$$F!$2??M$+$N6(NO<T$,(BLinux$B$^$?$O(BUnix$B$r;H$C(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
525 $B$F$$$k:.9g4D6-$G3+H/$r$7$F$*$j!$(B \hgcmd{update}$B$^$?$O(B\hgcmd{merge}$B$G(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
526 Mercurial$B$,Bg>.J8;z$N%3%s%U%j%/%H$r8!=P$9$k$N$G$"$l$P!$2r7hJ}K!$O%7%s%W%k(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
527 $B$G$"$k!%(B
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
528
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
529 %Just find a nearby Linux or Unix box, clone the problem repository
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
530 %onto it, and use Mercurial's \hgcmd{rename} command to change the
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
531 %names of any offending files or directories so that they will no
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
532 %longer cause case folding conflicts. Commit this change, \hgcmd{pull}
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
533 %or \hgcmd{push} it across to your Windows or MacOS system, and
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
534 %\hgcmd{update} to the revision with the non-conflicting names.
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
535
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
536 $B<j6a$J(BLinux$B$^$?$O(BUnix$B%^%7%s$N>e$K!$LdBj$N$"$k%j%]%8%H%j$r%/%m!<%s$7!$(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
537 Mercurial$B$N(B\hgcmd{rename}$B$r<B9T$7$FLdBj$N$"$k%U%!%$%k$d%G%#%l%/%H%j$NL>A0(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
538 $B$rJQ99$7!$%3%s%U%j%/%H$r2r7h$9$k!%$3$NJQ99$r%3%_%C%H$7!$(B\hgcmd{pull}$B$^$?(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
539 $B$O(B\hgcmd{push}$B%3%^%s%I$G$"$J$?$N(BWindows$B$^$?$O(BMacOS$B%7%9%F%`$KE>Aw(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
540 $B$7!$(B\hgcmd{update}$B$G%3%s%U%j%/%H$N$J$$%j%S%8%g%s$X99?7$9$l$P$h$$!%(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
541
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
542 %The changeset with case-conflicting names will remain in your
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
543 %project's history, and you still won't be able to \hgcmd{update} your
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
544 %working directory to that changeset on a Windows or MacOS system, but
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
545 %you can continue development unimpeded.
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
546
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
547 $BBg>.J8;z$N%U%!%$%kL>%3%s%U%j%/%H$,$"$k%A%'%s%8%;%C%H$O%W%m%8%'%/%H$NMzNr(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
548 $B$K;D$C$F$*$j!$(B Windows$B$d(BMacOS$B$7$9$F$`$G$O$=$N%A%'%s%8%;%C%H$X(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
549 \hgcmd{update}$B$9$k$3$H$O$G$-$J$$$b$N$N!$LdBj$J$/3+H/$rB3$1$k$3$H$,$G$-$k!%(B
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
550
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
551 \begin{note}
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
552 % Prior to version~0.9.3, Mercurial did not use a case safe repository
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
553 % storage mechanism, and did not detect case folding conflicts. If
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
554 % you are using an older version of Mercurial on Windows or MacOS, I
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
555 % strongly recommend that you upgrade.
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
556 0.9.3$B$h$jA0$N(BMercurial$B$O(Bcase$B%;!<%U$N%9%H%l!<%85!9=$r;H$C$F$*$i$:!$(Bcase$B$N(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
557 $B>WFM$r8!=P$G$-$J$+$C$?!%(BWindows$B$d(BMacOS$B$G8E$$%P!<%8%g%s$N(BMercurial$B$r;H$C(B
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
558 $B$F$$$k$J$i$P!$%"%C%W%G!<%H$9$k$3$H$r6/$/4+$a$k!%(B
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
559 \end{note}
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
560
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
561 %%% Local Variables:
293
3b1291f24c0d - replaved latex-mode to yatex-mode
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 290
diff changeset
562 %%% mode: yatex
133
1e013fbe35f7 Lots of filename related content. A little more command reference
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
563 %%% TeX-master: "00book"
364
1b372620963a finished filenames.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
564 %%% End: