hgbook
view ja/concepts.tex @ 1070:3dec81dc4543
2.4 partly zh translated
author | Zhaoping Sun <zhaopingsun@gmail.com> |
---|---|
date | Wed Nov 11 21:25:10 2009 -0500 (2009-11-11) |
parents | |
children |
line source
1 \chapter{Behind the scenes}
2 \label{chap:concepts}
4 $BB?$/$N9=@.4IM}%7%9%F%`$H0[$J$j!"(B
5 Mercurial $B$,4p$K$7$F$$$k35G0$OHs>o$KC1=c$J$N$G!"(B
6 Mercurial $B$N%W%m%0%i%`$,<B:]$K$I$N$h$&$KF0:n$9$k$N$+$rM}2r$9$k$N$O4JC1$G$9!#(B
7 $B$=$N$h$&$JCN<1$OI,MWL5$$$+$b$7$l$^$;$s$,!"(B
8 $BI.<T$OFb>p$K4X$9$k(B``$B35G0M}2r(B''$B$,M-MQ$G$"$k$H9M$($F$$$^$9!#(B
10 $BI.<T<+?H$O!"Fb>p$rM}2r$9$k$3$H$G!"(B
11 Mercurial $B$,(B\emph{$B0BA4@-(B}$B$H(B\emph{$B8zN((B}$B$KN10U$7$F@_7W$5$l$F$$$k!"(B
12 $B$H$$$&3N?.$rF@$k$3$H$,$G$-$^$7$?!#(B
13 $B$^$?!"(B
14 $B9=@.4IM}A`:n$r9T$C$?:]$K%=%U%H%&%'%"$,$I$N$h$&$K5!G=$9$k$N$+$r!"(B
15 $BMF0W$K3P$($F$*$1$k$N$G$"$l$P!"(B
16 $B9=@.4IM}%D!<%k$N?6$kIq$$$K6C$+$5$l$k5!2q$,8:$k!"(B
17 $B$H$$$&E@$bHs>o$K=EMW$G$9!#(B
19 $B$3$N>O$G$O!"(B
20 $B:G=i$K(B
21 Mercurial $B$N@_7W$K$*$1$kCf3KE*$J35G0$K$D$$$F@bL@$7$?>e$G!"(B
22 $B<BAu$K$*$1$k6=L#?<$$E@$K4X$9$k>\:Y$r4v$D$+<h$j>e$2$h$&$H;W$$$^$9!#(B
24 \section{Mercurial's historical record}
26 \subsection{Tracking the history of a single file}
28 $B%U%!%$%k$NJQ99$rDI@W$9$k>l9g!"(B
29 Mercurial $B$O%U%!%$%k$NMzNr$r(B
30 \emph{filelog} $B$H8F$P$l$k%a%?%G!<%?%*%V%8%'%/%H7A<0$GJ]B8$7$^$9!#(B
31 filelog $B$K5-O?$5$l$k8D!9$NMWAG$O!"(B
32 $BDI@WBP>]%U%!%$%k$N!"(B
33 $B$H$"$k%j%S%8%g%s$r:F8=$9$k$N$K==J,$J>pJs$rJ];}$7$F$$$^$9!#(B
34 filelog $B$O(B
35 \sdirname{.hg/store/data} $B%G%#%l%/%H%jG[2<$K%U%!%$%k$H$7$FJ]B8$5$l$F$*$j!"(B
36 $BMzNr>pJs$H!"(B
37 Mercurial $B$N%j%S%8%g%s8!:w$rJd=u$9$k%$%s%G%C%/%9$N!"(B
38 $B#2<oN`$N>pJs$rJ];}$7$F$$$^$9!#(B
40 $B%5%$%:$,Bg$-$+$C$?$jJQ99MzNr$NB?$$%U%!%$%k$N>l9g!"(B
41 filelog $B$rMzNr>pJs!J3HD%;R(B ``\texttt{.d}''$B!K(B
42 $B$H%$%s%G%C%/%9!J3HD%;R(B ``\texttt{.i}''$B!K$N#2$D$KJ,N%$7$FJ]B8$5$l$^$9!#(B
43 $BJQ99MzNr$,$=$l$[$IL5$$>.$5$J%U%!%$%k$N>l9g!"(B
44 $BMzNr>pJs$H%$%s%G%C%/%9$O(B
45 ``\texttt{.i}'' $B3HD%;R$r;}$DC10l$N%U%!%$%k$KJ]B8$5$l$^$9!#(B
46 $B:n6HNN0h%G%#%l%/%H%jCf$N%U%!%$%k$H!"(B
47 $B$=$NJQ99MzNr$rDI@W$9$k$?$a$N%j%]%8%H%jCf$N(B filelog $B%U%!%$%k$NBP1~$r!"(B
48 $B?^(B~\ref{fig:concepts:filelog}$B$K<($7$^$9!#(B
50 \begin{figure}[ht]
51 \centering
52 \grafix{filelog}
53 \caption{Relationships between files in working directory and
54 filelogs in repository}
55 \label{fig:concepts:filelog}
56 \end{figure}
58 \subsection{Managing tracked files}
61 $BDI@WBP>]%U%!%$%k$N>pJs$r$^$H$a$k$?$a$K!"(B
62 Mercurial $B$O(B \emph{manifest} $B$H8F$P$l$k9=B$$r;HMQ$7$F$$$^$9!#(B
63 manifest $B$K5-O?$5$l$k8D!9$NMWAG$O!"(B
64 $BEv3:%A%'%s%8%;%C%H$K$*$1$k%U%!%$%k$N0lMw$d!"(B
65 $B3F%U%!%$%k$N%j%S%8%g%s!"(B
66 $B4v$D$+$N%U%!%$%k$N%a%?%G!<%?$H$$$C$?!"(B
67 $B8D!9$N%A%'%s%8%;%C%H$4$H$N%U%!%$%k$K4X$9$k>pJs$rJ];}$7$F$$$^$9!#(B
69 \subsection{Recording changeset information}
71 \emph{changelog} $B$O!"(B
72 $B%A%'%s%8%;%C%H$N%3%_%C%H<g$d!"(B
73 $B%3%_%C%H;~$N%m%0%a%C%;!<%8!"(B
74 $B$=$NB>%A%'%s%8%;%C%H$K4X$9$k4v$D$+$N>pJs$d!"(B
75 manifest $B$N%j%S%8%g%s$H$$$C$?!"(B
76 $B8D!9$N%A%'%s%8%;%C%H$K4X$9$k>pJs$rJ];}$7$F$$$^$9!#(B
78 \subsection{Relationships between revisions}
80 changelog$B!"(Bmanifest $B$J$$$7(B filelog $B$K$*$1$k8D!9$N%j%S%8%g%s$O!"(B
81 $BD>@\$N?F%j%S%8%g%s(B
82 $B!J%^!<%8$r9T$C$?%j%S%8%g%s$N>l9g$O!"(B
83 $B%^!<%8BP>]$H$J$C$?#2$D$N?F%j%S%8%g%s!K(B
84 $B$X$N;2>H$rJ];}$7$F$$$^$9!#(B
85 $B:#=R$Y$?$h$&$K!"(B
86 $B3F9=B$$K(B\emph{$B$^$?$,$C$?(B}$B4XO"@-$r$b$A!"(B
87 $B$=$l$i$OI,A3E*$K3,AX9=B$$r;}$C$F$$$^$9!#(B
89 $B%j%]%8%H%jCf$NA4$F$N%A%'%s%8%;%C%H$K4X$7$F!"(B
90 changelog $B$K$O87L)$K#1$D$N%j%S%8%g%s$,J]B8$5$l$^$9!#(B
91 changelog $B$K$*$1$k3F%j%S%8%g%s$O!"(B
92 manifest $BCf$N%j%S%8%g%s$X$N;2>H$rJ];}$7$F$$$^$9!#(B
93 manifest $BCf$N3F%j%S%8%g%s$O!"(B
94 $B%A%'%s%8%;%C%H$,@8@.$5$l$?:]$N3F%U%!%$%k$N%j%S%8%g%s$KBP1~$9$k(B
95 filelog $BCf$N%j%S%8%g%s$X$N;2>H$rJ];}$7$F$$$^$9!#(B
96 $B$3$N4XO"@-$r?^(B~\ref{fig:concepts:metadata}$B$K<($7$^$9!#(B
98 \begin{figure}[ht]
99 \centering
100 \grafix{metadata}
101 \caption{Metadata relationships}
102 \label{fig:concepts:metadata}
103 \end{figure}
105 $B?^$+$i$b$o$+$k$h$&$K!"(B
106 changelog$B!"(Bmanifest $B$*$h$S(B
107 filelog $B$,J];}$9$k%j%S%8%g%s>pJs4V$N4X78$O!"(B
108 $BI,$:$7$b(B``$B#1BP#1(B''$B$H$$$&$o$1$G$O$"$j$^$;$s!#(B
109 $B#2$D$N%A%'%s%8%;%C%H$N4V$G(B
110 manifest $B$,JQ99$5$l$F$$$J$$>l9g!"(B
111 $B$=$l$i$N%A%'%s%8%;%C%H$KBP1~$9$k(B changelog $BMWAG$O!"(B
112 manifest $BCf$NF1$8%j%S%8%g%s$r;2>H$7$^$9!#(B
113 $B#2$D$N%A%'%s%8%;%C%H$N4V$G(B
114 Mercurial $B$,DI@W$9$k%U%!%$%k$,JQ99$5$l$F$$$J$$>l9g!"(B
115 $B$=$l$i$N%A%'%s%8%;%C%H$KBP1~$9$k(B manifest $BMWAG$O!"(B
116 filelog $BCf$NF1$8%j%S%8%g%s$r;2>H$7$^$9!#(B
118 \section{Safe, efficient storage}
120 changelog$B!"(Bmanifest $B$*$h$S(B filelog $B$O!"(B
121 \emph{revlog} $B$H8F$P$l$kF1$89=B$$K$h$j9=@.$5$l$F$$$^$9!#(B
123 \subsection{Efficient storage}
125 revlog $B$O(B \emph{$B:9J,(B}$B<jK!$H$$$&;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{sec:hook:carepretxn}~$B@a$r;2>H$7$F$/$@$5$$!#(B}$B!#(B
173 Mercurial $B$,%U%!%$%k$X$NDI2C$7$+9T$o$J$$$3$H$,!"(B
174 $B%H%i%s%6%/%7%g%s$NIT2DJ,@-J]>Z$NDs6!$rMF0W$K$7$F$$$^$9!#(B
175 $B%H%i%s%6%/%7%g%sJ]>Z$,MF0W$G$"$kDx!"(B
176 $B$=$l$,@5$7$/5!G=$7$F$$$k$3$H$r3N?.$G$-$kH&$G$9!#(B
178 \subsection{Fast retrieval}
180 $B=i4|$N9=@.4IM}%7%9%F%`$,6&$K4Y$C$F$$$?(B\emph{$BHs8zN($JI|5l(B}$BLdBj$NMn$H$77j$r!"(B
181 Mercurial $B$O>e<j$K2sHr$7$F$$$^$9!#(B
182 $BKX$I$N9=@.4IM}%7%9%F%`$O!"(B
183 ``$B%9%J%C%W%7%g%C%H(B''$B$KBP$9$kJQ99$NDI2CE*$JO"B3$H$7$F!"(B
184 $B%j%S%8%g%s$NFbMF$rJ];}$7$F$$$^$7$?!#(B
185 $B$3$N<jK!$N>l9g!"(B
186 $BFCDj$N%j%S%8%g%s$r:F9=C[$9$k$K$O!"(B
187 $B:G=i$K%9%J%C%W%7%g%C%H$rFI$_9~$_!"(B
188 $BB3$$$FBP>]%j%S%8%g%s$H$N4V$NA4$F$N:9J,%G!<%?$rFI$_9~$`I,MW$,$"$j$^$9!#(B
189 $B%U%!%$%k$NMzNr$,@Q$_=E$J$k$[$I!"(B
190 $B:9J,%G!<%?$rFI$_9~$^$J$1$l$P@.$i$J$$%j%S%8%g%s$,A}2C$7!"(B
191 $BFCDj$N%j%S%8%g%s$N:F9=C[$K;~4V$,I,MW$H$J$j$^$9!#(B
193 \begin{figure}[ht]
194 \centering
195 \grafix{snapshot}
196 \caption{Snapshot of a revlog, with incremental deltas}
197 \label{fig:concepts:snapshot}
198 \end{figure}
200 Mercurial $B$,$3$NLdBj$N2r7h$K;HMQ$7$F$$$k<jK!$O!"(B
201 $B4JC1$J$b$N$G$9$,8z2LE*$G$9!#(B
202 $BA02s$N%9%J%C%W%7%g%C%H:n@.;~E@$+$i!"(B
203 $B8GDj$5$l$?ogCM$rD6$($F:9J,>pJs$,C_@Q$5$l$?:]$K$O!"(B
204 $B:9J,>pJs$NC_@Q$G$O$J$/!"(B
205 $B?7$?$J%9%J%C%W%7%g%C%H!JL^O@05=L$O9T$$$^$9!K$rJ]B8$9$k!"(B
206 $B$H$$$&$b$N$G$9!#(B
207 $B$3$N<jK!$O!"(B
208 \emph{$BG$0U$N(B}$B%j%S%8%g%s$K$*$1$k%U%!%$%k$rAGAa$/:F9=C[$G$-$^$9!#(B
209 $B$3$N<jK!$OHs>o$KM-8z$G$"$k$?$a!"(B
210 $BB>$N4v$D$+$N9=@.4IM}%7%9%F%`$K$b<h$j9~$^$l$F$$$^$9!#(B
212 $B?^(B~\ref{fig:concepts:snapshot}$B$N35MW$,<($9$h$&$K!"(B
213 Mercurial $B$O!"(B
214 revlog $B$N%$%s%G%C%/%9%U%!%$%k$K$*$1$k3FMWAG$K!"(B
215 $BFCDj$N%j%S%8%g%s$N:F9=C[$N:]$KFI$_9~$_$,I,MW$H$5$l$k!"(B
216 $B%G!<%?%U%!%$%kCf$NMWAG$NHO0O$r3JG<$7$^$9!#(B
218 \subsubsection{Aside: the influence of video compression}
220 $BF02h05=L$r=OCN$7$F$$$k$+!"(B
221 $B%1!<%V%k$J$$$71R@1$K$h$k%G%8%?%k%F%l%SG[?.$r;kD0$7$?$3$H$,$"$k$J$i$P!"(B
222 $B$?$$$F$$$NF02h05=L7A<0$K$*$$$F3FF02h%U%l!<%`$,!"(B
223 $B@h9T$9$k%U%l!<%`$H$N:9J,$GJ];}$5$l$F$$$k$3$H$r$4B8CN$+$b$7$l$^$;$s!#(B
224 $B2C$($F$=$l$i$N7A<0$G$O!"(B
225 $B05=LN($r8~>e$5$;$k$?$a$K(B``$BHs2D5U(B''$B05=L<jK!$rMQ$$$F$$$^$9$N$G!"(B
226 $B%U%l!<%`4V:9J,$N?t$K1~$8$F;k3PE*%(%i!<$,C_@Q$5$l$^$9!#(B
228 $BF02hG[?.$N>l9g!"(B
229 $B;~@^$N?.9f0[>o$K$h$k(B``$B7gMn(B''$B$,M-$jF@$^$9$7!"(B
230 $B2D5U05=L2aDx$K$h$j@8$8$k8m:9$NC_@Q$r@)8B$9$kI,MW$b$"$k$?$a!"(B
231 $BF02h05=LB&$G$ODj4|E*$K40A4$J%U%l!<%`(B
232 $B!J(B``$B%-!<%U%l!<%`(B''$B$H8F$P$l$^$9!K$r05=L7A<0$NCf$KA^F~$7$^$9!#(B
233 $B$3$l$OF02h?.9f$,CfCG$5$l$F$b!"(B
234 $B<!$N%-!<%U%l!<%`$NE~Ce;~E@$+$i$N:F3+$,2DG=$G$"$k$3$H$r0UL#$7$^$9!#(B
235 $BId9f2=%(%i!<$NC_@Q$b!"(B
236 $B8D!9$N%-!<%U%l!<%`$G%/%j%"$5$l$^$9!#(B
238 \subsection{Identification and strong integrity}
240 $B:9J,$J$$$7%9%J%C%W%7%g%C%H>pJs$N%G!<%?$KBP$7$F!"(B
241 revlog $BMWAG$O0E9f2=$KMQ$$$i$l$k%O%C%7%eCM$r7W;;$7$FJ];}$7$F$$$^$9!#(B
242 $B$3$l$K$h$j!"(B
243 $B%j%S%8%g%s$K4X$9$k>pJs$N56B$$r:$Fq$K$9$k$HF1;~$K!"(B
244 $BITN8$NGKB;$N8!=P$,MF0W$K$J$j$^$9!#(B
246 $B%O%C%7%eCM$N;;=P$O!"(B
247 $BC1$J$kGKB;$N8!=P0J>e$N$b$N$r$b$?$i$7$^$9!#(B
248 $B%O%C%7%eCM$O3F%j%S%8%g%s$N<1JL;R$H$7$F;HMQ$5$l$^$9!#(B
249 Mercurial $B$N%(%s%I%f!<%6$H$7$FL\$K$9$k%A%'%s%8%;%C%H<1JL;R$N%O%C%7%eCM$O!"(B
250 changelog $B$N%j%S%8%g%s$KM3Mh$9$kCM$G$9!#(B
251 filelog $B$d(B manifest $B$G$b%O%C%7%eCM$r;HMQ$7$F$$$^$9$,!"(B
252 Mercurial $B$G$O$3$l$i$OIqBfN"$N$_$G;HMQ$5$l$F$$$^$9!#(B
254 $BFCDj%j%S%8%g%s$N%U%!%$%k$r:F9=C[$9$k>l9g$d!"(B
255 $BB>$N%j%]%8%H%j$+$i%A%'%s%8%;%C%H$r<h$j9~$s$@>l9g!"(B
256 Mercurial $B$O%O%C%7%eCM$,@5$7$$$3$H$r3NG'$7$^$9!#(B
257 $B0l4S@-$KLdBj$,$"$k$3$H$,8!=P$5$l$?>l9g!"(B
258 $B7Y9p$rH/$7$?>e$G!"(B
259 $B?J9TCf$NA4$F$N=hM}$rDd;_$7$^$9!#(B
261 Mercurial $B$,Dj4|E*$K:9$79~$s$G$$$k%9%J%C%W%7%g%C%H$O!"(B
262 $BFCDj%j%S%8%g%s$N:F9=C[$N:]$N8zN($K2C$($F!"(B
263 $BItJ,E*$J%G!<%?$NGKB;$KBP$9$k7xO4@-$r$b$?$i$7$F$^$9!#(B
264 $B%O!<%I%&%'%"%(%i!<$d%7%9%F%`$N%P%0$K$h$C$F!"(B
265 revlog $B$,ItJ,E*$KGKB;$7$?>l9g!"(B
266 $BGKB;$rLH$l$?(B revlog $B$N%G!<%?$+$i!"(B
267 $BGKB;$7$?It0L$NA08e6&$K!"(B
268 $B0lIt!J$"$k$$$OKX$I$N!K%j%S%8%g%s$rI|5l$9$k$3$H$,2DG=$G$9!#(B
269 $B:9J,$N$_$rJ];}$9$k%b%G%k$r:NMQ$9$k9=@.4IM}%7%9%F%`$G$O!"(B
270 $B$3$N$h$&$J$3$H$O$G$-$^$;$s!#(B
272 \section{Revision history, branching, and merging}
274 $BA4$F$N(B Mercurial $B$N(B revlog $BMWAG$O!"(B
275 $BDL>o$O(B\emph{$B?F(B}$B$H8@$o$l$kD>A0$N%j%S%8%g%s$N<1JL;R$rJ];}$7$F$$$^$9!#(B
276 $B<B:]$K$O!"(B
277 $B3F(B revlog $BMWAG$O#1$D$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$5$l$?N>J}$N%j%S%8%g%s$N<1JL;R$r?F%j%S%8%g%s$N<1JL;R$H$7$F3JG<$7$^$9!#(B
301 \begin{figure}[ht]
302 \centering
303 \grafix{revlog}
304 \caption{}
305 \label{fig:concepts:revlog}
306 \end{figure}
308 \section{The working directory}
310 Mercurial $B$O!"(B
311 $B%j%]%8%H%j$G9=@.4IM}$5$l$F$$$k%U%!%$%k$N!"(B
312 $BFCDj$N%j%S%8%g%s$K$*$1$k%9%J%C%W%7%g%C%H$r:n6HNN0h%G%#%l%/%H%j$KJ];}$7$^$9!#(B
314 $B:n6HNN0h%G%#%l%/%H%j$O!"(B
315 $B$I$N%j%S%8%g%s$N%9%J%C%W%7%g%C%H$rJ];}$7$F$$$k$N$+$r(B``$BCN$C$F$$$^$9(B''$B!#(B
316 $B:n6HNN0h%G%#%l%/%H%j$rFCDj$N%j%S%8%g%s$G99?7$7$h$&$H$7$?>l9g!"(B
317 Mercurial $B$O(B (1) $BAj1~$7$$%j%S%8%g%s$N(B manifest $B$r;2>H$7!"(B
318 (2) $BEv3:%j%S%8%g%s$N%3%_%C%H;~E@$G$N4IM}BP>]%U%!%$%k$rFCDj$7!"(B
319 (3) $B:n6HNN0h%G%#%l%/%H%jCf$N%U%!%$%k$,J];}$9$Y$-FbMF$r7hDj$7$^$9!#(B
320 $B$=$N>e$G!"(B
321 $BEv3:%A%'%s%8%;%C%H$N%3%_%C%H;~E@$HF1$8FbMF$r;}$D$h$&$K!"(B
322 $B:n6HNN0h%G%#%l%/%H%jCf$K3F%U%!%$%k$NJ#@=$r:F@8@.$7$^$9!#(B
324 dirstate $B7A<0$K$O!"(B
325 $B:n6HNN0h%G%#%l%/%H%j$,$I$N%A%'%s%8%;%C%H$G99?7$5$l$F$$$k$+$H$+!"(B
326 $B:n6HNN0h$G(B Mercurial $B$K$h$j9=@.4IM}$5$l$F$$$k%U%!%$%k$N0lMw$J$I!"(B
327 $B:n6HNN0h%G%#%l%/%H%j$K4X$9$k(B
328 Mercurial $B$N4IM}>pJs$,3JG<$5$l$F$$$^$9!#(B
330 $B8D!9$N%j%S%8%g%s$K4X$9$k(B revlog $BMWAG$O!"(B
331 $B#2$D$N?F%j%S%8%g%s<1JL;R$r3JG<$9$kNN0h$r;}$C$F$$$^$9$N$G!"(B
332 $BDL>o$N%j%S%8%g%s!J#1$D$N?F%j%S%8%g%s$@$1$r;2>H!K$b!"(B
333 $B#2$D$N%j%S%8%g%s$r%^!<%8$9$k%j%S%8%g%s$bI=8=2DG=$G$9$,!"(B
334 dirstate $B7A<0$b#2$D$N?F%j%S%8%g%s<1JL;R$r3JG<$9$kNN0h$r;}$C$F$$$^$9!#(B
335 \hgcmd{update} $B%3%^%s%I$r<B9T$7$?:]$K$O!"(B
336 $B;XDj$7$?%A%'%s%8%;%C%H$O(B``$BBh#1?F(B''$B!J(Bfirst parent$B!K$H$7$FJ];}$5$l!"(B
337 $BBh#2?F$O6u<1JL;R$rJ];}$7$^$9!#(B
338 $B%A%'%s%8%;%C%H$H$N(B \hgcmd{merge} $B$r9T$C$?:]$K$O!"(B
339 dirstate $B7A<0$,J];}$9$kBh#1?F$OJQ2=$7$^$;$s$,!"(B
340 $BBh#2?F$O(B \hgcmd{merge} $B%3%^%s%I$K;XDj$5$l$?%A%'%s%8%;%C%H$K@_Dj$5$l$^$9!#(B
341 \hgcmd{parents} $B%3%^%s%I$K$h$j!"(B
342 dirstate $B7A<0$,J];}$9$k?F%j%S%8%g%s$N<1JL;R$rI=<($G$-$^$9!#(B
344 \subsection{What happens when you commit}
346 dirstate $B7A<0$,?F%j%S%8%g%s>pJs$rJ];}$9$k$N$O!"(B
347 $B2?$b3P$(=q$-$N$?$a$@$1$G$O$"$j$^$;$s!#(B
348 Mercurial $B$O(B dirstate $B7A<0$N;}$D?F%j%S%8%g%s>pJs$r!"(B
349 $B%3%_%C%H$N:]$N(B\emph{$B?75,%A%'%s%8%;%C%H$N?F%A%'%s%8%;%C%H(B}$B$H$7$F;HMQ$7$^$9!#(B
351 \begin{figure}[ht]
352 \centering
353 \grafix{wdir}
354 \caption{The working directory can have two parents}
355 \label{fig:concepts:wdir}
356 \end{figure}
358 $B?^(B~\ref{fig:concepts:wdir}$B$O!"(B
359 $B#1$D$N?F%A%'%s%8%;%C%H$N$_$r;}$D!"(B
360 $BDL>o$N:n6HNN0h%G%#%l%/%H%j$rI=$7$F$$$^$9!#(B
361 $B?^$K$*$1$k:n6HNN0h%G%#%l%/%H%j$N?F%A%'%s%8%;%C%H$O!"(B
362 $B%j%]%8%H%j$K$*$1$k:G?7$G3n$D;R$r;}$?$J$$%A%'%s%8%;%C%H$G$9$N$G!"(B
363 \emph{tip} $B$H8F$P$l$^$9!#(B
365 \begin{figure}[ht]
366 \centering
367 \grafix{wdir-after-commit}
368 \caption{The working directory gains new parents after a commit}
369 \label{fig:concepts:wdir-after-commit}
370 \end{figure}
372 $B:n6HNN0h%G%#%l%/%H%j$=$N$b$N$r!"(B
373 ``$B%3%_%C%H$7$h$&$H$7$F$$$k%A%'%s%8%;%C%H(B''
374 $B$HB*$($k$H$o$+$j$d$9$$$G$7$g$&!#(B
375 Mercurial $B$KBP$7$FDI2C!?:o=|!?2~L>$J$$$7J#@=$r;X<($7$?%U%!%$%k$O!"(B
376 $B4{$K(B Mercurial $B$K$h$j9=@.4IM}$5$l$F$$$k%U%!%$%k$X$NJQ99$HF1MM$K!"(B
377 $B$=$N%A%'%s%8%;%C%H$KH?1G$5$l$^$9!#(B
378 $B$=$N?7$?$J%A%'%s%8%;%C%H$K$O!"(B
379 $B:n6HNN0h%G%#%l%/%H%j$HF1$8?F%A%'%s%8%;%C%H$,@_Dj$5$l$^$9!#(B
381 $B%3%_%C%H$,40N;$7$?$J$i!"(B
382 Mercurial $B$d:n6HNN0h%G%#%l%/%H%j$N?F%A%'%s%8%;%C%H$N>pJs$r99?7$7$^$9!#(B
383 $BBh#1?F$K$O%3%_%C%H$K$h$j?7$?$K@8@.$5$l$?%A%'%s%8%;%C%H$N<1JL;R$,@_Dj$5$l!"(B
384 $BBh#2?F$K$O6u<1JL;R$,@_Dj$5$l$^$9!#(B
385 $B%3%_%C%H8e$NLO<0?^$r!"(B
386 $B?^(B~\ref{fig:concepts:wdir-after-commit}$B$K<($7$^$9!#(B
387 Mercurial $B$O%3%_%C%H$N:]$K!"(B
388 $B:n6HNN0h%G%#%l%/%H%jCf$N%U%!%$%k$K$O0l@Z?($l$:!"(B
389 $BC1$K(B dirstate $B$N?F%A%'%s%8%;%C%H>pJs$r=q$-49$($k$@$1$G$9!#(B
391 \subsection{Creating a new head}
393 $B8=;~E@$G$N(B tip $B0J30$N%A%'%s%8%;%C%H$G$N:n6HNN0h%G%#%l%/%H%j$N99?7$O!"(B
394 $BNI$/$"$k$3$H$G$9!#(B
395 $BNc$($P!"(B
396 $B@h=52PMKF|;~E@$G$N%W%m%8%'%/%H$N>uBV$rD4$Y$?$j!"(B
397 $B$I$N%A%'%s%8%;%C%H$,%P%0$r;}$A9~$s$@$N$+$rD4$Y$k!"(B
398 $B$H$$$C$?>u67$G$9!#(B
399 $B$3$N$h$&$J>u67$G$N<+A3$J9T0Y$O!"(B
400 $B:n6HNN0h%G%#%l%/%H%j$r4uK>$N%A%'%s%8%;%C%H$G99?7$7!"(B
401 $BEv3:%A%'%s%8%;%C%H$r%3%_%C%H$7$?;~E@$G$N%U%!%$%k$NFbMF$r!"(B
402 $B:n6HNN0h%G%#%l%/%H%jCf$N%U%!%$%k$r;2>H$7$F3NG'$9$k!"(B
403 $B$H$$$&$b$N$G$7$g$&!#(B
404 $B$3$N9T0Y$K$h$k1F6A$r!"(B
405 $B?^(B~\ref{fig:concepts:wdir-pre-branch}$B$K<($7$^$9!#(B
407 \begin{figure}[ht]
408 \centering
409 \grafix{wdir-pre-branch}
410 \caption{The working directory, updated to an older changeset}
411 \label{fig:concepts:wdir-pre-branch}
412 \end{figure}
414 $B:n6HNN0h%G%#%l%/%H%j$r0JA0$N%A%'%s%8%;%C%H$G99?7$7$?>l9g!"(B
415 $B2?$i$+$NJQ99$r9T$C$F%3%_%C%H$7$?$J$i!"(B
416 Mercurial $B$O$I$N$h$&$K?6Iq$&$N$G$7$g$&$+!)(B
417 Mercurial $B$O$3$l$^$G$K@bL@$7$F$-$?>l9g$HF1$8$h$&$K?6Iq$$$^$9!#(B
418 $B:n6HNN0h%G%#%l%/%H%j$N?F%A%'%s%8%;%C%H$,!"(B
419 $B?75,$K:n@.$5$l$k%A%'%s%8%;%C%H$N?F$K$J$j$^$9!#(B
420 $B?75,:n@.$5$l$k%A%'%s%8%;%C%H$O;R$r;}$?$:!"(B
421 $B$h$C$F?7$?$J(B tip $B%A%'%s%8%;%C%H$H$J$j$^$9!#(B
422 $B%3%_%C%H$N7k2L!"(B
423 $B%j%]%8%H%j$K$O;R$r;}$?$J$$%A%'%s%8%;%C%H$,#2$DB8:_$7!"(B
424 $B$3$l$i$O(B \emph{head} $B$H8F$P$l$^$9!#(B
425 $B$3$N>u67$r?^(B~\ref{fig:concepts:wdir-branch} $B$K<($7$^$9!#(B
427 \begin{figure}[ht]
428 \centering
429 \grafix{wdir-branch}
430 \caption{After a commit made while synced to an older changeset}
431 \label{fig:concepts:wdir-branch}
432 \end{figure}
434 \begin{note}
435 Mercurial $B$KFk@w$_$NL5$$J}$O!"(B
436 $B0z?tL5$7$G(B \hgcmd{pull} $B%3%^%s%I$r<B9T$7$?>l9g$N!"(B
437 $BNI$/$"$k!V4V0c$$!W$r5$$KN1$a$FCV$$$F$/$@$5$$!#(B
438 \hgcmd{pull} $B%3%^%s%I$N4pDlF0:n$O!"(B
439 $B:n6HNN0h%G%#%l%/%H%j$N99?7$r(B\emph{$B9T$$$^$;$s(B}$B$N$G!"(B
440 $B%j%]%8%H%j$X$N?75,%A%'%s%8%;%C%H$N<h$j9~$_$O9T$o$l$F$b!"(B
441 $B:n6HNN0h%G%#%l%/%H%j$O(B \hgcmd{pull} $B%3%^%s%I<B9TA0$N$^$^$G$9!#(B
442 $B:n6HNN0h%G%#%l%/%H%j$OEv3:;~E@$G$N(B tip $B$HF14|$7$F$$$J$$$?$a!"(B
443 \hgcmd{pull} $B$N<B9T8e$K2?$i$+$NJQ99$r9T$$%3%_%C%H$7$?>l9g!"(B
444 $B7k2L$H$7$F?7$?$J(B head $B$r@8@.$9$k$3$H$K$J$j$^$9!#(B
446 $B3g8LIU$-$G!V4V0c$$!W$H=R$Y$?$N$O!"(B
447 $B$3$N>u67$r=$I|$9$k$N$KI,MW$J$3$H$,!"(B
448 \hgcmd{merge} $B$7$F$+$i(B \hgcmd{commit} $B$9$l$PNI$$$@$1$@$+$i$G$9!#(B
449 $B8@$$49$($k$J$i!"(B
450 $B$3$N$h$&$J%1!<%9$OA4A3?<9o$J>u67$G$O$J$$!"$H$$$&$3$H$G$9!#(B
451 Mercurial $B$K47$l$F$$$J$$?M$O%S%C%/%j$9$k$+$b$7$l$^$;$s$,!D!#(B
452 $B$3$N$h$&$J;vBV$r2sHr$9$kJL$NJ}K!$d!"(B
453 $B=i?4<T$K$H$C$F0U30$K46$8$k$3$N$h$&$J?6$kIq$$$r(B Mercurial $B$,$H$kM}M3$K$D$$$F!"(B
454 $B8e$[$I@bL@$7$?$$$H;W$$$^$9!#(B
455 \end{note}
457 \subsection{Merging heads}
459 \hgcmd{merge} $B%3%^%s%I<B9T$N:]$K!"(B
460 Mercurial $B$O:n6HNN0h%G%#%l%/%H%j$NBh#1?F$OJQ99$;$:$K!"(B
461 $BBh#2?F$r%^!<%8BP>]$H$7$F;XDj$7$?%A%'%s%8%;%C%H$KJQ99$7$^$9!#(B
462 $B$3$NMM;R$r?^(B~\ref{fig:concepts:wdir-merge}$B$K<($7$^$9!#(B
464 \begin{figure}[ht]
465 \centering
466 \grafix{wdir-merge}
467 \caption{Merging two heads}
468 \label{fig:concepts:wdir-merge}
469 \end{figure}
471 $B#2$D$N%A%'%s%8%;%C%H$K$*$$$F4IM}$5$l$k%U%!%$%k$r%^!<%8$9$k$?$a!"(B
472 Mercurial $B$O:n6HNN0h%G%#%l%/%H%j$rJ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$j$^$9!#(B
525 $BJ#?t$N%A%'%s%8%;%C%H$N0l3g%^!<%8$O5;=QE*$K$O2DG=$G$7$g$&$,!"(B
526 $B%f!<%6$,:.Mp$7$?$j!"(B
527 $B$R$I$/Mp;($J%^!<%8$,9T$o$l$k$G$"$m$&$3$H$OL\$K8+$($F$$$^$9!#(B
529 \section{Other interesting design features}
531 $B$3$l$^$G$N@a$G!"(B
532 Mercurial $B$,?.Mj@-$H@-G=$XCm0U?<$/G[N8$rJ'$C$F$$$k$3$H$r@bL@$9$k$?$a$K!"(B
533 $B@_7W$K$*$1$k:G$b=EMW$JB&LL$N4v$D$+$K>GE@$rEv$F$F$-$^$7$?!#(B
534 $B$7$+$7!"(B
535 $B>\:Y;v9`$X$NG[N8$O!"(B
536 $B$3$l$@$1$KN1$^$j$^$;$s!#(B
537 Mercurial $B$N9=@.$K$*$$$FI.<T$N8D?ME*$J6=L#$r$=$=$kB&LL$,B??t$"$j$^$9!#(B
538 $B$3$l$^$G$N(B``big ticket''$B$JB&LL$H$OJL$K!"(B
539 $B$$$/$D$+$rA*$s$G>\:Y$r@bL@$7$h$&$H;W$$$^$9$N$G!"(B
540 $B$3$l$i$K6=L#$,$"$l$P!"(B
541 $BNI$$@_7W$N%7%9%F%`$N9M0F$N:]$KM-MQ$J!"(B
542 $B$h$jNI$$H/A[$rF@$k$3$H$,$G$-$k$G$7$g$&!#(B
544 \subsection{Clever compression}
546 Mercurial $B$O%9%J%C%W%7%g%C%H$H:9J,$N$=$l$>$l$KBP$7$F!"(B
547 $B05=L$,M-8z$G$"$k>l9g$K$O05=L7A<0$GJ]B8$7$^$9!#(B
548 Mercurial $B$O>o$K%9%J%C%W%7%g%C%H$J$$$7:9J,$N05=L$r(B\emph{$B;n9T(B}$B$7$^$9$,!"(B
549 $BHs05=L$J>uBV$h$j$b%5%$%:$,>.$5$$>l9g$K8B$j!"(B
550 $B05=L7A<0$G$NJ]B8$r9T$$$^$9!#(B
552 $B$3$N$3$H$O!"(B
553 $BNc$($P(B \texttt{zip} $B%"!<%+%$%V$d(B JPEG $B2hA|$N$h$&$K!"(B
554 $B85!905=L7A<0$NFbMF$r;}$D%U%!%$%k$N3JG<$N:]$K!"(B
555 Mercurial $B$,(B``$BE,@Z$J=hCV(B''$B$r9T$&$3$H0UL#$7$^$9!#(B
556 $B$3$l$i$N%U%!%$%k$O(B Mercurial $B$K$h$k#2EYL\$N05=L$N:]$K$O!"(B
557 $B:G=i$N%5%$%:$h$j$bBg$-$/$J$k$N$,0lHLE*$G$9$N$G!"(B
558 Mercurial $B$O(B \texttt{zip} $B$d(B JPEG $B%U%!%$%k$r$=$N$^$^J]B8$7$^$9!#(B
560 $B05=L7A<0$N%U%!%$%k$N%j%S%8%g%s4V$N:9J,$O!"(B
561 $B0lHLE*$K$O%9%J%C%W%7%g%C%H$h$j$bBg$-$/$J$j$^$9$N$G!"(B
562 $B$3$N>l9g$G$b(B Mercurial $B$O(B``$BE,@Z$J=hCV(B''$B$r9T$$$^$9!#(B
563 $B%U%!%$%k$N%9%J%C%W%7%g%C%H$=$N$b$N$rJ]B8$9$k>l9g$N5vMFHO0O$r!"(B
564 $B:9J,>pJs$N%5%$%:$,D6$($k$3$H$,H=L@$7$?>l9g!"(B
565 Mercurial $B$O%9%J%C%W%7%g%C%H$rJ]B8$7$^$9$N$G!"(B
566 $B7+$jJV$7$K$J$j$^$9$,!"(B
567 $B:9J,$N$_$rJ];}$9$k%b%G%k$h$j$b%G%#%9%/MFNL$,@aLs$G$-$^$9!#(B
569 \subsubsection{Network recompression}
571 Mercurial $B$O%G%#%9%/$X$NMzNrJ]B8$N:]$K!"(B
572 $B@-G=$KBP$9$k05=LN($,$=$3$=$3NI9%$G%P%i%s%9$N<h$l$F$$$k(B``$B<}=L(B''
573 $B!J(Bdeflate$B!K05=L%"%k%4%j%:%`(B
574 $B!JCxL>$J(B \texttt{zip} $B%"!<%+%$%V7A<0$,F1Ey$N$b$N$r;HMQ$7$F$$$^$9!K(B
575 $B$r;HMQ$7$F$$$^$9!#(B
576 $B$7$+$7!"(B
577 $B%M%C%H%o!<%/1[$7$N%G!<%?E>Aw$N:]$K$O!"(B
578 Mercurial $B$OMzNr%G!<%?$r05=L$7$^$;$s!#(B
580 $B%M%C%H%o!<%/@\B3$,(B HTTP $B7PM3$N>l9g!"(B
581 Mercurial $B$O%G!<%?DL?.$N7PO)A4BN$r!"(B
582 $B$h$jNI$$05=LN($rF@$i$l$k05=L%"%k%4%j%:%`(B
583 $B!J(B\texttt{bzip2} $B05=L$H$7$F9-$/;HMQ$5$l$F$$$k(B
584 Burrows-Wheeler $B%"%k%4%j%:%`!K$G:F05=L$7$^$9!#(B
585 $B%j%S%8%g%s>pJs8DJL$N05=L$G$O$J$/!"(B
586 \texttt{bzip2} $B%"%k%4%j%:%`$HDL?.7PO)A4BN$N05=L$H$$$&AH$_9g$o$;$K$9$k$3$H$G!"(B
587 $BE>Aw%G!<%?NL$rBgI}$KDc8:$9$k$3$H$,$G$-$^$9$N$G!"(B
588 $BKX$IA4$F$N%M%C%H%o!<%/7ABV$K$*$$$FNI9%$J@-G=$rH/4x$G$-$^$9!#(B
590 $B!J(B\command{ssh} $B$G$N@\B3$N>l9g!"(B
591 \command{ssh} $B<+?H$,05=L$r9T$&$3$H$,$G$-$k$N$G!"(B
592 Mercurial $B$O@\B37PO)$N:F05=L$r(B\emph{$B9T$$$^$;$s(B}
593 \footnote{$BLuCm(B: $BLu<T$N7P83$G$O!"(B
594 $B%5!<%PB&$N(B Python $B$,(B zlib $B$r;HMQ$G$-$J$$>l9g!"(B
595 ssh $B$G$N(B push/pull $B$,5!G=$7$J$+$C$?$N$G!"(B
596 Mercurial $B$N%5%$%H$K$bF1MM$N5-=R$,$"$j$^$9$,!"(B
597 $B$3$N5-=R$O>/!9DTjm$,9g$o$J$$5$$,$7$^$9!#(B}$B!K(B
599 \subsection{Read/write ordering and atomicity}
601 $BIT40A4$J=q$-9~$_FbMF$,MxMQ$5$l$k$3$H$N$J$$$h$&$KJ]>Z$9$k>e$G$O!"(B
602 $B%U%!%$%k$X$NDI2C=q$-9~$_$@$1$,A4$F$G$O$"$j$^$;$s!#(B
603 $B$b$&0lEY!"?^(B~\ref{fig:concepts:metadata}$B$r8+$F$$$?$@$1$l$P$o$+$k$h$&$K!"(B
604 changelog $BCf$N%j%S%8%g%sMWAG$O(B manifest $BCf$N%j%S%8%g%sMWAG$r!"(B
605 manifest $BCf$N%j%S%8%g%sMWAG$O(B filelog $BCf$N%j%S%8%g%sMWAG$r;X$7$F$$$^$9!#(B
606 $B$3$N3,AX9=B$$O0U?^E*$J$b$N$J$N$G$9!#(B
608 $B%G!<%?=q$-9~$_$N:]$K$O!"(B
609 filelog $B$*$h$S(B manifest $B$X$N=q$-9~$_$G%H%i%s%6%/%7%g%s$,3+;O$5$l!"(B
610 $B$3$l$i$X$N=q$-9~$_$,40N;$9$k$^$G$O(B
611 changelog $B$X$N=q$-9~$_$O9T$o$l$^$;$s!#(B
612 $BFI$_9~$_$N:]$K$O!"(B
613 changelog $B$r5/E@$H$7$F(B manifest$B!"(Bfilelog $B$N=g=x$GFI$_9~$_$r9T$$$^$9!#(B
615 changelog $B$X$N=q$-9~$_$K@hN)$C$F!"(B
616 $B>o$K(B filelog $B$*$h$S(B manifest $B$X$N=q$-9~$_$,40N;$7$F$$$k$N$G!"(B
617 changelog $B$+$i$NIT40A4$J(B manifest $B$X$N;2>H$rFI$_9~$`$3$H$b!"(B
618 manifest $B$+$i$NIT40A4$J(B filelog $B$X$N;2>H$rFI$_9~$`$3$H$b$"$j$^$;$s!#(B
620 \subsection{Concurrent access}
622 $BFI$_=q$-<j=g$HIT2DJ,@-J]>Z$K$h$j!"(B
623 $BNc$(FI$_9~$_$N:GCf$K=q$-9~$_$,9T$o$l$k$H$7$F$b!"(B
624 Mercurial $B$OFI$_9~$_$K$*$1$k%j%]%8%H%j$N(B\emph{$BGSB>(B}$B$rI,MW$H$7$^$;$s!#(B
625 $B$3$NFC@-$OBg5,LO2=$N:]$KHs>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$7$K:]$7$F!"(B
672 Mercurial $B$O%U%!%$%k$KBP$9$kGSB>$r9T$C$?$j$O$;$:!"(B
673 $B=q$-9~$_$N:]$K$N$_GSB>$r9T$$$^$9!#(B
674 $BIT40A4$J=q$-9~$_$r(B
675 dirstate $B7A<0%U%!%$%k$+$iFI$_=P$7$F$7$^$&$3$H$r2sHr$9$k$?$a!"(B
676 Mercurial $B$O(B
677 $BBP>](B dirstate $B7A<0%U%!%$%k$HF1$8%G%#%l%/%H%j$KFCM-$NL>A0$G%U%!%$%k$r=q$-=P$7!"(B
678 $B$3$N0l;~%U%!%$%k$r(B \filename{dirstate}
679 $B%U%!%$%k$X$HIT2DJ,$JA`:n$G2~L>$7$^$9!#(B
680 $B$=$N$?$a!"(B
681 \filename{dirstate} $B$H$$$&!VL>A0$N!W%U%!%$%k$O!"(B
682 $BIT40A4$J=q$-9~$_$r;}$?$J$$40A4$JFbMF$G$"$k$3$H$,J]>Z$5$l$^$9!#(B
684 \subsection{Avoiding seeks}
686 $BHf3SE*BgNL$N%G!<%?FI$_9~$_=hM}$KBP$7$F$9$i!"(B
687 $B%G%#%9%/%X%C%I$N%7!<%/$OHs>o$K%3%9%H$,9b$/$D$/$?$a!"(B
688 Mercurial $B$N@-G=3NJ]$N=EMW$JE@$O!"(B
689 $B%G%#%9%/%X%C%I$N%7!<%/$r6KNO2sHr$9$k$3$H$K$"$j$^$9!#(B
691 $BNc$($P(B dirstate $B7A<0$N$h$&$J%G!<%?$,!"(B
692 $BC10l$N%U%!%$%k$KJ]B8$5$l$kM}M3$,$3$3$K$"$j$^$9!#(B
693 Mercurial $B$K$h$j9=@.4IM}$5$l$k%G%#%l%/%H%j$4$H$K(B
694 \filename{dirstate} $B%U%!%$%k$,B8:_$9$k>l9g$O!"(B
695 $B%G%#%l%/%H%j$4$H$K%G%#%9%/%X%C%I$N%7!<%/$,H/@8$7F@$^$9!#(B
696 $B$=$N$h$&$J%G%#%9%/%X%C%I$N%7!<%/$r2sHr$9$k$?$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k(B---
718 $B$,%G%#%9%/;HMQNL:o8:$K$=$l$[$I8z2LE*$G$J$$$H$N;XE&$r<u$1$F$$$^$9!#(B
719 $B$=$l$O;v<B$G$O$"$j$^$9$,!"(B
720 $B%G%#%9%/MFNL$N3NJ]$O0B2A$G$"$j!"(B
721 OS $B$X$NJ#@=MW5a$rCY1d$9$k$3$H$K$h$j9b$$@-G=$rF@$k$3$H$,$G$-$^$9!#(B
722 $BJL$J;EAH$_$rMQ$$$k>l9g!"(B
723 $B@-G=$,Dc2<$7%=%U%H%&%'%"$NJ#;($5$,A}$7$^$9$N$G!"(B
724 $BF|!9$NMxMQ$K$*$1$k(B``$BBN46(B''$B$KHs>o$K1F6A$r5Z$\$7$^$9(B\footnote{$BLuCm(B:
725 $B$D$^$j!"(B
726 Mercurial $B$G$N%O!<%I%j%s%/$N;HMQ$O!"(B
727 $BJ#@=$r9T$&$3$H$K$h$k%G%#%9%/%X%C%I$N%7!<%/$rDc8:$9$k$N$,<g4c$G!"(B
728 $B%G%#%9%/;HMQNL$NDc8:$,<g4c$G$O$J$$!"(B
729 $B$H$$$&$3$H$G$9!#(B}$B!#(B
731 \subsection{Other contents of the dirstate}
732 \label{sec:concepts:dirstate}
734 $B%U%!%$%k$NJQ99$N:]$N(B Mercurial $B$X$NDLCN$,I,MW$J$$$3$H$+$i!"(B
735 $B%U%!%$%kJQ99$NM-L5$r8zN(E*$KH=Dj$9$k$?$a$K!"(B
736 $BFCJL$J>pJs$r3JG<$7$?(B dirstate $B7A<0%U%!%$%k$r;HMQ$7$^$9!#(B
737 $B:n6HNN0h%G%#%l%/%H%jCf$NA4$F$N%U%!%$%k$KBP$7$F!"(B
738 Mercurial $B$O%U%!%$%k$N:G=*JQ99F|;~$H$=$N;~E@$G$N%5%$%:$r(B
739 dirstate $B7A<0%U%!%$%k$K3JG<$7$F$$$^$9!#(B
741 \hgcmd{add}$B!"(B\hgcmd{remove}$B!"(B\hgcmd{rename} $B$J$$$7(B
742 \hgcmd{copy} $B$rL@<(E*$K;HMQ$7$?>l9g!"(B
743 Mercurial $B$O$3$N>pJs$r99?7$7$^$9$N$G!"(B
744 $B%3%_%C%H;~$N?6$kIq$$$rFCDj$G$-$^$9!#(B
746 Mercurial $B$,:n6HNN0h%G%#%l%/%H%jCf$N%U%!%$%k$r3NG'$9$k>l9g!"(B
747 $B:G=i$K%U%!%$%k$NJQ99F|;~$r3NG'$7$^$9!#(B
748 $BJQ99F|;~$,F10l$J$i$P!"%U%!%$%k$OJQ99$5$l$F$$$J$$H&$G$9!#(B
749 $B%U%!%$%k%5%$%:$,0[$J$C$F$$$k$J$i$P!"%U%!%$%k$OJQ99$5$l$F$$$kH&$G$9!#(B
750 $BJQ99F|;~$,0[$J$C$F$$$k$N$K%U%!%$%k%5%$%:$,F10l$N>l9g$K$N$_!"(B
751 $B%U%!%$%k$NFbMF$,0[$J$C$F$$$k$+H]$+$rH=Dj$9$k$?$a$K(B
752 Mercurial $B$O<B:]$K%U%!%$%k$NFbMF$rFI$_9~$_$^$9(B\footnote{$BLuCm(B:
753 Windows $B4D6-$G$N2~9TJQ49$r9T$C$F$$$k$h$&$J>l9g!"(B
754 $B%P%$%J%jHG$H%=!<%9HG$G%U%!%$%k%5%$%:$N;;=P<j=g$K0c$$$,$"$k$i$7$/!"(B
755 \hgcmd{diff} $B$,2?$b=PNO$7$J$$$N$K!"(B
756 \hgcmd{state} $B$G$O!VJQ99!W07$$$5$l$k$3$H$,5)$K$"$j$^$9!#(B}$B!#(B
757 $B$3$N$h$&$K6O$+$JDI2C>pJs$r3JG<$9$k$3$H$G!"(B
758 Mercurial $B$,I,MW$H$9$kFI$_9~$_%G!<%?NL$r7`E*$K8:$i$9$3$H$,$G$-!"(B
759 $BB>$N9=@.4IM}%7%9%F%`$HHf3S$7$FBgI}$K@-G=$,2~A1$5$l$F$$$^$9!#(B
761 %%% Local Variables:
762 %%% mode: latex
763 %%% TeX-master: "00book"
764 %%% End: