hgbook
diff en/tour-merge.tex @ 99:06383f9e46e4
More graphics.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Mon Oct 16 14:54:37 2006 -0700 (2006-10-16) |
parents | 47ea206351d5 |
children | 272146fab009 |
line diff
1.1 --- a/en/tour-merge.tex Fri Oct 13 14:00:06 2006 -0700 1.2 +++ b/en/tour-merge.tex Mon Oct 16 14:54:37 2006 -0700 1.3 @@ -27,17 +27,46 @@ 1.4 in it. 1.5 \interaction{tour.merge.clone} 1.6 We should now have two copies of \filename{hello.c} with different 1.7 -contents. 1.8 +contents. The histories of the two repositories have also diverged, 1.9 +as illustrated in figure~\ref{fig:tour-merge:sep-repos}. 1.10 \interaction{tour.merge.cat} 1.11 1.12 +\begin{figure}[ht] 1.13 + \centering 1.14 + \grafix{tour-merge-sep-repos} 1.15 + \caption{Divergent recent histories of the \dirname{my-hello} and 1.16 + \dirname{my-new-hello} repositories} 1.17 + \label{fig:tour-merge:sep-repos} 1.18 +\end{figure} 1.19 + 1.20 We already know that pulling changes from our \dirname{my-hello} 1.21 repository will have no effect on the working directory. 1.22 \interaction{tour.merge.pull} 1.23 However, the \hgcmd{pull} command says something about ``heads''. 1.24 1.25 -A head is a change that has no descendants. The tip revision is thus 1.26 -a head, but a repository can contain more than one head. We can view 1.27 -them using the \hgcmd{heads} command. 1.28 +A head is a change that has no descendants, or children, as they're 1.29 +also known. The tip revision is thus a head, because the newest 1.30 +revision in a repository doesn't have any children, but a repository 1.31 +can contain more than one head. 1.32 + 1.33 +\begin{figure}[ht] 1.34 + \centering 1.35 + \grafix{tour-merge-pull} 1.36 + \caption{Repository contents after pulling from \dirname{my-hello} into 1.37 + \dirname{my-new-hello}} 1.38 + \label{fig:tour-merge:pull} 1.39 +\end{figure} 1.40 + 1.41 +In figure~\ref{fig:tour-merge:pull}, you can see the effect of the 1.42 +pull from \dirname{my-hello} into \dirname{my-new-hello}. The history 1.43 +that was already present in \dirname{my-new-hello} is untouched, but a 1.44 +new revision has been added. By referring to 1.45 +figure~\ref{fig:tour-merge:sep-repos}, we can see that the 1.46 +\emph{changeset ID} remains the same in the new repository, but the 1.47 +\emph{revision number} has changed. (This, incidentally, is a fine 1.48 +example of why it's not safe to use revision numbers when discussing 1.49 +changesets.) We can view the heads in a repository using the 1.50 +\hgcmd{heads} command. 1.51 \interaction{tour.merge.heads} 1.52 What happens if we try to use the normal \hgcmd{update} command to 1.53 update to the new tip?