Mercurial > hgbook
annotate en/ch02-tour-basic.xml @ 670:3bcc001ce34f
Get rid of lots of TeX-era cruft.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Mon, 09 Mar 2009 23:37:19 -0700 |
parents | 27043f385f3f |
children | 13513d2a128d |
rev | line source |
---|---|
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
1 <!-- vim: set filetype=docbkxml shiftwidth=2 autoindent expandtab tw=77 : --> |
84 | 2 |
658
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
3 <chapter id="chap:tour-basic"> |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
4 <title>A tour of Mercurial: the basics</title> |
84 | 5 |
658
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
6 <sect1 id="sec:tour:install"> |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
7 <title>Installing Mercurial on your system</title> |
85
b7c69a68b0cc
A little progress on "lightning tour".
Bryan O'Sullivan <bos@serpentine.com>
parents:
84
diff
changeset
|
8 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
9 <para>Prebuilt binary packages of Mercurial are available for |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
10 every popular operating system. These make it easy to start |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
11 using Mercurial on your computer immediately.</para> |
84 | 12 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
13 <sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
14 <title>Linux</title> |
84 | 15 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
16 <para>Because each Linux distribution has its own packaging |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
17 tools, policies, and rate of development, it's difficult to |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
18 give a comprehensive set of instructions on how to install |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
19 Mercurial binaries. The version of Mercurial that you will |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
20 end up with can vary depending on how active the person is who |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
21 maintains the package for your distribution.</para> |
84 | 22 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
23 <para>To keep things simple, I will focus on installing |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
24 Mercurial from the command line under the most popular Linux |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
25 distributions. Most of these distributions provide graphical |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
26 package managers that will let you install Mercurial with a |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
27 single click; the package name to look for is |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
28 <literal>mercurial</literal>.</para> |
84 | 29 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
30 <itemizedlist> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
31 <listitem><para>Debian:</para> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
32 <programlisting>apt-get install |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
33 mercurial</programlisting></listitem> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
34 <listitem><para>Fedora Core:</para> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
35 <programlisting>yum install |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
36 mercurial</programlisting></listitem> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
37 <listitem><para>Gentoo:</para> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
38 <programlisting>emerge mercurial</programlisting></listitem> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
39 <listitem><para>OpenSUSE:</para> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
40 <programlisting>yum install |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
41 mercurial</programlisting></listitem> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
42 <listitem><para>Ubuntu: Ubuntu's Mercurial package is based on |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
43 Debian's. To install it, run the following |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
44 command.</para> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
45 <programlisting>apt-get install |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
46 mercurial</programlisting></listitem> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
47 </itemizedlist> |
84 | 48 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
49 </sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
50 <sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
51 <title>Solaris</title> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
52 |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
53 <para>SunFreeWare, at <ulink |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
54 url="http://www.sunfreeware.com">http://www.sunfreeware.com</ulink>, |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
55 is a good source for a large number of pre-built Solaris |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
56 packages for 32 and 64 bit Intel and Sparc architectures, |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
57 including current versions of Mercurial.</para> |
84 | 58 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
59 </sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
60 <sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
61 <title>Mac OS X</title> |
84 | 62 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
63 <para>Lee Cantey publishes an installer of Mercurial for Mac OS |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
64 X at <ulink |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
65 url="http://mercurial.berkwood.com">http://mercurial.berkwood.com</ulink>. |
658
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
66 This package works on both Intel- and Power-based Macs. Before |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
67 you can use it, you must install a compatible version of |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
68 Universal MacPython <citation>web:macpython</citation>. This |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
69 is easy to do; simply follow the instructions on Lee's |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
70 site.</para> |
264 | 71 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
72 <para>It's also possible to install Mercurial using Fink or |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
73 MacPorts, two popular free package managers for Mac OS X. If |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
74 you have Fink, use <command>sudo apt-get install |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
75 mercurial-py25</command>. If MacPorts, <command>sudo port |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
76 install mercurial</command>.</para> |
84 | 77 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
78 </sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
79 <sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
80 <title>Windows</title> |
84 | 81 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
82 <para>Lee Cantey publishes an installer of Mercurial for Windows |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
83 at <ulink |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
84 url="http://mercurial.berkwood.com">http://mercurial.berkwood.com</ulink>. |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
85 This package has no external dependencies; it <quote>just |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
86 works</quote>.</para> |
412 | 87 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
88 <note> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
89 <para> The Windows version of Mercurial does not |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
90 automatically convert line endings between Windows and Unix |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
91 styles. If you want to share work with Unix users, you must |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
92 do a little additional configuration work. XXX Flesh this |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
93 out.</para> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
94 </note> |
84 | 95 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
96 </sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
97 </sect1> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
98 <sect1> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
99 <title>Getting started</title> |
84 | 100 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
101 <para>To begin, we'll use the <command role="hg-cmd">hg |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
102 version</command> command to find out whether Mercurial is |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
103 actually installed properly. The actual version information |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
104 that it prints isn't so important; it's whether it prints |
658
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
105 anything at all that we care about.</para> |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
106 |
665
27043f385f3f
Get autogeneration of examples more or less working.
Bryan O'Sullivan <bos@serpentine.com>
parents:
658
diff
changeset
|
107 &interaction.tour.version; |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
108 |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
109 <sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
110 <title>Built-in help</title> |
87 | 111 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
112 <para>Mercurial provides a built-in help system. This is |
658
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
113 invaluable for those times when you find yourself stuck |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
114 trying to remember how to run a command. If you are |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
115 completely stuck, simply run <command role="hg-cmd">hg |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
116 help</command>; it will print a brief list of commands, |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
117 along with a description of what each does. If you ask for |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
118 help on a specific command (as below), it prints more |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
119 detailed information.</para> |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
120 |
665
27043f385f3f
Get autogeneration of examples more or less working.
Bryan O'Sullivan <bos@serpentine.com>
parents:
658
diff
changeset
|
121 &interaction.tour.help; |
658
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
122 |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
123 <para>For a more impressive level of detail (which you won't |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
124 usually need) run <command role="hg-cmd">hg help <option |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
125 role="hg-opt-global">-v</option></command>. The <option |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
126 role="hg-opt-global">-v</option> option is short for |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
127 <option role="hg-opt-global">--verbose</option>, and tells |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
128 Mercurial to print more information than it usually |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
129 would.</para> |
87 | 130 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
131 </sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
132 </sect1> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
133 <sect1> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
134 <title>Working with a repository</title> |
87 | 135 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
136 <para>In Mercurial, everything happens inside a |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
137 <emphasis>repository</emphasis>. The repository for a project |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
138 contains all of the files that <quote>belong to</quote> that |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
139 project, along with a historical record of the project's |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
140 files.</para> |
87 | 141 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
142 <para>There's nothing particularly magical about a repository; it |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
143 is simply a directory tree in your filesystem that Mercurial |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
144 treats as special. You can rename or delete a repository any |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
145 time you like, using either the command line or your file |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
146 browser.</para> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
147 |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
148 <sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
149 <title>Making a local copy of a repository</title> |
87 | 150 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
151 <para><emphasis>Copying</emphasis> a repository is just a little |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
152 bit special. While you could use a normal file copying |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
153 command to make a copy of a repository, it's best to use a |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
154 built-in command that Mercurial provides. This command is |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
155 called <command role="hg-cmd">hg clone</command>, because it |
658
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
156 creates an identical copy of an existing repository.</para> |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
157 |
665
27043f385f3f
Get autogeneration of examples more or less working.
Bryan O'Sullivan <bos@serpentine.com>
parents:
658
diff
changeset
|
158 &interaction.tour.clone; |
658
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
159 |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
160 <para>If our clone succeeded, we should now have a local |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
161 directory called <filename class="directory">hello</filename>. |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
162 This directory will contain some files.</para> |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
163 |
665
27043f385f3f
Get autogeneration of examples more or less working.
Bryan O'Sullivan <bos@serpentine.com>
parents:
658
diff
changeset
|
164 &interaction.tour.ls; |
658
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
165 |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
166 <para>These files have the same contents and history in our |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
167 repository as they do in the repository we cloned.</para> |
87 | 168 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
169 <para>Every Mercurial repository is complete, self-contained, |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
170 and independent. It contains its own private copy of a |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
171 project's files and history. A cloned repository remembers |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
172 the location of the repository it was cloned from, but it does |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
173 not communicate with that repository, or any other, unless you |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
174 tell it to.</para> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
175 |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
176 <para>What this means for now is that we're free to experiment |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
177 with our repository, safe in the knowledge that it's a private |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
178 <quote>sandbox</quote> that won't affect anyone else.</para> |
87 | 179 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
180 </sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
181 <sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
182 <title>What's in a repository?</title> |
87 | 183 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
184 <para>When we take a more detailed look inside a repository, we |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
185 can see that it contains a directory named <filename |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
186 class="directory">.hg</filename>. This is where Mercurial |
658
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
187 keeps all of its metadata for the repository.</para> |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
188 |
665
27043f385f3f
Get autogeneration of examples more or less working.
Bryan O'Sullivan <bos@serpentine.com>
parents:
658
diff
changeset
|
189 &interaction.tour.ls-a; |
85
b7c69a68b0cc
A little progress on "lightning tour".
Bryan O'Sullivan <bos@serpentine.com>
parents:
84
diff
changeset
|
190 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
191 <para>The contents of the <filename |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
192 class="directory">.hg</filename> directory and its |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
193 subdirectories are private to Mercurial. Every other file and |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
194 directory in the repository is yours to do with as you |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
195 please.</para> |
88
d351032c189c
Progress with log coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents:
87
diff
changeset
|
196 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
197 <para>To introduce a little terminology, the <filename |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
198 class="directory">.hg</filename> directory is the |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
199 <quote>real</quote> repository, and all of the files and |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
200 directories that coexist with it are said to live in the |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
201 <emphasis>working directory</emphasis>. An easy way to |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
202 remember the distinction is that the |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
203 <emphasis>repository</emphasis> contains the |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
204 <emphasis>history</emphasis> of your project, while the |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
205 <emphasis>working directory</emphasis> contains a |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
206 <emphasis>snapshot</emphasis> of your project at a particular |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
207 point in history.</para> |
88
d351032c189c
Progress with log coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents:
87
diff
changeset
|
208 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
209 </sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
210 </sect1> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
211 <sect1> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
212 <title>A tour through history</title> |
88
d351032c189c
Progress with log coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents:
87
diff
changeset
|
213 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
214 <para>One of the first things we might want to do with a new, |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
215 unfamiliar repository is understand its history. The <command |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
216 role="hg-cmd">hg log</command> command gives us a view of |
658
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
217 history.</para> |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
218 |
665
27043f385f3f
Get autogeneration of examples more or less working.
Bryan O'Sullivan <bos@serpentine.com>
parents:
658
diff
changeset
|
219 &interaction.tour.log; |
658
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
220 |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
221 <para>By default, this command prints a brief paragraph of output |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
222 for each change to the project that was recorded. In Mercurial |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
223 terminology, we call each of these recorded events a |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
224 <emphasis>changeset</emphasis>, because it can contain a record |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
225 of changes to several files.</para> |
88
d351032c189c
Progress with log coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents:
87
diff
changeset
|
226 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
227 <para>The fields in a record of output from <command |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
228 role="hg-cmd">hg log</command> are as follows.</para> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
229 <itemizedlist> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
230 <listitem><para><literal>changeset</literal>: This field has the |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
231 format of a number, followed by a colon, followed by a |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
232 hexadecimal string. These are |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
233 <emphasis>identifiers</emphasis> for the changeset. There |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
234 are two identifiers because the number is shorter and easier |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
235 to type than the hex string.</para></listitem> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
236 <listitem><para><literal>user</literal>: The identity of the |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
237 person who created the changeset. This is a free-form |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
238 field, but it most often contains a person's name and email |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
239 address.</para></listitem> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
240 <listitem><para><literal>date</literal>: The date and time on |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
241 which the changeset was created, and the timezone in which |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
242 it was created. (The date and time are local to that |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
243 timezone; they display what time and date it was for the |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
244 person who created the changeset.)</para></listitem> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
245 <listitem><para><literal>summary</literal>: The first line of |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
246 the text message that the creator of the changeset entered |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
247 to describe the changeset.</para></listitem></itemizedlist> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
248 <para>The default output printed by <command role="hg-cmd">hg |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
249 log</command> is purely a summary; it is missing a lot of |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
250 detail.</para> |
88
d351032c189c
Progress with log coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents:
87
diff
changeset
|
251 |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
252 <para>Figure <xref linkend="fig:tour-basic:history"/> provides a |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
253 graphical representation of the history of the <filename |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
254 class="directory">hello</filename> repository, to make it a |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
255 little easier to see which direction history is |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
256 <quote>flowing</quote> in. We'll be returning to this figure |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
257 several times in this chapter and the chapter that |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
258 follows.</para> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
259 |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
260 <informalfigure id="fig:tour-basic:history"> |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
261 <mediaobject> |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
262 <imageobject><imagedata fileref="tour-history"/></imageobject> |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
263 <textobject><phrase>XXX add text</phrase></textobject> |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
264 <caption><para>Graphical history of the <filename |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
265 class="directory">hello</filename> |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
266 repository</para></caption> |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
267 </mediaobject> |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
268 </informalfigure> |
96
7d7ddc3a57af
Split tour into two chapters.
Bryan O'Sullivan <bos@serpentine.com>
parents:
95
diff
changeset
|
269 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
270 <sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
271 <title>Changesets, revisions, and talking to other |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
272 people</title> |
88
d351032c189c
Progress with log coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents:
87
diff
changeset
|
273 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
274 <para>As English is a notoriously sloppy language, and computer |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
275 science has a hallowed history of terminological confusion |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
276 (why use one term when four will do?), revision control has a |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
277 variety of words and phrases that mean the same thing. If you |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
278 are talking about Mercurial history with other people, you |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
279 will find that the word <quote>changeset</quote> is often |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
280 compressed to <quote>change</quote> or (when written) |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
281 <quote>cset</quote>, and sometimes a changeset is referred to |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
282 as a <quote>revision</quote> or a <quote>rev</quote>.</para> |
88
d351032c189c
Progress with log coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents:
87
diff
changeset
|
283 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
284 <para>While it doesn't matter what <emphasis>word</emphasis> you |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
285 use to refer to the concept of <quote>a changeset</quote>, the |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
286 <emphasis>identifier</emphasis> that you use to refer to |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
287 <quote>a <emphasis>specific</emphasis> changeset</quote> is of |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
288 great importance. Recall that the <literal>changeset</literal> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
289 field in the output from <command role="hg-cmd">hg |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
290 log</command> identifies a changeset using both a number and |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
291 a hexadecimal string.</para> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
292 <itemizedlist> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
293 <listitem><para>The revision number is <emphasis>only valid in |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
294 that repository</emphasis>,</para></listitem> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
295 <listitem><para>while the hex string is the |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
296 <emphasis>permanent, unchanging identifier</emphasis> that |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
297 will always identify that exact changeset in |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
298 <emphasis>every</emphasis> copy of the |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
299 repository.</para></listitem></itemizedlist> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
300 <para>This distinction is important. If you send someone an |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
301 email talking about <quote>revision 33</quote>, there's a high |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
302 likelihood that their revision 33 will <emphasis>not be the |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
303 same</emphasis> as yours. The reason for this is that a |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
304 revision number depends on the order in which changes arrived |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
305 in a repository, and there is no guarantee that the same |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
306 changes will happen in the same order in different |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
307 repositories. Three changes $a,b,c$ can easily appear in one |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
308 repository as $0,1,2$, while in another as $1,0,2$.</para> |
88
d351032c189c
Progress with log coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents:
87
diff
changeset
|
309 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
310 <para>Mercurial uses revision numbers purely as a convenient |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
311 shorthand. If you need to discuss a changeset with someone, |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
312 or make a record of a changeset for some other reason (for |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
313 example, in a bug report), use the hexadecimal |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
314 identifier.</para> |
88
d351032c189c
Progress with log coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents:
87
diff
changeset
|
315 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
316 </sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
317 <sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
318 <title>Viewing specific revisions</title> |
88
d351032c189c
Progress with log coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents:
87
diff
changeset
|
319 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
320 <para>To narrow the output of <command role="hg-cmd">hg |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
321 log</command> down to a single revision, use the <option |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
322 role="hg-opt-log">-r</option> (or <option |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
323 role="hg-opt-log">--rev</option>) option. You can use |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
324 either a revision number or a long-form changeset identifier, |
658
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
325 and you can provide as many revisions as you want.</para> |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
326 |
665
27043f385f3f
Get autogeneration of examples more or less working.
Bryan O'Sullivan <bos@serpentine.com>
parents:
658
diff
changeset
|
327 &interaction.tour.log-r; |
88
d351032c189c
Progress with log coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents:
87
diff
changeset
|
328 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
329 <para>If you want to see the history of several revisions |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
330 without having to list each one, you can use <emphasis>range |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
331 notation</emphasis>; this lets you express the idea <quote>I |
658
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
332 want all revisions between <literal>abc</literal> and |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
333 <literal>def</literal>, inclusive</quote>.</para> |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
334 |
665
27043f385f3f
Get autogeneration of examples more or less working.
Bryan O'Sullivan <bos@serpentine.com>
parents:
658
diff
changeset
|
335 &interaction.tour.log.range; |
658
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
336 |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
337 <para>Mercurial also honours the order in which you specify |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
338 revisions, so <command role="hg-cmd">hg log -r 2:4</command> |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
339 prints 2, 3, and 4. while <command role="hg-cmd">hg log -r |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
340 4:2</command> prints 4, 3, and 2.</para> |
88
d351032c189c
Progress with log coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents:
87
diff
changeset
|
341 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
342 </sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
343 <sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
344 <title>More detailed information</title> |
91 | 345 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
346 <para>While the summary information printed by <command |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
347 role="hg-cmd">hg log</command> is useful if you already know |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
348 what you're looking for, you may need to see a complete |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
349 description of the change, or a list of the files changed, if |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
350 you're trying to decide whether a changeset is the one you're |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
351 looking for. The <command role="hg-cmd">hg log</command> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
352 command's <option role="hg-opt-global">-v</option> (or <option |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
353 role="hg-opt-global">--verbose</option>) option gives you |
658
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
354 this extra detail.</para> |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
355 |
665
27043f385f3f
Get autogeneration of examples more or less working.
Bryan O'Sullivan <bos@serpentine.com>
parents:
658
diff
changeset
|
356 &interaction.tour.log-v; |
91 | 357 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
358 <para>If you want to see both the description and content of a |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
359 change, add the <option role="hg-opt-log">-p</option> (or |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
360 <option role="hg-opt-log">--patch</option>) option. This |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
361 displays the content of a change as a <emphasis>unified |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
362 diff</emphasis> (if you've never seen a unified diff before, |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
363 see section <xref linkend="sec:mq:patch"/> for an |
658
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
364 overview).</para> |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
365 |
665
27043f385f3f
Get autogeneration of examples more or less working.
Bryan O'Sullivan <bos@serpentine.com>
parents:
658
diff
changeset
|
366 &interaction.tour.log-vp; |
91 | 367 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
368 </sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
369 </sect1> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
370 <sect1> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
371 <title>All about command options</title> |
91 | 372 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
373 <para>Let's take a brief break from exploring Mercurial commands |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
374 to discuss a pattern in the way that they work; you may find |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
375 this useful to keep in mind as we continue our tour.</para> |
91 | 376 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
377 <para>Mercurial has a consistent and straightforward approach to |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
378 dealing with the options that you can pass to commands. It |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
379 follows the conventions for options that are common to modern |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
380 Linux and Unix systems.</para> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
381 <itemizedlist> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
382 <listitem><para>Every option has a long name. For example, as |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
383 we've already seen, the <command role="hg-cmd">hg |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
384 log</command> command accepts a <option |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
385 role="hg-opt-log">--rev</option> option.</para></listitem> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
386 <listitem><para>Most options have short names, too. Instead of |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
387 <option role="hg-opt-log">--rev</option>, we can use <option |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
388 role="hg-opt-log">-r</option>. (The reason that some |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
389 options don't have short names is that the options in |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
390 question are rarely used.)</para></listitem> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
391 <listitem><para>Long options start with two dashes (e.g. <option |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
392 role="hg-opt-log">--rev</option>), while short options |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
393 start with one (e.g. <option |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
394 role="hg-opt-log">-r</option>).</para></listitem> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
395 <listitem><para>Option naming and usage is consistent across |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
396 commands. For example, every command that lets you specify |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
397 a changeset ID or revision number accepts both <option |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
398 role="hg-opt-log">-r</option> and <option |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
399 role="hg-opt-log">--rev</option> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
400 arguments.</para></listitem></itemizedlist> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
401 <para>In the examples throughout this book, I use short options |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
402 instead of long. This just reflects my own preference, so don't |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
403 read anything significant into it.</para> |
91 | 404 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
405 <para>Most commands that print output of some kind will print more |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
406 output when passed a <option role="hg-opt-global">-v</option> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
407 (or <option role="hg-opt-global">--verbose</option>) option, and |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
408 less when passed <option role="hg-opt-global">-q</option> (or |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
409 <option role="hg-opt-global">--quiet</option>).</para> |
91 | 410 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
411 </sect1> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
412 <sect1> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
413 <title>Making and reviewing changes</title> |
91 | 414 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
415 <para>Now that we have a grasp of viewing history in Mercurial, |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
416 let's take a look at making some changes and examining |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
417 them.</para> |
91 | 418 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
419 <para>The first thing we'll do is isolate our experiment in a |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
420 repository of its own. We use the <command role="hg-cmd">hg |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
421 clone</command> command, but we don't need to clone a copy of |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
422 the remote repository. Since we already have a copy of it |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
423 locally, we can just clone that instead. This is much faster |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
424 than cloning over the network, and cloning a local repository |
658
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
425 uses less disk space in most cases, too.</para> |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
426 |
665
27043f385f3f
Get autogeneration of examples more or less working.
Bryan O'Sullivan <bos@serpentine.com>
parents:
658
diff
changeset
|
427 &interaction.tour.reclone; |
658
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
428 |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
429 <para>As an aside, it's often good practice to keep a |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
430 <quote>pristine</quote> copy of a remote repository around, |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
431 which you can then make temporary clones of to create sandboxes |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
432 for each task you want to work on. This lets you work on |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
433 multiple tasks in parallel, each isolated from the others until |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
434 it's complete and you're ready to integrate it back. Because |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
435 local clones are so cheap, there's almost no overhead to cloning |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
436 and destroying repositories whenever you want.</para> |
91 | 437 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
438 <para>In our <filename class="directory">my-hello</filename> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
439 repository, we have a file <filename>hello.c</filename> that |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
440 contains the classic <quote>hello, world</quote> program. Let's |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
441 use the ancient and venerable <command>sed</command> command to |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
442 edit this file so that it prints a second line of output. (I'm |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
443 only using <command>sed</command> to do this because it's easy |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
444 to write a scripted example this way. Since you're not under |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
445 the same constraint, you probably won't want to use |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
446 <command>sed</command>; simply use your preferred text editor to |
658
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
447 do the same thing.)</para> |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
448 |
665
27043f385f3f
Get autogeneration of examples more or less working.
Bryan O'Sullivan <bos@serpentine.com>
parents:
658
diff
changeset
|
449 &interaction.tour.sed; |
91 | 450 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
451 <para>Mercurial's <command role="hg-cmd">hg status</command> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
452 command will tell us what Mercurial knows about the files in the |
658
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
453 repository.</para> |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
454 |
665
27043f385f3f
Get autogeneration of examples more or less working.
Bryan O'Sullivan <bos@serpentine.com>
parents:
658
diff
changeset
|
455 &interaction.tour.status; |
658
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
456 |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
457 <para>The <command role="hg-cmd">hg status</command> command |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
458 prints no output for some files, but a line starting with |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
459 <quote><literal>M</literal></quote> for |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
460 <filename>hello.c</filename>. Unless you tell it to, <command |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
461 role="hg-cmd">hg status</command> will not print any output |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
462 for files that have not been modified.</para> |
91 | 463 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
464 <para>The <quote><literal>M</literal></quote> indicates that |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
465 Mercurial has noticed that we modified |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
466 <filename>hello.c</filename>. We didn't need to |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
467 <emphasis>inform</emphasis> Mercurial that we were going to |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
468 modify the file before we started, or that we had modified the |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
469 file after we were done; it was able to figure this out |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
470 itself.</para> |
91 | 471 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
472 <para>It's a little bit helpful to know that we've modified |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
473 <filename>hello.c</filename>, but we might prefer to know |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
474 exactly <emphasis>what</emphasis> changes we've made to it. To |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
475 do this, we use the <command role="hg-cmd">hg diff</command> |
658
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
476 command.</para> |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
477 |
665
27043f385f3f
Get autogeneration of examples more or less working.
Bryan O'Sullivan <bos@serpentine.com>
parents:
658
diff
changeset
|
478 &interaction.tour.diff; |
91 | 479 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
480 </sect1> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
481 <sect1> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
482 <title>Recording changes in a new changeset</title> |
91 | 483 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
484 <para>We can modify files, build and test our changes, and use |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
485 <command role="hg-cmd">hg status</command> and <command |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
486 role="hg-cmd">hg diff</command> to review our changes, until |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
487 we're satisfied with what we've done and arrive at a natural |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
488 stopping point where we want to record our work in a new |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
489 changeset.</para> |
91 | 490 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
491 <para>The <command role="hg-cmd">hg commit</command> command lets |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
492 us create a new changeset; we'll usually refer to this as |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
493 <quote>making a commit</quote> or |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
494 <quote>committing</quote>.</para> |
91 | 495 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
496 <sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
497 <title>Setting up a username</title> |
102 | 498 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
499 <para>When you try to run <command role="hg-cmd">hg |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
500 commit</command> for the first time, it is not guaranteed to |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
501 succeed. Mercurial records your name and address with each |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
502 change that you commit, so that you and others will later be |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
503 able to tell who made each change. Mercurial tries to |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
504 automatically figure out a sensible username to commit the |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
505 change with. It will attempt each of the following methods, |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
506 in order:</para> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
507 <orderedlist> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
508 <listitem><para>If you specify a <option |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
509 role="hg-opt-commit">-u</option> option to the <command |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
510 role="hg-cmd">hg commit</command> command on the command |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
511 line, followed by a username, this is always given the |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
512 highest precedence.</para></listitem> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
513 <listitem><para>If you have set the <envar>HGUSER</envar> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
514 environment variable, this is checked |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
515 next.</para></listitem> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
516 <listitem><para>If you create a file in your home directory |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
517 called <filename role="special">.hgrc</filename>, with a |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
518 <envar role="rc-item-ui">username</envar> entry, that will |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
519 be used next. To see what the contents of this file |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
520 should look like, refer to section <xref |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
521 linkend="sec:tour-basic:username"/> |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
522 below.</para></listitem> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
523 <listitem><para>If you have set the <envar>EMAIL</envar> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
524 environment variable, this will be used |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
525 next.</para></listitem> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
526 <listitem><para>Mercurial will query your system to find out |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
527 your local user name and host name, and construct a |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
528 username from these components. Since this often results |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
529 in a username that is not very useful, it will print a |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
530 warning if it has to do |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
531 this.</para></listitem> |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
532 </orderedlist> |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
533 <para>If all of these mechanisms fail, Mercurial will |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
534 fail, printing an error message. In this case, it will not |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
535 let you commit until you set up a |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
536 username.</para> |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
537 <para>You should think of the <envar>HGUSER</envar> environment |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
538 variable and the <option role="hg-opt-commit">-u</option> |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
539 option to the <command role="hg-cmd">hg commit</command> |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
540 command as ways to <emphasis>override</emphasis> Mercurial's |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
541 default selection of username. For normal use, the simplest |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
542 and most robust way to set a username for yourself is by |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
543 creating a <filename role="special">.hgrc</filename> file; see |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
544 below for details.</para> |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
545 <sect3 id="sec:tour-basic:username"> |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
546 <title>Creating a Mercurial configuration file</title> |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
547 |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
548 <para>To set a user name, use your favourite editor |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
549 to create a file called <filename |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
550 role="special">.hgrc</filename> in your home directory. |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
551 Mercurial will use this file to look up your personalised |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
552 configuration settings. The initial contents of your |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
553 <filename role="special">.hgrc</filename> should look like |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
554 this.</para> |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
555 <programlisting># This is a Mercurial configuration file. |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
556 [ui] username = Firstname Lastname |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
557 <email.address@domain.net></programlisting> |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
558 |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
559 <para>The <quote><literal>[ui]</literal></quote> line begins a |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
560 <emphasis>section</emphasis> of the config file, so you can |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
561 read the <quote><literal>username = ...</literal></quote> |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
562 line as meaning <quote>set the value of the |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
563 <literal>username</literal> item in the |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
564 <literal>ui</literal> section</quote>. A section continues |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
565 until a new section begins, or the end of the file. |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
566 Mercurial ignores empty lines and treats any text from |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
567 <quote><literal>#</literal></quote> to the end of a line as |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
568 a comment.</para> |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
569 </sect3> |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
570 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
571 <sect3> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
572 <title>Choosing a user name</title> |
102 | 573 |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
574 <para>You can use any text you like as the value of |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
575 the <literal>username</literal> config item, since this |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
576 information is for reading by other people, but for |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
577 interpreting by Mercurial. The convention that most |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
578 people follow is to use their name and email address, as |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
579 in the example above.</para> |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
580 <note> |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
581 <para>Mercurial's built-in web server obfuscates |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
582 email addresses, to make it more difficult for the email |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
583 harvesting tools that spammers use. This reduces the |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
584 likelihood that you'll start receiving more junk email |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
585 if you publish a Mercurial repository on the |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
586 web.</para></note> |
102 | 587 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
588 </sect3> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
589 </sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
590 <sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
591 <title>Writing a commit message</title> |
102 | 592 |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
593 <para>When we commit a change, Mercurial drops us into |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
594 a text editor, to enter a message that will describe the |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
595 modifications we've made in this changeset. This is called |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
596 the <emphasis>commit message</emphasis>. It will be a |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
597 record for readers of what we did and why, and it will be |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
598 printed by <command role="hg-cmd">hg log</command> after |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
599 we've finished committing.</para> |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
600 |
665
27043f385f3f
Get autogeneration of examples more or less working.
Bryan O'Sullivan <bos@serpentine.com>
parents:
658
diff
changeset
|
601 &interaction.tour.commit; |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
602 |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
603 <para>The editor that the <command role="hg-cmd">hg |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
604 commit</command> command drops us into will contain an |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
605 empty line, followed by a number of lines starting with |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
606 <quote><literal>HG:</literal></quote>.</para> |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
607 |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
608 <programlisting>XXX fix this XXX</programlisting> |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
609 |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
610 <para>Mercurial ignores the lines that start with |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
611 <quote><literal>HG:</literal></quote>; it uses them only to |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
612 tell us which files it's recording changes to. Modifying or |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
613 deleting these lines has no effect.</para> |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
614 </sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
615 <sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
616 <title>Writing a good commit message</title> |
91 | 617 |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
618 <para>Since <command role="hg-cmd">hg log</command> |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
619 only prints the first line of a commit message by default, |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
620 it's best to write a commit message whose first line stands |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
621 alone. Here's a real example of a commit message that |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
622 <emphasis>doesn't</emphasis> follow this guideline, and |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
623 hence has a summary that is not |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
624 readable.</para> |
91 | 625 |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
626 <programlisting> |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
627 changeset: 73:584af0e231be |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
628 user: Censored Person <censored.person@example.org> |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
629 date: Tue Sep 26 21:37:07 2006 -0700 |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
630 summary: include buildmeister/commondefs. Add exports.</programlisting> |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
631 |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
632 <para>As far as the remainder of the contents of the |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
633 commit message are concerned, there are no hard-and-fast |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
634 rules. Mercurial itself doesn't interpret or care about the |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
635 contents of the commit message, though your project may have |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
636 policies that dictate a certain kind of |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
637 formatting.</para> |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
638 <para>My personal preference is for short, but |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
639 informative, commit messages that tell me something that I |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
640 can't figure out with a quick glance at the output of |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
641 <command role="hg-cmd">hg log |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
642 --patch</command>.</para> |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
643 </sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
644 <sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
645 <title>Aborting a commit</title> |
91 | 646 |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
647 <para>If you decide that you don't want to commit |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
648 while in the middle of editing a commit message, simply exit |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
649 from your editor without saving the file that it's editing. |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
650 This will cause nothing to happen to either the repository |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
651 or the working directory.</para> |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
652 <para>If we run the <command role="hg-cmd">hg |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
653 commit</command> command without any arguments, it records |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
654 all of the changes we've made, as reported by <command |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
655 role="hg-cmd">hg status</command> and <command |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
656 role="hg-cmd">hg diff</command>.</para> |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
657 </sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
658 <sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
659 <title>Admiring our new handiwork</title> |
91 | 660 |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
661 <para>Once we've finished the commit, we can use the |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
662 <command role="hg-cmd">hg tip</command> command to display |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
663 the changeset we just created. This command produces output |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
664 that is identical to <command role="hg-cmd">hg |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
665 log</command>, but it only displays the newest revision in |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
666 the repository.</para> |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
667 |
665
27043f385f3f
Get autogeneration of examples more or less working.
Bryan O'Sullivan <bos@serpentine.com>
parents:
658
diff
changeset
|
668 &interaction.tour.tip; |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
669 |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
670 <para>We refer to |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
671 the newest revision in the repository as the tip revision, |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
672 or simply the tip.</para> |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
673 </sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
674 </sect1> |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
675 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
676 <sect1> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
677 <title>Sharing changes</title> |
91 | 678 |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
679 <para>We mentioned earlier that repositories in |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
680 Mercurial are self-contained. This means that the changeset |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
681 we just created exists only in our <filename |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
682 class="directory">my-hello</filename> repository. Let's |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
683 look at a few ways that we can propagate this change into |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
684 other repositories.</para> |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
685 |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
686 <sect2 id="sec:tour:pull"> |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
687 <title>Pulling changes from another repository</title> |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
688 <para>To get started, let's clone our original |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
689 <filename class="directory">hello</filename> repository, |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
690 which does not contain the change we just committed. We'll |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
691 call our temporary repository <filename |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
692 class="directory">hello-pull</filename>.</para> |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
693 |
665
27043f385f3f
Get autogeneration of examples more or less working.
Bryan O'Sullivan <bos@serpentine.com>
parents:
658
diff
changeset
|
694 &interaction.tour.clone-pull; |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
695 |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
696 <para>We'll use the <command role="hg-cmd">hg |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
697 pull</command> command to bring changes from <filename |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
698 class="directory">my-hello</filename> into <filename |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
699 class="directory">hello-pull</filename>. However, blindly |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
700 pulling unknown changes into a repository is a somewhat |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
701 scary prospect. Mercurial provides the <command |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
702 role="hg-cmd">hg incoming</command> command to tell us |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
703 what changes the <command role="hg-cmd">hg pull</command> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
704 command <emphasis>would</emphasis> pull into the repository, |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
705 without actually pulling the changes in.</para> |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
706 |
665
27043f385f3f
Get autogeneration of examples more or less working.
Bryan O'Sullivan <bos@serpentine.com>
parents:
658
diff
changeset
|
707 &interaction.tour.incoming; |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
708 |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
709 <para>(Of course, someone could |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
710 cause more changesets to appear in the repository that we |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
711 ran <command role="hg-cmd">hg incoming</command> in, before |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
712 we get a chance to <command role="hg-cmd">hg pull</command> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
713 the changes, so that we could end up pulling changes that we |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
714 didn't expect.)</para> |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
715 |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
716 <para>Bringing changes into a repository is a simple |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
717 matter of running the <command role="hg-cmd">hg |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
718 pull</command> command, and telling it which repository to |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
719 pull from.</para> |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
720 |
665
27043f385f3f
Get autogeneration of examples more or less working.
Bryan O'Sullivan <bos@serpentine.com>
parents:
658
diff
changeset
|
721 &interaction.tour.pull; |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
722 |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
723 <para>As you can see |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
724 from the before-and-after output of <command |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
725 role="hg-cmd">hg tip</command>, we have successfully |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
726 pulled changes into our repository. There remains one step |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
727 before we can see these changes in the working |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
728 directory.</para> |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
729 </sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
730 <sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
731 <title>Updating the working directory</title> |
91 | 732 |
658
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
733 <para>We have so far glossed over the relationship between a |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
734 repository and its working directory. The <command |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
735 role="hg-cmd">hg pull</command> command that we ran in |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
736 section <xref linkend="sec:tour:pull"/> brought changes |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
737 into the repository, but if we check, there's no sign of those |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
738 changes in the working directory. This is because <command |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
739 role="hg-cmd">hg pull</command> does not (by default) touch |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
740 the working directory. Instead, we use the <command |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
741 role="hg-cmd">hg update</command> command to do this.</para> |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
742 |
665
27043f385f3f
Get autogeneration of examples more or less working.
Bryan O'Sullivan <bos@serpentine.com>
parents:
658
diff
changeset
|
743 &interaction.tour.update; |
658
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
744 |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
745 <para>It might seem a bit strange that <command role="hg-cmd">hg |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
746 pull</command> doesn't update the working directory |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
747 automatically. There's actually a good reason for this: you |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
748 can use <command role="hg-cmd">hg update</command> to update |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
749 the working directory to the state it was in at <emphasis>any |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
750 revision</emphasis> in the history of the repository. If |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
751 you had the working directory updated to an old revision---to |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
752 hunt down the origin of a bug, say---and ran a <command |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
753 role="hg-cmd">hg pull</command> which automatically updated |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
754 the working directory to a new revision, you might not be |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
755 terribly happy.</para> |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
756 <para>However, since pull-then-update is such a common thing to |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
757 do, Mercurial lets you combine the two by passing the <option |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
758 role="hg-opt-pull">-u</option> option to <command |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
759 role="hg-cmd">hg pull</command>.</para> |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
760 |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
761 <para>If you look back at the output of <command |
658
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
762 role="hg-cmd">hg pull</command> in section <xref |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
763 linkend="sec:tour:pull"/> when we ran it without <option |
658
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
764 role="hg-opt-pull">-u</option>, you can see that it printed |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
765 a helpful reminder that we'd have to take an explicit step to |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
766 update the working directory:</para> |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
767 |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
768 <!-- &interaction.xxx.fixme; --> |
101
321732566ac1
A few bits of terminological clarification.
Bryan O'Sullivan <bos@serpentine.com>
parents:
99
diff
changeset
|
769 |
658
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
770 <para>To find out what revision the working directory is at, use |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
771 the <command role="hg-cmd">hg parents</command> |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
772 command.</para> |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
773 |
665
27043f385f3f
Get autogeneration of examples more or less working.
Bryan O'Sullivan <bos@serpentine.com>
parents:
658
diff
changeset
|
774 &interaction.tour.parents; |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
775 |
658
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
776 <para>If you look back at figure <xref |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
777 linkend="fig:tour-basic:history"/>, |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
778 you'll see arrows connecting each changeset. The node that |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
779 the arrow leads <emphasis>from</emphasis> in each case is a |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
780 parent, and the node that the arrow leads |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
781 <emphasis>to</emphasis> is its child. The working directory |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
782 has a parent in just the same way; this is the changeset that |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
783 the working directory currently contains.</para> |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
784 |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
785 <para>To update the working directory to a particular revision, |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
786 |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
787 give a revision number or changeset ID to the <command |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
788 role="hg-cmd">hg update</command> command.</para> |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
789 |
665
27043f385f3f
Get autogeneration of examples more or less working.
Bryan O'Sullivan <bos@serpentine.com>
parents:
658
diff
changeset
|
790 &interaction.tour.older; |
658
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
791 |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
792 <para>If you omit an explicit revision, <command |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
793 role="hg-cmd">hg update</command> will update to the tip |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
794 revision, as shown by the second call to <command |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
795 role="hg-cmd">hg update</command> in the example |
b90b024729f1
WIP DocBook snapshot that all compiles. Mirabile dictu!
Bryan O'Sullivan <bos@serpentine.com>
parents:
657
diff
changeset
|
796 above.</para> |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
797 </sect2> |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
798 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
799 <sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
800 <title>Pushing changes to another repository</title> |
92 | 801 |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
802 <para>Mercurial lets us push changes to another |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
803 repository, from the repository we're currently visiting. |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
804 As with the example of <command role="hg-cmd">hg |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
805 pull</command> above, we'll create a temporary repository |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
806 to push our changes into.</para> |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
807 |
665
27043f385f3f
Get autogeneration of examples more or less working.
Bryan O'Sullivan <bos@serpentine.com>
parents:
658
diff
changeset
|
808 &interaction.tour.clone-push; |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
809 |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
810 <para>The <command role="hg-cmd">hg outgoing</command> command |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
811 tells us what changes would be pushed into another |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
812 repository.</para> |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
813 |
665
27043f385f3f
Get autogeneration of examples more or less working.
Bryan O'Sullivan <bos@serpentine.com>
parents:
658
diff
changeset
|
814 &interaction.tour.outgoing; |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
815 |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
816 <para>And the |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
817 <command role="hg-cmd">hg push</command> command does the |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
818 actual push.</para> |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
819 |
665
27043f385f3f
Get autogeneration of examples more or less working.
Bryan O'Sullivan <bos@serpentine.com>
parents:
658
diff
changeset
|
820 &interaction.tour.push; |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
821 |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
822 <para>As with |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
823 <command role="hg-cmd">hg pull</command>, the <command |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
824 role="hg-cmd">hg push</command> command does not update |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
825 the working directory in the repository that it's pushing |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
826 changes into. (Unlike <command role="hg-cmd">hg |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
827 pull</command>, <command role="hg-cmd">hg push</command> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
828 does not provide a <literal>-u</literal> option that updates |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
829 the other repository's working directory.)</para> |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
830 |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
831 <para>What happens if we try to pull or push changes |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
832 and the receiving repository already has those changes? |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
833 Nothing too exciting.</para> |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
834 |
665
27043f385f3f
Get autogeneration of examples more or less working.
Bryan O'Sullivan <bos@serpentine.com>
parents:
658
diff
changeset
|
835 &interaction.tour.push.nothing; |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
836 </sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
837 <sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
838 <title>Sharing changes over a network</title> |
92 | 839 |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
840 <para>The commands we have covered in the previous few |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
841 sections are not limited to working with local repositories. |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
842 Each works in exactly the same fashion over a network |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
843 connection; simply pass in a URL instead of a local |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
844 path.</para> |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
845 |
665
27043f385f3f
Get autogeneration of examples more or less working.
Bryan O'Sullivan <bos@serpentine.com>
parents:
658
diff
changeset
|
846 &interaction.tour.outgoing.net; |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
847 |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
848 <para>In this example, we |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
849 can see what changes we could push to the remote repository, |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
850 but the repository is understandably not set up to let |
657
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
851 anonymous users push to it.</para> |
8631da51309b
Slow progress on XML conversion
Bryan O'Sullivan <bos@serpentine.com>
parents:
652
diff
changeset
|
852 |
665
27043f385f3f
Get autogeneration of examples more or less working.
Bryan O'Sullivan <bos@serpentine.com>
parents:
658
diff
changeset
|
853 &interaction.tour.push.net; |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
854 </sect2> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
855 </sect1> |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
856 </chapter> |
93 | 857 |
652
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
858 <!-- |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
859 local variables: |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
860 sgml-parent-document: ("00book.xml" "book" "chapter") |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
861 end: |
863a82f13901
Basic progress on XML.
Bryan O'Sullivan <bos@serpentine.com>
parents:
650
diff
changeset
|
862 --> |