hgbook
changeset 7:339e75288632
More progress on MQ chapter and general support.
Added a note environment.
Fixed generated HTML so it wouldn't use huge escaped entities for everything.
Wrote a small amount of actual content.
Added a note environment.
Fixed generated HTML so it wouldn't use huge escaped entities for everything.
Wrote a small amount of actual content.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Mon Jun 26 12:25:11 2006 -0700 (2006-06-26) |
parents | 69d90ab9fd80 |
children | a25335b56825 |
files | en/99defs.tex en/Makefile en/examples/mq.tutorial en/mq.tex |
line diff
1.1 --- a/en/99defs.tex Mon Jun 26 10:15:49 2006 -0700 1.2 +++ b/en/99defs.tex Mon Jun 26 12:25:11 2006 -0700 1.3 @@ -4,6 +4,9 @@ 1.4 \newcommand{\hgcmd}[1]{``\texttt{hg #1}''} 1.5 \newcommand{\hgcmdargs}[2]{``\texttt{hg #1 #2}''} 1.6 1.7 +\newsavebox{\notebox} 1.8 +\newenvironment{note}{\begin{lrbox}{\notebox}\begin{minipage}{\textwidth}\textbf{Note:}\space}{\end{minipage}\end{lrbox}\fbox{\usebox{\notebox}}} 1.9 + 1.10 \DefineVerbatimEnvironment{codesample4}{Verbatim}{frame=single,gobble=4,numbers=left,commandchars=\\\{\}} 1.11 \newcommand{\interaction}[1]{\VerbatimInput[frame=single,numbers=left,commandchars=\\\{\}]{examples/#1.out}} 1.12
2.1 --- a/en/Makefile Mon Jun 26 10:15:49 2006 -0700 2.2 +++ b/en/Makefile Mon Jun 26 12:25:11 2006 -0700 2.3 @@ -6,7 +6,8 @@ 2.4 2.5 example-sources := \ 2.6 examples/run-example \ 2.7 - examples/mq.qinit-help 2.8 + examples/mq.qinit-help \ 2.9 + examples/mq.tutorial 2.10 2.11 latex-options = \ 2.12 -interaction batchmode \ 2.13 @@ -29,11 +30,16 @@ 2.14 2.15 define htlatex 2.16 mkdir -p $(dir $(1)) 2.17 - head -4 $(shell which htlatex) > $(dir $(1))/htlatex.book 2.18 + head -2 $(shell which htlatex) > $(dir $(1))/htlatex.book 2.19 + cp 99book.bib $(dir $@) 2.20 + echo '(cd $(dir $@) && bibtex $(basename $(notdir $@)))' >> $(dir $(1))/htlatex.book 2.21 + head -3 $(shell which htlatex) >> $(dir $(1))/htlatex.book 2.22 + echo 'echo status $$$$' >> $(dir $(1))/htlatex.book 2.23 chmod 755 $(dir $(1))/htlatex.book 2.24 $(dir $(1))/htlatex.book $(2) "xhtml,html4-uni,$(3)" " -cunihtf -utf8" "" "$(call latex-options,$(1))" || (rm -f $(1); exit 1) 2.25 cd $(dir $(1)) && tex4ht -f/$(basename $(notdir $(1))) -cvalidate -cunihtf 2.26 cd $(dir $(1)) && t4ht -f/$(basename $(notdir $(1))) 2.27 + perl -pi -e 's/�([0-7][0-9a-f]);/chr(hex($$1))/egi' $(dir $(1))/*.html 2.28 endef 2.29 2.30 html/onepage/hgbook.html: $(sources) examples 2.31 @@ -50,4 +56,4 @@ 2.32 cd examples && ./run-example 2.33 2.34 clean: 2.35 - rm -rf html pdf *.aux *.dvi *.log *.out 2.36 + rm -rf html pdf *.aux *.dvi *.log *.out examples/*.out examples/.run
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/en/examples/mq.tutorial Mon Jun 26 12:25:11 2006 -0700 3.3 @@ -0,0 +1,20 @@ 3.4 +echo '[extensions]' >> $HGRC 3.5 +echo 'hgext.mq =' >> $HGRC 3.6 + 3.7 +#$ name: qinit 3.8 + 3.9 +hg clone http://hg.serpentine.com/mercurial/hg mq-sandbox 3.10 + 3.11 +cd mq-sandbox 3.12 + 3.13 +hg qinit 3.14 + 3.15 +#$ name: qnew 3.16 + 3.17 +hg tip 3.18 + 3.19 +hg qnew first.patch 3.20 + 3.21 +ls .hg/patches 3.22 + 3.23 +hg tip
4.1 --- a/en/mq.tex Mon Jun 26 10:15:49 2006 -0700 4.2 +++ b/en/mq.tex Mon Jun 26 12:25:11 2006 -0700 4.3 @@ -133,7 +133,7 @@ 4.4 with the standard Mercurial distribution.) To enable MQ, edit your 4.5 \tildefile{.hgrc} file, and add the lines in figure~\ref{ex:mq:config}. 4.6 4.7 -\begin{figure} 4.8 +\begin{figure}[h] 4.9 \begin{codesample4} 4.10 [extensions] 4.11 hgext.mq = 4.12 @@ -143,15 +143,54 @@ 4.13 \end{figure} 4.14 4.15 Once the extension is enabled, it will make a number of new commands 4.16 -available. To verify that the extension is working, follow the 4.17 -example in figure~\ref{ex:mq:enabled}. 4.18 +available. To verify that the extension is working, you can use 4.19 +\hgcmd{help} to see if the \hgcmd{qinit} command is now available; see 4.20 +the example in figure~\ref{ex:mq:enabled}. 4.21 4.22 -\begin{figure} 4.23 +\begin{figure}[h] 4.24 \interaction{mq.qinit-help.help} 4.25 \caption{How to verify that MQ is enabled} 4.26 \label{ex:mq:enabled} 4.27 \end{figure} 4.28 4.29 +You can use MQ with \emph{any} Mercurial repository; to start, simply 4.30 +prepare the repository using the \hgcmd{qinit} command (see 4.31 +figure~\ref{ex:mq:qinit}). This command creates an empty directory 4.32 +called \filename{.hg/patches}, where MQ will keep its metadata. As 4.33 +with many Mercurial commands, the \hgcmd{qinit} command prints nothing 4.34 +if it succeeds. 4.35 + 4.36 +\begin{figure}[h] 4.37 + \interaction{mq.tutorial.qinit} 4.38 + \caption{Preparing a repository for use with MQ} 4.39 + \label{ex:mq:qinit} 4.40 +\end{figure} 4.41 + 4.42 +\begin{figure}[h] 4.43 + \interaction{mq.tutorial.qnew} 4.44 + \caption{Creating a new patch} 4.45 + \label{ex:mq:qnew} 4.46 +\end{figure} 4.47 + 4.48 +To commence work on a new patch, use the \hgcmd{qnew} command. This 4.49 +command takes one argument, the name of the patch to create. MQ will 4.50 +use this as the name of an actual file in the \filename{.hg/patches} 4.51 +directory, as you can see in figure~\ref{ex:mq:qnew}. 4.52 + 4.53 +Now also present in the \filename{.hg/patches} directory are two new 4.54 +files, \filename{series} and \filename{status}. The \filename{series} 4.55 +file lists all of the patches that MQ knows about for this repository, 4.56 +with one patch per line. The \filename{status} file lists all of the 4.57 +patches that MQ has \emph{applied} in this repository. 4.58 + 4.59 +\begin{note} 4.60 + You may sometimes want to edit the \filename{series} file by hand; 4.61 + for example, to change the sequence in which some patches are 4.62 + applied. However, manually editing the \filename{status} file is 4.63 + almost always a bad idea, as it's easy to corrupt MQ's idea of what 4.64 + is happening. 4.65 +\end{note} 4.66 + 4.67 %%% Local Variables: 4.68 %%% mode: latex 4.69 %%% TeX-master: "00book"