Mercurial > hgbook
comparison ja/tour-merge.tex @ 799:7107b79427a3
Propagate 4e23c220d1b0
Update chapter 2
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Thu, 18 Jun 2009 19:11:36 +0900 |
parents | 4e746f46085c |
children | 8a3041e6f3cb |
comparison
equal
deleted
inserted
replaced
798:09c1609f9bb2 | 799:7107b79427a3 |
---|---|
130 $B?7$7$$(Btip$B$X99?7$9$k$?$a$K(B\hgcmd{update}$B$r;H$C$?>l9g2?$,5/$-$k$+!)(B | 130 $B?7$7$$(Btip$B$X99?7$9$k$?$a$K(B\hgcmd{update}$B$r;H$C$?>l9g2?$,5/$-$k$+!)(B |
131 \interaction{tour.merge.update} | 131 \interaction{tour.merge.update} |
132 | 132 |
133 %Mercurial is telling us that the \hgcmd{update} command won't do a | 133 %Mercurial is telling us that the \hgcmd{update} command won't do a |
134 %merge; it won't update the working directory when it thinks we might | 134 %merge; it won't update the working directory when it thinks we might |
135 %be wanting to do a merge, unless we force it to do so. Instead, we | 135 %want to do a merge, unless we force it to do so. Instead, we |
136 %use the \hgcmd{merge} command to merge the two heads. | 136 %use the \hgcmd{merge} command to merge the two heads. |
137 %\interaction{tour.merge.merge} | 137 %\interaction{tour.merge.merge} |
138 | 138 |
139 Mercurial$B$O(B\hgcmd{update}$B%3%^%s%I$,%^!<%8$r9T$o$J$$$H%a%C%;!<%8$rI=<($9(B | 139 Mercurial$B$O(B\hgcmd{update}$B%3%^%s%I$,%^!<%8$r9T$o$J$$$H%a%C%;!<%8$rI=<($9(B |
140 $B$k!%(B \hgcmd{update}$B%3%^%s%I$O!$%^!<%8$,I,MW$H9M$($i$l$k>l9g$O!$%f!<%6$,(B | 140 $B$k!%(B \hgcmd{update}$B%3%^%s%I$O!$%^!<%8$,I,MW$H9M$($i$l$k>l9g$O!$%f!<%6$,(B |
141 $B!J%*%W%7%g%s$K$h$C$F!K6/@)$7$J$$8B$j%o!<%-%s%0%G%#%l%/%H%j$r99?7$7$J$$!%(B | 141 $B!J%*%W%7%g%s$K$h$C$F!K6/@)$7$J$$8B$j%o!<%-%s%0%G%#%l%/%H%j$r99?7$7$J$$!%(B |
142 $B0lJ}!$(B\hgcmd{merge}$B%3%^%s%I$O(B2$B$D$N%X%C%I$N%^!<%8$r9T$&!%(B | 142 $B0lJ}!$(B\hgcmd{merge}$B%3%^%s%I$O(B2$B$D$N%X%C%I$N%^!<%8$r9T$&!%(B |
143 \interaction{tour.merge.merge} | 143 \interaction{tour.merge.merge} |
144 | |
145 %This updates the working directory so that it contains changes from | |
146 %\emph{both} heads, which is reflected in both the output of | |
147 %\hgcmd{parents} and the contents of \filename{hello.c}. | |
148 %\interaction{tour.merge.parents} | |
149 | |
150 $B$3$NA`:n$K$h$C$F(B\hgcmd{parents}$B$H(B\filename{hello.c}$B$N=PNO$NAPJ}$rH?1G$9$k(B | |
151 \emph{$BAPJ}$N(B}head$B$+$i$NJQ99$r4^$`$h$&$K%o!<%-%s%0%G%#%l%/%H%j$,99?7$5$l$k!%(B | |
152 | |
153 %\subsection{Committing the results of the merge} | |
154 \subsection{$B%^!<%87k2L$r%3%_%C%H$9$k(B} | |
155 | |
156 %Whenever we've done a merge, \hgcmd{parents} will display two parents | |
157 %until we \hgcmd{commit} the results of the merge. | |
158 %\interaction{tour.merge.commit} | |
159 | |
160 $B%^!<%8$r9T$&$H!$%^!<%8$N7k2L$r(B\hgcmd{commit}$B$9$k$^$G!$(B\hgcmd{parents}$B$O(B2 | |
161 $B$D$N%Z%"%l%s%H$rI=<($9$k!%(B | |
162 \interaction{tour.merge.commit} | |
163 | |
164 %We now have a new tip revision; notice that it has \emph{both} of | |
165 %our former heads as its parents. These are the same revisions that | |
166 %were previously displayed by \hgcmd{parents}. | |
167 %\interaction{tour.merge.tip} | |
168 | |
169 $B?7$7$$(Btip$B%j%S%8%g%s$O0JA0$N%X%C%I(B\emph{$BN>J}(B}$B$r?F$H$7$F;}$D!%$3$l$i$O(B | |
170 \hgcmd{parents}$B%3%^%s%I$GI=<($7$?$N$HF1$8%j%S%8%g%s$G$"$k!%(B | |
171 \interaction{tour.merge.tip} | |
172 | |
173 %In figure~\ref{fig:tour-merge:merge}, you can see a representation of | |
174 %what happens to the working directory during the merge, and how this | |
175 %affects the repository when the commit happens. During the merge, the | |
176 %working directory has two parent changesets, and these become the | |
177 %parents of the new changeset. | |
178 | |
179 $B?^(B~\ref{fig:tour-merge:merge}$B$G!$%^!<%8$N4V$K%o!<%-%s%0%G%#%l%/%H%j$K2?$,(B | |
180 $B5/$-!$%3%_%C%H$7$?;~$K%j%]%8%H%j$K$I$&1F6A$9$k$N$+$r8+$k$3$H$,$G$-$k!%(B | |
181 $B%^!<%8$N4V!$%o!<%-%s%0%G%#%l%/%H%j$O(B2$B$D$N?F%A%'%s%8%;%C%H$r;}$A!$$3$l$i$O(B | |
182 $B?7$7$$%A%'%s%8%;%C%H$NN>?F$H$J$k!%(B | |
144 | 183 |
145 \begin{figure}[ht] | 184 \begin{figure}[ht] |
146 \centering | 185 \centering |
147 \grafix{tour-merge-merge} | 186 \grafix{tour-merge-merge} |
148 % \caption{Working directory and repository during merge, and | 187 % \caption{Working directory and repository during merge, and |
150 \caption{$B%^!<%8Cf$N%o!<%-%s%0%G%#%l%/%H%j$H%j%]%8%H%j$*$h$S8eB3$N%3%_%C(B | 189 \caption{$B%^!<%8Cf$N%o!<%-%s%0%G%#%l%/%H%j$H%j%]%8%H%j$*$h$S8eB3$N%3%_%C(B |
151 $B%H(B} | 190 $B%H(B} |
152 \label{fig:tour-merge:merge} | 191 \label{fig:tour-merge:merge} |
153 \end{figure} | 192 \end{figure} |
154 | 193 |
155 %This updates the working directory so that it contains changes from | 194 %We sometimes talk about a merge having \emph{sides}: the left side is |
156 %\emph{both} heads, which is reflected in both the output of | 195 %the first parent in the output of \hgcmd{parents}, and the right side is |
157 %\hgcmd{parents} and the contents of \filename{hello.c}. | 196 %the second. If the working directory was at e.g. revision 5 before we |
158 %\interaction{tour.merge.parents} | 197 %began a merge, that revision will become the left side of the merge. |
159 | 198 |
160 $B$3$NA`:n$K$h$C$F(B\hgcmd{parents}$B$H(B\filename{hello.c}$B$N=PNO$NAPJ}$rH?1G$9$k(B | 199 $B%^!<%8$K$h$j(B\emph{$B%5%$%I(B}$B$,$G$-$k$3$H$,$"$k!%:8$N%5%$%I$O(B\hgcmd{parents} |
161 \emph{$BAPJ}$N(B}head$B$+$i$NJQ99$r4^$`$h$&$K%o!<%-%s%0%G%#%l%/%H%j$,99?7$5$l$k!%(B | 200 $B$N=PNO$N:G=i$N?F$G!$1&$N%5%$%I$,(B2$BHVL\$N?F$G$"$k!%Nc$($P!$%^!<%8A0$K%o!<%-(B |
162 | 201 $B%s%0%G%#%l%/%H%j$,%j%S%8%g%s(B5$B$G$"$C$?$H$9$k$H!$%^!<%8$N:8$N%5%$%I$,$3$N(B |
163 %\subsection{Committing the results of the merge} | 202 $B%j%S%8%g%s$K$J$k!%(B |
164 \subsection{$B%^!<%87k2L$r%3%_%C%H$9$k(B} | |
165 | |
166 %Whenever we've done a merge, \hgcmd{parents} will display two parents | |
167 %until we \hgcmd{commit} the results of the merge. | |
168 %\interaction{tour.merge.commit} | |
169 | |
170 $B%^!<%8$r9T$&$H!$%^!<%8$N7k2L$r(B\hgcmd{commit}$B$9$k$^$G!$(B\hgcmd{parents}$B$O(B2 | |
171 $B$D$N%Z%"%l%s%H$rI=<($9$k!%(B | |
172 \interaction{tour.merge.commit} | |
173 | |
174 %We now have a new tip revision; notice that it has \emph{both} of | |
175 %our former heads as its parents. These are the same revisions that | |
176 %were previously displayed by \hgcmd{parents}. | |
177 %\interaction{tour.merge.tip} | |
178 | |
179 $B?7$7$$(Btip$B%j%S%8%g%s$O0JA0$N%X%C%I(B\emph{$BN>J}(B}$B$r?F$H$7$F;}$D!%$3$l$i$O(B | |
180 \hgcmd{parents}$B%3%^%s%I$GI=<($7$?$N$HF1$8%j%S%8%g%s$G$"$k!%(B | |
181 \interaction{tour.merge.tip} | |
182 | |
183 %In figure~\ref{fig:tour-merge:merge}, you can see a representation of | |
184 %what happens to the working directory during the merge, and how this | |
185 %affects the repository when the commit happens. During the merge, the | |
186 %working directory has two parent changesets, and these become the | |
187 %parents of the new changeset. | |
188 | |
189 $B?^(B~\ref{fig:tour-merge:merge}$B$G!$%^!<%8$N4V$K%o!<%-%s%0%G%#%l%/%H%j$K2?$,(B | |
190 $B5/$-!$%3%_%C%H$7$?;~$K%j%]%8%H%j$K$I$&1F6A$9$k$N$+$r8+$k$3$H$,$G$-$k!%(B | |
191 $B%^!<%8$N4V!$%o!<%-%s%0%G%#%l%/%H%j$O(B2$B$D$N?F%A%'%s%8%;%C%H$r;}$A!$$3$l$i$O(B | |
192 $B?7$7$$%A%'%s%8%;%C%H$NN>?F$H$J$k!%(B | |
193 | 203 |
194 %\section{Merging conflicting changes} | 204 %\section{Merging conflicting changes} |
195 \section{$B%3%s%U%j%/%H$N$"$kJQ99$r%^!<%8$9$k(B} | 205 \section{$B%3%s%U%j%/%H$N$"$kJQ99$r%^!<%8$9$k(B} |
196 | 206 |
197 %Most merges are simple affairs, but sometimes you'll find yourself | 207 %Most merges are simple affairs, but sometimes you'll find yourself |
198 %merging changes where each modifies the same portions of the same | 208 %merging changes where each side modifies the same portions of the same |
199 %files. Unless both modifications are identical, this results in a | 209 %files. Unless both modifications are identical, this results in a |
200 %\emph{conflict}, where you have to decide how to reconcile the | 210 %\emph{conflict}, where you have to decide how to reconcile the |
201 %different changes into something coherent. | 211 %different changes into something coherent. |
202 | 212 |
203 $BBgH>$N%^!<%8$O%7%s%W%k$J$b$N$@$,!$>l9g$K$h$C$F$OF1$8%U%!%$%k$NF1$82U=j$r(B | 213 $BBgH>$N%^!<%8$O%7%s%W%k$J$b$N$@$,!$F1$8%U%!%$%k$NF1$82U=j$rJQ99$9$k%A%'%s(B |
204 $BJQ99$7$F$$$k%A%'%s%8%;%C%H$r%^!<%8$7$J$1$l$P$J$i$J$$$3$H$,$"$k!%J#?t$NJQ(B | 214 $B%8%;%C%H$r%^!<%8$7$J$1$l$P$J$i$J$$$3$H$b$"$k!%3F!9$NJQ99$,F1$8FbMF$G$J$$(B |
205 $B99$,F1$8FbMF$G$J$$8B$j!$7k2L$O(B\emph{conflict}$B$H$J$k$?$a!$Aj0[$J$kJQ99$r@0(B | 215 $B8B$j!$7k2L$O(B\emph{conflict}$B$H$J$k$?$a!$JQ99$r@09g$5$;$k$h$&$K=$@5$9$kI,MW(B |
206 $B9g$5$;$k$h$&$K=$@5$9$kI,MW$,$"$k!%(B | 216 $B$,$"$k!%(B |
207 | 217 |
208 \begin{figure}[ht] | 218 \begin{figure}[ht] |
209 \centering | 219 \centering |
210 \grafix{tour-merge-conflict} | 220 \grafix{tour-merge-conflict} |
211 % \caption{Conflicting changes to a document} | 221 % \caption{Conflicting changes to a document} |
225 $B$3$3$G$O!$$"$k(B1$B$D$N%P!<%8%g%s$N%U%!%$%k$K$$$/$D$+$NJQ99$r2C$(!$F1;~$KJL$N(B | 235 $B$3$3$G$O!$$"$k(B1$B$D$N%P!<%8%g%s$N%U%!%$%k$K$$$/$D$+$NJQ99$r2C$(!$F1;~$KJL$N(B |
226 $B?M$,JL$NJQ99$rF1$8%F%-%9%H$KBP$7$F2C$($F$$$k!%%A%'%s%8%;%C%H$N%3%s%U%j%/(B | 236 $B?M$,JL$NJQ99$rF1$8%F%-%9%H$KBP$7$F2C$($F$$$k!%%A%'%s%8%;%C%H$N%3%s%U%j%/(B |
227 $B%H$r2r7h$9$k$?$a!$%U%!%$%k$,$I$&$"$k$Y$-$+$rL@$i$+$K$7$h$&!%(B | 237 $B%H$r2r7h$9$k$?$a!$%U%!%$%k$,$I$&$"$k$Y$-$+$rL@$i$+$K$7$h$&!%(B |
228 | 238 |
229 %Mercurial doesn't have a built-in facility for handling conflicts. | 239 %Mercurial doesn't have a built-in facility for handling conflicts. |
230 %Instead, it runs an external program called \command{hgmerge}. This | 240 %Instead, it runs an external program, usually one that displays some |
231 %is a shell script that is bundled with Mercurial; you can change it to | 241 %kind of graphical conflict resolution interface. By default, Mercurial |
232 %behave however you please. What it does by default is try to find one | 242 %tries to find one of several different merging tools that are likely to |
233 %of several different merging tools that are likely to be installed on | 243 %be installed on your system. It first tries a few fully automatic |
234 %your system. It first tries a few fully automatic merging tools; if | 244 %merging tools; if these don't succeed (because the resolution process |
235 %these don't succeed (because the resolution process requires human | 245 %requires human guidance) or aren't present, it tries a few different |
236 %guidance) or aren't present, the script tries a few different | |
237 %graphical merging tools. | 246 %graphical merging tools. |
238 | 247 |
239 Mercurial$B$OFbB"$N%3%s%U%j%/%H2r7h5!9=$r;}$?$J$$!%$=$NBe$o(B | 248 Mercurial$B$OFbB"$N%3%s%U%j%/%H2r7h5!9=$r;}$?$J$$!%$=$NBe$o$j!$2?$i$+$N%0%i(B |
240 $B$j!$(B\command{hgmerge}$B$H$$$&30It%3%^%s%I$r5/F0$9$k!%$3$l$O(BMercurial$B$KF1:-(B | 249 $B%U%#%+%k$J%3%s%U%j%/%H2r7h%$%s%?%U%'!<%9$rI=<($9$k30It%3%^%s%I$r5/F0$9(B |
241 $B$5$l$?%7%'%k%9%/%j%W%H$G!$5sF0$rJQ99$9$k$3$H$b2DG=$G$"$k!%(B | 250 $B$k!%%G%U%)%k%H$G(BMercurial$B$O%7%9%F%`$K%$%s%9%H!<%k$5$l$F$$$k2DG=@-$N9b$$$$(B |
242 $B%G%U%)%k%H$G$3$N%3%^%s%I$,9T$&$3$H$O!$%7%9%F%`$K%$%s%9%H!<%k$5$l$F$$$k2D(B | 251 $B$/$D$+$N%^!<%8%D!<%k$rA\$9!%(BMercurial$B$O:G=i$K(B2,3$B$NA4<+F0$N%^!<%8%D!<%k$r(B |
243 $BG=@-$N9b$$$$$/$D$+$N0[$J$C$?%^!<%8%D!<%k$N(B1$B$D$rA\$7=P$9$3$H$G$"$k!%(B | 252 $B;n$9!%$3$l$G$&$^$/$$$+$J$$>l9g!J2r7h%W%m%;%9$K?M$N%,%$%I$,I,MW$J>l9g!K$d(B |
244 $B:G=i$K(B2,3$B$NA4<+F0$N%^!<%8%D!<%k$r;n$9!%$3$l$G$&$^$/$$$+$J$$>l9g!J2r7h%W(B | 253 $B%D!<%k$,B8:_$7$J$$>l9g!$%9%/%j%W%H$OJL$N(B2,3$B$N%0%i%U%#%+%k%^!<%8%D!<%k$r;n(B |
245 $B%m%;%9$K?M$N%,%$%I$,I,MW$J$?$a!K$d%D!<%k$,B8:_$7$J$$>l9g!$%9%/%j%W%H$O(B | 254 $B$9!%(B |
246 $BJL$N(B2,3$B$N%0%i%U%#%+%k%^!<%8%D!<%k$r;n$9!%(B | |
247 | 255 |
248 %It's also possible to get Mercurial to run another program or script | 256 %It's also possible to get Mercurial to run another program or script |
249 %instead of \command{hgmerge}, by setting the \envar{HGMERGE} | 257 %instead of \command{hgmerge}, by setting the \envar{HGMERGE} |
250 %environment variable to the name of your preferred program. | 258 %environment variable to the name of your preferred program. |
251 | 259 |
361 $B$r2r>C$9$k$3$H$O>/$7$bDA$7$$$3$H$G$O$J$$$H$$$&;v$,$o$+$k$@$m$&!%(B $B!K(B | 369 $B$r2r>C$9$k$3$H$O>/$7$bDA$7$$$3$H$G$O$J$$$H$$$&;v$,$o$+$k$@$m$&!%(B $B!K(B |
362 \interaction{tour-merge-conflict.son} | 370 \interaction{tour-merge-conflict.son} |
363 $B%U%!%$%k$K(B2$B$D$NJL$N%P!<%8%g%s$r:n$j!$%^!<%8$r9T$&$N$KE*2<4D6-$r@_Dj$9$k!%(B | 371 $B%U%!%$%k$K(B2$B$D$NJL$N%P!<%8%g%s$r:n$j!$%^!<%8$r9T$&$N$KE*2<4D6-$r@_Dj$9$k!%(B |
364 \interaction{tour-merge-conflict.pull} | 372 \interaction{tour-merge-conflict.pull} |
365 | 373 |
366 %In this example, I won't use Mercurial's normal \command{hgmerge} | 374 %In this example, I'll set \envar{HGMERGE} to tell Mercurial to use the |
367 %program to do the merge, because it would drop my nice automated | 375 %non-interactive \command{merge} command. This is bundled with many |
368 %example-running tool into a graphical user interface. Instead, I'll | 376 %Unix-like systems. (If you're following this example on your computer, |
369 %set \envar{HGMERGE} to tell Mercurial to use the non-interactive | 377 %don't bother setting \envar{HGMERGE}.) |
370 %\command{merge} command. This is bundled with many Unix-like systems. | 378 |
371 %If you're following this example on your computer, don't bother | 379 $B$3$NNc$G$O(B\envar{HGMERGE}$B$r@_Dj$7$F!$(BMercurial$B$KHsBPOCE*$J(B |
372 %setting \envar{HGMERGE}. | 380 \command{merge}$B%3%^%s%I$r5/F0$5$;$k!%$3$l$OB?$/$N(BUnix$B7O%7%9%F%`$K%P%s%I%k(B |
373 %\interaction{tour-merge-conflict.merge} | 381 $B$5$l$F$$$k%3%^%s%I$G$"$k!%!J$3$NNc$r<j85$N%^%7%s$G<B9T$9$k;~$K$O(B |
374 %Because \command{merge} can't resolve the conflicting changes, it | 382 \envar{HGMERGE}$B$r@_Dj$9$kI,MW$O$J$$!%!K(B |
375 %leaves \emph{merge markers} inside the file that has conflicts, | |
376 %indicating which lines have conflicts, and whether they came from our | |
377 %version of the file or theirs. | |
378 | |
379 $B$3$NNc$G$O%^!<%8$K(BMercurial$B$NDL>o%3%^%s%I$G$"$k(B\command{hgmerge}$B$O;H$o$J(B | |
380 $B$$!%$3$N%3%^%s%I$O<+F02=$5$l$?%0%i%U%#%+%k%f!<%6%$%s%?!<%U%'%$%9$N%^!<%8(B | |
381 $B%D!<%k$r5/F0$7$F$7$^$&$+$i$G$"$k!%$=$NBe$o$j(B\envar{HGMERGE}$B$r@_Dj$7(B | |
382 $B$F!$(BMercurial$B$KHsBPOCE*$J(B\command{merge}$B%3%^%s%I$r5/F0$5$;$k!%$3$l$OB?$/(B | |
383 $B$N(BUnix$B7O%7%9%F%`$K%P%s%I%k$5$l$F$$$k%3%^%s%I$G$"$k!%$3$NNc$r<j85$N%^%7%s(B | |
384 $B$G<B9T$9$k;~$K$O(B\envar{HGMERGE}$B$r@_Dj$9$kI,MW$O$J$$!%(B | |
385 \interaction{tour-merge-conflict.merge} \command{merge}$B%3%^%s%I$O%A%'%s%8(B | |
386 $B%;%C%H$N%3%s%U%j%/%H$r2r7h$9$k$3$H$O$G$-$:!$(B\emph{merge markers}$B$r%3%s%U(B | |
387 $B%j%/%H$N$"$k%U%!%$%kFb$K;D$7!$$I$N9T$K%3%s%U%j%/%H$,$"$k$N$+!$%3%s%U%j%/(B | |
388 $B%H$,<j85$NJQ99$HB>$N?M$NJQ99$N$$$:$l$+$iMh$F$$$k$N$+$r<($9!%(B | |
389 | 383 |
390 %Mercurial can tell from the way \command{merge} exits that it wasn't | 384 %Mercurial can tell from the way \command{merge} exits that it wasn't |
391 %able to merge successfully, so it tells us what commands we'll need to | 385 %able to merge successfully, so it tells us what commands we'll need to |
392 %run if we want to redo the merging operation. This could be useful | 386 %run if we want to redo the merging operation. This could be useful |
393 %if, for example, we were running a graphical merge tool and quit | 387 %if, for example, we were running a graphical merge tool and quit |
416 %but requires running three commands in sequence. | 410 %but requires running three commands in sequence. |
417 $BA0@a$G35MW$r=R$Y$?%A%'%s%8%;%C%H$N%^!<%8%W%m%;%9$OC1=c$J$b$N$@$C$?$,!$(B3 | 411 $BA0@a$G35MW$r=R$Y$?%A%'%s%8%;%C%H$N%^!<%8%W%m%;%9$OC1=c$J$b$N$@$C$?$,!$(B3 |
418 $B$D$N%3%^%s%I$r=g$KMQ$$$kI,MW$,$"$C$?!%(B | 412 $B$D$N%3%^%s%I$r=g$KMQ$$$kI,MW$,$"$C$?!%(B |
419 | 413 |
420 \begin{codesample2} | 414 \begin{codesample2} |
421 hg pull | 415 hg pull -u |
422 hg merge | 416 hg merge |
423 hg commit -m 'Merged remote changes' | 417 hg commit -m 'Merged remote changes' |
424 \end{codesample2} | 418 \end{codesample2} |
425 %In the case of the final commit, you also need to enter a commit | 419 %In the case of the final commit, you also need to enter a commit |
426 %message, which is almost always going to be a piece of uninteresting | 420 %message, which is almost always going to be a piece of uninteresting |
447 $B%^%s%I$rDI2C$9$k$h$&$J%(%/%9%F%s%7%g%s$b$"$l$P!$L\$K8+$($J$$$H$3$m$GNc$((B | 441 $B%^%s%I$rDI2C$9$k$h$&$J%(%/%9%F%s%7%g%s$b$"$l$P!$L\$K8+$($J$$$H$3$m$GNc$((B |
448 $B$P%5!<%P$K5!G=$rDI2C$9$k$h$&$J$b$N$b$"$k!%(B | 442 $B$P%5!<%P$K5!G=$rDI2C$9$k$h$&$J$b$N$b$"$k!%(B |
449 | 443 |
450 %The \hgext{fetch} extension adds a new command called, not | 444 %The \hgext{fetch} extension adds a new command called, not |
451 %surprisingly, \hgcmd{fetch}. This extension acts as a combination of | 445 %surprisingly, \hgcmd{fetch}. This extension acts as a combination of |
452 %\hgcmd{pull}, \hgcmd{update} and \hgcmd{merge}. It begins by pulling | 446 %\hgopt{pull}{-u}, \hgcmd{merge} and \hgcmd{commit}. It begins by pulling |
453 %changes from another repository into the current repository. If it | 447 %changes from another repository into the current repository. If it |
454 %finds that the changes added a new head to the repository, it begins a | 448 %finds that the changes added a new head to the repository, it |
455 %merge, then commits the result of the merge with an | 449 %begins a merge, then (if the merge succeeded) commits the result |
456 %automatically-generated commit message. If no new heads were added, | 450 %of the merge with an automatically-generated commit message. If |
457 %it updates the working directory to the new tip changeset. | 451 %no new heads were added, it updates the working directory to the |
452 %new tip changeset. | |
458 | 453 |
459 \hgext{fetch}$B%(%/%9%F%s%7%g%s$O$=$NL>$NDL$j$N?7$7$$%3%^%s%I(B\hgcmd{fetch} | 454 \hgext{fetch}$B%(%/%9%F%s%7%g%s$O$=$NL>$NDL$j$N?7$7$$%3%^%s%I(B\hgcmd{fetch} |
460 $B$rDI2C$9$k!%$3$N%(%/%9%F%s%7%g%s$O(B\hgcmd{pull}$B$H(B\hgcmd{update}$B$*$h$S(B | 455 $B$rDI2C$9$k!%$3$N%(%/%9%F%s%7%g%s$O(B\hgopt{pull}{-u}$B$H(B\hgcmd{merge}$B$*$h$S(B |
461 \hgcmd{merge}$B$rAH$_9g$o$;$?F/$-$r$9$k!%$3$N%(%/%9%F%s%7%g%s$O$^$:B>$N%j%](B | 456 \hgcmd{commit}$B$rAH$_9g$o$;$?F/$-$r$9$k!%$3$N%(%/%9%F%s%7%g%s$O$^$:B>$N%j(B |
462 $B%8%H%j$+$iJQ99$r(Bpull$B$7!$%j%]%8%H%j$K?7$7$$%X%C%I$,DI2C$5$l$?>l9g$O%^!<%8(B | 457 $B%]%8%H%j$+$iJQ99$r(Bpull$B$7!$%j%]%8%H%j$K?7$7$$%X%C%I$,DI2C$5$l$?>l9g$O%^!<(B |
463 $B$r9T$$!$%^!<%87k2L$r<+F0E*$K@8@.$5$l$?%3%_%C%H%a%C%;!<%8$H6&$K%3%_%C%H$9(B | 458 $B%8$r9T$$!$!J%^!<%8$,@.8y$7$?>l9g!K%^!<%87k2L$r<+F0E*$K@8@.$5$l$?%3%_%C%H(B |
464 $B$k!%?7$?$J%X%C%I$,DI2C$5$l$J$+$C$?>l9g$O?7$?$J(Btip$B%A%'%s%8%;%C%H$X%o!<%-%s(B | 459 $B%a%C%;!<%8$H6&$K%3%_%C%H$9$k!%?7$?$J%X%C%I$,DI2C$5$l$J$+$C$?>l9g$O?7$?$J(B |
465 $B%0%G%#%l%/%H%j$r99?7$9$k!%(B | 460 tip$B%A%'%s%8%;%C%H$X%o!<%-%s%0%G%#%l%/%H%j$r99?7$9$k!%(B |
466 | 461 |
467 %Enabling the \hgext{fetch} extension is easy. Edit your | 462 %Enabling the \hgext{fetch} extension is easy. Edit the |
468 %\sfilename{.hgrc}, and either go to the \rcsection{extensions} section | 463 %\sfilename{.hgrc} in your home directory, and either go to the |
469 %or create an \rcsection{extensions} section. Then add a line that | 464 %\rcsection{extensions} section or create an \rcsection{extensions} |
470 %simply reads ``\Verb+fetch +''. | 465 %section. Then add a line that simply reads ``\Verb+fetch +''. |
471 $B4JC1$K(B\hgext{fetch}$B%(%/%9%F%s%7%g%s$rM-8z$K$9$k$3$H$,$G$-(B | 466 |
472 $B$k!%(B\sfilename{.hgrc}$B%U%!%$%k$N(B\rcsection{extensions}$B%;%/%7%g%s$rJT=8!JB8(B | 467 \hgext{fetch}$B%(%/%9%F%s%7%g%s$O4JC1$KM-8z$K$9$k$3$H$,$G$-$k!%%[!<%`%G%#%l(B |
473 $B:_$7$J$1$l$PDI2C$9$k!K$7!$(B``\Verb+fetch +''$B$H$$$&9T$rDI2C$9$l$P$h$$!%(B | 468 $B%/%H%j$N(B\sfilename{.hgrc}$B%U%!%$%k$rJT=8$7!$(B\rcsection{extensions}$B%;%/%7%g(B |
469 $B%s$K(B``\Verb+fetch +''$B$H$$$&9T$rDI2C$9$l$P$h$$!%(B | |
474 \begin{codesample2} | 470 \begin{codesample2} |
475 [extensions] | 471 [extensions] |
476 fetch = | 472 fetch = |
477 \end{codesample2} | 473 \end{codesample2} |
478 %(Normally, on the right-hand side of the ``\texttt{=}'' would appear | 474 %(Normally, the right-hand side of the ``\texttt{=}'' would indicate |
479 %the location of the extension, but since the \hgext{fetch} extension | 475 %where to find the extension, but since the \hgext{fetch} extension is in |
480 %is in the standard distribution, Mercurial knows where to search for | 476 %the standard distribution, Mercurial knows where to search for it.) |
481 %it.) | |
482 $B!JDL>o!$1&JU$N(B``\texttt{=}''$B$O%(%/%9%F%s%7%g%s$NCV$+$l$?>l=j$rI=$9(B | 477 $B!JDL>o!$1&JU$N(B``\texttt{=}''$B$O%(%/%9%F%s%7%g%s$NCV$+$l$?>l=j$rI=$9(B |
483 $B$,!$(B\hgext{fetch}$B%(%/%9%F%s%7%g%s$OI8=`G[I[J*$K4^$^$l$k$?$a!$(BMercurial$B$O(B | 478 $B$,!$(B\hgext{fetch}$B%(%/%9%F%s%7%g%s$OI8=`G[I[J*$K4^$^$l$k$?$a!$(BMercurial$B$O(B |
484 $B$=$N=j:_$r$9$G$KCN$C$F$$$k!%!K(B | 479 $B$=$N=j:_$r$9$G$KCN$C$F$$$k!%!K(B |
485 | 480 |
486 %%% Local Variables: | 481 %%% Local Variables: |