Mercurial > hgbook
changeset 366:4e746f46085c
finished tour-merge.tex
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Fri, 31 Oct 2008 22:21:35 +0900 |
parents | 427e0fed6d5e |
children | 586bd91d0c84 |
files | ja/todo.txt ja/tour-merge.tex |
diffstat | 2 files changed, 233 insertions(+), 113 deletions(-) [+] |
line wrap: on
line diff
--- a/ja/todo.txt Mon Oct 20 17:22:47 2008 +0900 +++ b/ja/todo.txt Fri Oct 31 22:21:35 2008 +0900 @@ -16,6 +16,6 @@ srcinstall.tex 100% template.tex 100% tour-basic.tex -tour-merge.tex 10% +tour-merge.tex 100% undo.tex 100% cmdref.tex 100%
--- a/ja/tour-merge.tex Mon Oct 20 17:22:47 2008 +0900 +++ b/ja/tour-merge.tex Fri Oct 31 22:21:35 2008 +0900 @@ -194,66 +194,115 @@ %\section{Merging conflicting changes} \section{$B%3%s%U%j%/%H$N$"$kJQ99$r%^!<%8$9$k(B} -Most merges are simple affairs, but sometimes you'll find yourself -merging changes where each modifies the same portions of the same -files. Unless both modifications are identical, this results in a -\emph{conflict}, where you have to decide how to reconcile the -different changes into something coherent. +%Most merges are simple affairs, but sometimes you'll find yourself +%merging changes where each modifies the same portions of the same +%files. Unless both modifications are identical, this results in a +%\emph{conflict}, where you have to decide how to reconcile the +%different changes into something coherent. + +$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 +$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 +$B99$,F1$8FbMF$G$J$$8B$j!$7k2L$O(B\emph{conflict}$B$H$J$k$?$a!$Aj0[$J$kJQ99$r@0(B +$B9g$5$;$k$h$&$K=$@5$9$kI,MW$,$"$k!%(B \begin{figure}[ht] \centering \grafix{tour-merge-conflict} - \caption{Conflicting changes to a document} +% \caption{Conflicting changes to a document} + \caption{$B%3%s%U%j%/%H$7$?%A%'%s%8%;%C%H(B} \label{fig:tour-merge:conflict} \end{figure} -Figure~\ref{fig:tour-merge:conflict} illustrates an instance of two -conflicting changes to a document. We started with a single version -of the file; then we made some changes; while someone else made -different changes to the same text. Our task in resolving the -conflicting changes is to decide what the file should look like. +%Figure~\ref{fig:tour-merge:conflict} illustrates an instance of two +%conflicting changes to a document. We started with a single version +%of the file; then we made some changes; while someone else made +%different changes to the same text. Our task in resolving the +%conflicting changes is to decide what the file should look like. + +1$B$D$N%I%-%e%a%s%H$KBP$7$F(B2$B$D$N%A%'%s%8%;%C%H$,%3%s%U%j%/%H$7$?MM;R$r(B +$B?^(B~\ref{fig:tour-merge:conflict}$B$K<($9!%(B + +$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 +$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 +$B%H$r2r7h$9$k$?$a!$%U%!%$%k$,$I$&$"$k$Y$-$+$rL@$i$+$K$7$h$&!%(B -Mercurial doesn't have a built-in facility for handling conflicts. -Instead, it runs an external program called \command{hgmerge}. This -is a shell script that is bundled with Mercurial; you can change it to -behave however you please. What it does by default is try to find one -of several different merging tools that are likely to be installed on -your system. It first tries a few fully automatic merging tools; if -these don't succeed (because the resolution process requires human -guidance) or aren't present, the script tries a few different -graphical merging tools. +%Mercurial doesn't have a built-in facility for handling conflicts. +%Instead, it runs an external program called \command{hgmerge}. This +%is a shell script that is bundled with Mercurial; you can change it to +%behave however you please. What it does by default is try to find one +%of several different merging tools that are likely to be installed on +%your system. It first tries a few fully automatic merging tools; if +%these don't succeed (because the resolution process requires human +%guidance) or aren't present, the script tries a few different +%graphical merging tools. -It's also possible to get Mercurial to run another program or script -instead of \command{hgmerge}, by setting the \envar{HGMERGE} -environment variable to the name of your preferred program. +Mercurial$B$OFbB"$N%3%s%U%j%/%H2r7h5!9=$r;}$?$J$$!%$=$NBe$o(B +$B$j!$(B\command{hgmerge}$B$H$$$&30It%3%^%s%I$r5/F0$9$k!%$3$l$O(BMercurial$B$KF1:-(B +$B$5$l$?%7%'%k%9%/%j%W%H$G!$5sF0$rJQ99$9$k$3$H$b2DG=$G$"$k!%(B +$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 +$BG=@-$N9b$$$$$/$D$+$N0[$J$C$?%^!<%8%D!<%k$N(B1$B$D$rA\$7=P$9$3$H$G$"$k!%(B +$B:G=i$K(B2,3$B$NA4<+F0$N%^!<%8%D!<%k$r;n$9!%$3$l$G$&$^$/$$$+$J$$>l9g!J2r7h%W(B +$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 +$BJL$N(B2,3$B$N%0%i%U%#%+%k%^!<%8%D!<%k$r;n$9!%(B + +%It's also possible to get Mercurial to run another program or script +%instead of \command{hgmerge}, by setting the \envar{HGMERGE} +%environment variable to the name of your preferred program. + +$B4D6-JQ?t(B\envar{HGMERGE}$B$K9%$_$N%W%m%0%i%`L>$r$r@_Dj$9$k$3$H$G!$(BMercurial +$B$,(B\command{hgmerge}$B0J30$N%9%/%j%W%H$r5/F0$9$k$h$&$K$9$k$3$H$b2DG=$G$"$k!%(B %\subsection{Using a graphical merge tool} \subsection{$B%0%i%U%#%+%k%^!<%8%D!<%k$N;HMQ(B} -My preferred graphical merge tool is \command{kdiff3}, which I'll use -to describe the features that are common to graphical file merging -tools. You can see a screenshot of \command{kdiff3} in action in -figure~\ref{fig:tour-merge:kdiff3}. The kind of merge it is -performing is called a \emph{three-way merge}, because there are three -different versions of the file of interest to us. The tool thus -splits the upper portion of the window into three panes: +%My preferred graphical merge tool is \command{kdiff3}, which I'll use +%to describe the features that are common to graphical file merging +%tools. You can see a screenshot of \command{kdiff3} in action in +%figure~\ref{fig:tour-merge:kdiff3}. The kind of merge it is +%performing is called a \emph{three-way merge}, because there are three +%different versions of the file of interest to us. The tool thus +%splits the upper portion of the window into three panes: + +$BI.<T$N9%$_$N%0%i%U%#%+%k%^!<%8%D!<%k$O(B\command{kdiff3}$B$J$N$G!$$3$l$r;H$C(B +$B$F%0%i%U%#%+%k%U%!%$%k%^!<%8%D!<%k$N5!G=$r@bL@$9$k!%(B +$B?^(B~\ref{fig:tour-merge:kdiff3}$B$K(B\command{kdiff3}$B$N<B:]$NF0:n$N%9%/%j!<%s(B +$B%7%g%C%H$r<($9!%:#CmL\$7$F$$$k%U%!%$%k$K$O(B3$B$D$N0[$J$C$?%P!<%8%g%s$,$"$k$?(B +$B$a!$$3$3$G<B9T$5$l$F$$$k$N$O(B\emph{3way$B%^!<%8(B}$B$G$"$k!%%D!<%k$O%&%#%s%I%&$N(B +$B>eIt$r(B3$B$D$N%Z!<%s$KJ,3d$7$F$$$k!%(B + \begin{itemize} -\item At the left is the \emph{base} version of the file, i.e.~the - most recent version from which the two versions we're trying to - merge are descended. -\item In the middle is ``our'' version of the file, with the contents - that we modified. -\item On the right is ``their'' version of the file, the one that - from the changeset that we're trying to merge with. +%\item At the left is the \emph{base} version of the file, i.e.~the +% most recent version from which the two versions we're trying to +% merge are descended. + \item $B:8$K$"$k$N$O%U%!%$%k$N(B\emph{$B%Y!<%9(B}$B%P!<%8%g%s$G$"$k!%$3$l$O$3$l$+(B + $B$i%^!<%8$7$h$&$H$9$k(B2$B$D$N%P!<%8%g%s$N?F$H$J$k:G$b:G6a$N%P!<%8%g%s(B + $B$G$"$k!%(B + +%\item In the middle is ``our'' version of the file, with the contents +% that we modified. + \item $BCf1{$K$"$k$N$O2f!9$,JQ99$r2C$($?%P!<%8%g%s$G$"$k!%(B + +%\item On the right is ``their'' version of the file, the one that +% from the changeset that we're trying to merge with. + \item $B1&$K$"$k$N$OB>$N?M$,JQ99$r2C$($?%P!<%8%g%s$G!$$3$l$+$i%^!<%8$7$h(B + $B$&$H$9$k$b$N$G$"$k!%(B \end{itemize} -In the pane below these is the current \emph{result} of the merge. -Our task is to replace all of the red text, which indicates unresolved -conflicts, with some sensible merger of the ``ours'' and ``theirs'' -versions of the file. + +%In the pane below these is the current \emph{result} of the merge. +%Our task is to replace all of the red text, which indicates unresolved +%conflicts, with some sensible merger of the ``ours'' and ``theirs'' +%versions of the file. -All four of these panes are \emph{locked together}; if we scroll -vertically or horizontally in any of them, the others are updated to -display the corresponding sections of their respective files. +$B$3$N2<$N%Z!<%s$K$O%^!<%8$N(B\emph{$B7k2L(B}$B$,$"$k!%@V;z$N9T$O%3%s%U%j%/%H$r<($7(B +$B$F$*$j!$2f!9$N%P!<%8%g%s$HB>$N?M$N%P!<%8%g%s$rCm0U?<$/%^!<%8$7$?7k2L$rMQ(B +$B$$$F$3$l$i$r$9$Y$FCV$-49$($k!%(B + +%All four of these panes are \emph{locked together}; if we scroll +%vertically or horizontally in any of them, the others are updated to +%display the corresponding sections of their respective files. + +4$B$D$N%Z!<%s$9$Y$F$O(B\emph{$BF14|(B}$B$7$F$*$j!"$I$l$+$r?bD>$^$?$O?eJ?$K%9%/%m!<(B +$B%k$9$k$H!"B>$N(B3$B$D$bBP1~$9$k2U=j$rI=<($9$k$h$&$K99?7$5$l$k!#(B \begin{figure}[ht] \centering @@ -263,105 +312,176 @@ \label{fig:tour-merge:kdiff3} \end{figure} -For each conflicting portion of the file, we can choose to resolve -the conflict using some combination of text from the base version, -ours, or theirs. We can also manually edit the merged file at any -time, in case we need to make further modifications. +%For each conflicting portion of the file, we can choose to resolve +%the conflict using some combination of text from the base version, +%ours, or theirs. We can also manually edit the merged file at any +%time, in case we need to make further modifications. + +$B%3%s%U%j%/%H$r2r7h$9$k$?$a$K!$%U%!%$%kCf$N%3%s%U%j%/%H$7$F$$$k$9$Y$F$NIt(B +$BJ,$KBP$7$F%Y!<%9%P!<%8%g%s!$2f!9$N%P!<%8%g%s!$JL$N?M!9$N%P!<%8%g%s$N%F%-(B +$B%9%H$rAH$_9g$o$;$FMQ$$$k!%$5$i$J$k=$@5$,I,MW$J>l9g$O!$%^!<%8$5$l$?%U%!%$(B +$B%k$r<jF0$GJT=8$9$k$3$H$b$G$-$k!%(B -There are \emph{many} file merging tools available, too many to cover -here. They vary in which platforms they are available for, and in -their particular strengths and weaknesses. Most are tuned for merging -files containing plain text, while a few are aimed at specialised file -formats (generally XML). +%There are \emph{many} file merging tools available, too many to cover +%here. They vary in which platforms they are available for, and in +%their particular strengths and weaknesses. Most are tuned for merging +%files containing plain text, while a few are aimed at specialised file +%formats (generally XML). + +\emph{$B?t!9$N(B}$B%^!<%8%D!<%k$,MxMQ2DG=$G$"$j!$$=$l$i$r%+%P!<$9$k$3$H$O$G$-$J(B +$B$$!%$=$l$i$O!$MxMQ2DG=$J%W%i%C%H%U%)!<%`$,0[$J$j!$$=$l$>$lD9=j$H<eE@$,0[(B +$B$J$k!%$[$H$s$I$,%W%l!<%s%F%-%9%H$r%^!<%8$9$k$h$&$K:n$i$l$F$$$k$,!$FCJL$J(B +$B%U%!%$%k%U%)!<%^%C%H!J(BXML$B!K$KFC2=$7$F$$$k$b$N$b$"$k!%(B %\subsection{A worked example} \subsection{$B<B9TNc(B} -In this example, we will reproduce the file modification history of -figure~\ref{fig:tour-merge:conflict} above. Let's begin by creating a -repository with a base version of our document. +%In this example, we will reproduce the file modification history of +%figure~\ref{fig:tour-merge:conflict} above. Let's begin by creating a +%repository with a base version of our document. +%\interaction{tour-merge-conflict.wife} +%We'll clone the repository and make a change to the file. +%\interaction{tour-merge-conflict.cousin} +%And another clone, to simulate someone else making a change to the +%file. (This hints at the idea that it's not all that unusual to merge +%with yourself when you isolate tasks in separate repositories, and +%indeed to find and resolve conflicts while doing so.) +%\interaction{tour-merge-conflict.son} +%Having created two different versions of the file, we'll set up an +%environment suitable for running our merge. +%\interaction{tour-merge-conflict.pull} + +$B$3$NNc$G$OA0=R$N?^(B~\ref{fig:tour-merge:conflict}$B$G$NJQ99MzNr$r:F8=$9$k!%(B +$BJ8=q$N%Y!<%9%P!<%8%g%s$r4^$`%j%]%8%H%j$r:n@.$9$k$3$H$+$i;O$a$k!%(B \interaction{tour-merge-conflict.wife} -We'll clone the repository and make a change to the file. +$B%j%]%8%H%j$r%3%T!<$7!$%U%!%$%k$KJQ99$r9T$&!%(B \interaction{tour-merge-conflict.cousin} -And another clone, to simulate someone else making a change to the -file. (This hints at the idea that it's not all that unusual to merge -with yourself when you isolate tasks in separate repositories, and -indeed to find and resolve conflicts while doing so.) +$BJL$N?M$,JQ99$r9T$&$N$r%7%_%e%l!<%H$9$k$?$a$K$b$&0l$D$N%/%m!<%s$r:n@.$9(B +$B$k!%!JJL!9$N%j%]%8%H%j$K3VN%$7$F9T$C$?:n6H$N7k2L$r%^!<%8$7!$%3%s%U%j%/%H(B +$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 \interaction{tour-merge-conflict.son} -Having created two different versions of the file, we'll set up an -environment suitable for running our merge. +$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 \interaction{tour-merge-conflict.pull} -In this example, I won't use Mercurial's normal \command{hgmerge} -program to do the merge, because it would drop my nice automated -example-running tool into a graphical user interface. Instead, I'll -set \envar{HGMERGE} to tell Mercurial to use the non-interactive -\command{merge} command. This is bundled with many Unix-like systems. -If you're following this example on your computer, don't bother -setting \envar{HGMERGE}. -\interaction{tour-merge-conflict.merge} -Because \command{merge} can't resolve the conflicting changes, it -leaves \emph{merge markers} inside the file that has conflicts, -indicating which lines have conflicts, and whether they came from our -version of the file or theirs. +%In this example, I won't use Mercurial's normal \command{hgmerge} +%program to do the merge, because it would drop my nice automated +%example-running tool into a graphical user interface. Instead, I'll +%set \envar{HGMERGE} to tell Mercurial to use the non-interactive +%\command{merge} command. This is bundled with many Unix-like systems. +%If you're following this example on your computer, don't bother +%setting \envar{HGMERGE}. +%\interaction{tour-merge-conflict.merge} +%Because \command{merge} can't resolve the conflicting changes, it +%leaves \emph{merge markers} inside the file that has conflicts, +%indicating which lines have conflicts, and whether they came from our +%version of the file or theirs. -Mercurial can tell from the way \command{merge} exits that it wasn't -able to merge successfully, so it tells us what commands we'll need to -run if we want to redo the merging operation. This could be useful -if, for example, we were running a graphical merge tool and quit -because we were confused or realised we had made a mistake. +$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 +$B$$!%$3$N%3%^%s%I$O<+F02=$5$l$?%0%i%U%#%+%k%f!<%6%$%s%?!<%U%'%$%9$N%^!<%8(B +$B%D!<%k$r5/F0$7$F$7$^$&$+$i$G$"$k!%$=$NBe$o$j(B\envar{HGMERGE}$B$r@_Dj$7(B +$B$F!$(BMercurial$B$KHsBPOCE*$J(B\command{merge}$B%3%^%s%I$r5/F0$5$;$k!%$3$l$OB?$/(B +$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 +$B$G<B9T$9$k;~$K$O(B\envar{HGMERGE}$B$r@_Dj$9$kI,MW$O$J$$!%(B +\interaction{tour-merge-conflict.merge} \command{merge}$B%3%^%s%I$O%A%'%s%8(B +$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 +$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 +$B%H$,<j85$NJQ99$HB>$N?M$NJQ99$N$$$:$l$+$iMh$F$$$k$N$+$r<($9!%(B -If automatic or manual merges fail, there's nothing to prevent us from -``fixing up'' the affected files ourselves, and committing the results -of our merge: +%Mercurial can tell from the way \command{merge} exits that it wasn't +%able to merge successfully, so it tells us what commands we'll need to +%run if we want to redo the merging operation. This could be useful +%if, for example, we were running a graphical merge tool and quit +%because we were confused or realised we had made a mistake. + +Mercurial$B$O(B\command{merge}$B%3%^%s%I$G@5$7$/%^!<%8$G$-$J$+$C$?>l9g!$$b$&0l(B +$BEY%^!<%8$r9T$&$?$a$K$I$N$h$&$K$9$l$P$$$$$N$+$rI=<($9$k!%$3$l$O!$%0%i%U%#(B +$B%+%k%^!<%8%D!<%k$N;HMQCf$K:.Mp$rMh$7$?$+4V0c$$$rHH$7$?$3$H$K5$IU$$$?$?$a(B +$B$K=*N;$7$?>l9g$J$I$KM-8z$G$"$m$&!%(B + +%If automatic or manual merges fail, there's nothing to prevent us from +%``fixing up'' the affected files ourselves, and committing the results +%of our merge: +%\interaction{tour-merge-conflict.commit} + +$B<+F0$^$?$O<jF0$K$h$k%^!<%8$,<:GT$7$?>l9g!$1F6A$r<u$1$k%U%!%$%k$r(B``$B=$@5(B'' +$B$7$F%^!<%8$N7k2L$r%3%_%C%H$7$J$1$l$P$J$i$J$$!%(B \interaction{tour-merge-conflict.commit} + %\section{Simplifying the pull-merge-commit sequence} \section{pull-merge-commit$B<j=g$r4JC1$K$9$k(B} \label{sec:tour-merge:fetch} -The process of merging changes as outlined above is straightforward, -but requires running three commands in sequence. +%The process of merging changes as outlined above is straightforward, +%but requires running three commands in sequence. +$BA0@a$G35MW$r=R$Y$?%A%'%s%8%;%C%H$N%^!<%8%W%m%;%9$OC1=c$J$b$N$@$C$?$,!$(B3 +$B$D$N%3%^%s%I$r=g$KMQ$$$kI,MW$,$"$C$?!%(B + \begin{codesample2} hg pull hg merge hg commit -m 'Merged remote changes' \end{codesample2} -In the case of the final commit, you also need to enter a commit -message, which is almost always going to be a piece of uninteresting -``boilerplate'' text. +%In the case of the final commit, you also need to enter a commit +%message, which is almost always going to be a piece of uninteresting +%``boilerplate'' text. +$B:G8e$N%3%_%C%H$G$O!$$[$H$s$IB`6~$J%\%$%i!<%W%l!<%H%F%-%9%H$H8@$C$F$b$h$$(B +$B%3%_%C%H%a%C%;!<%8$NF~NO$bI,MW$G$"$C$?!%(B + +%It would be nice to reduce the number of steps needed, if this were +%possible. Indeed, Mercurial is distributed with an extension called +%\hgext{fetch} that does just this. -It would be nice to reduce the number of steps needed, if this were -possible. Indeed, Mercurial is distributed with an extension called -\hgext{fetch} that does just this. +$B2DG=$G$"$l$PI,MW$J%9%F%C%W?t$r>/$J$/$9$k$3$H$,$G$-$k$H$h$$!%<B$O(B +Mercurial$B$O(B\hgext{fetch}$B$H$$$&!$$^$5$K$3$N$3$H$r9T$&%(%/%9%F%s%7%g%s$rF1(B +$B:-$7$F$$$k!%(B -Mercurial provides a flexible extension mechanism that lets people -extend its functionality, while keeping the core of Mercurial small -and easy to deal with. Some extensions add new commands that you can -use from the command line, while others work ``behind the scenes,'' -for example adding capabilities to the server. +%Mercurial provides a flexible extension mechanism that lets people +%extend its functionality, while keeping the core of Mercurial small +%and easy to deal with. Some extensions add new commands that you can +%use from the command line, while others work ``behind the scenes,'' +%for example adding capabilities to the server. + +Mercurial$B$O%3%"$r>.$5$/!$07$$$d$9$/J]$C$?$^$^5!G=$r3HD%$G$-$k=@Fp$J%(%96e(B +$B%F%s%7%g%s%a%+%K%:%`$rDs6!$7$F$$$k!%%3%^%s%I%i%$%s$+$iMxMQ$G$-$k?7$7$$%3(B +$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 +$B$P%5!<%P$K5!G=$rDI2C$9$k$h$&$J$b$N$b$"$k!%(B -The \hgext{fetch} extension adds a new command called, not -surprisingly, \hgcmd{fetch}. This extension acts as a combination of -\hgcmd{pull}, \hgcmd{update} and \hgcmd{merge}. It begins by pulling -changes from another repository into the current repository. If it -finds that the changes added a new head to the repository, it begins a -merge, then commits the result of the merge with an -automatically-generated commit message. If no new heads were added, -it updates the working directory to the new tip changeset. +%The \hgext{fetch} extension adds a new command called, not +%surprisingly, \hgcmd{fetch}. This extension acts as a combination of +%\hgcmd{pull}, \hgcmd{update} and \hgcmd{merge}. It begins by pulling +%changes from another repository into the current repository. If it +%finds that the changes added a new head to the repository, it begins a +%merge, then commits the result of the merge with an +%automatically-generated commit message. If no new heads were added, +%it updates the working directory to the new tip changeset. -Enabling the \hgext{fetch} extension is easy. Edit your -\sfilename{.hgrc}, and either go to the \rcsection{extensions} section -or create an \rcsection{extensions} section. Then add a line that -simply reads ``\Verb+fetch +''. +\hgext{fetch}$B%(%/%9%F%s%7%g%s$O$=$NL>$NDL$j$N?7$7$$%3%^%s%I(B\hgcmd{fetch} +$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 +\hgcmd{merge}$B$rAH$_9g$o$;$?F/$-$r$9$k!%$3$N%(%/%9%F%s%7%g%s$O$^$:B>$N%j%](B +$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 +$B$r9T$$!$%^!<%87k2L$r<+F0E*$K@8@.$5$l$?%3%_%C%H%a%C%;!<%8$H6&$K%3%_%C%H$9(B +$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 +$B%0%G%#%l%/%H%j$r99?7$9$k!%(B + +%Enabling the \hgext{fetch} extension is easy. Edit your +%\sfilename{.hgrc}, and either go to the \rcsection{extensions} section +%or create an \rcsection{extensions} section. Then add a line that +%simply reads ``\Verb+fetch +''. +$B4JC1$K(B\hgext{fetch}$B%(%/%9%F%s%7%g%s$rM-8z$K$9$k$3$H$,$G$-(B +$B$k!%(B\sfilename{.hgrc}$B%U%!%$%k$N(B\rcsection{extensions}$B%;%/%7%g%s$rJT=8!JB8(B +$B:_$7$J$1$l$PDI2C$9$k!K$7!$(B``\Verb+fetch +''$B$H$$$&9T$rDI2C$9$l$P$h$$!%(B \begin{codesample2} [extensions] fetch = \end{codesample2} -(Normally, on the right-hand side of the ``\texttt{=}'' would appear -the location of the extension, but since the \hgext{fetch} extension -is in the standard distribution, Mercurial knows where to search for -it.) +%(Normally, on the right-hand side of the ``\texttt{=}'' would appear +%the location of the extension, but since the \hgext{fetch} extension +%is in the standard distribution, Mercurial knows where to search for +%it.) +$B!JDL>o!$1&JU$N(B``\texttt{=}''$B$O%(%/%9%F%s%7%g%s$NCV$+$l$?>l=j$rI=$9(B +$B$,!$(B\hgext{fetch}$B%(%/%9%F%s%7%g%s$OI8=`G[I[J*$K4^$^$l$k$?$a!$(BMercurial$B$O(B +$B$=$N=j:_$r$9$G$KCN$C$F$$$k!%!K(B %%% Local Variables: %%% mode: yatex