doc/reference/libpurple/code_contributions.xml

Mon, 18 Jan 2021 23:07:50 -0600

author
Gary Kramlich <grim@reaperworld.com>
date
Mon, 18 Jan 2021 23:07:50 -0600
changeset 40716
7a4e48594a24
child 40972
af05c99a4702
permissions
-rw-r--r--

Update all of the development documentation

Add documentation for using our repos and how to contribute to them.

Testing Done:
Built the docs locally and verified they look decent.

Reviewed at https://reviews.imfreedom.org/r/404/

40716
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
1 <?xml version='1.0' encoding="UTF-8"?>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
2 <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
3 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
4 ]>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
5 <chapter id="chapter-code-contributions">
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
6 <title>Code Contributions</title>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
7
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
8 <sect2 id="introduction">
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
9 <title>Introduction</title>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
10 <para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
11 All of the Pidgin related projects use
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
12 <ulink url="https://reviewboard.org">Review Board</ulink> for handling
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
13 contributions at
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
14 <ulink url="https://reviews.imfreedom.org">reviews.imfreedom.org</ulink>.
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
15 </para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
16 </sect2>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
17
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
18 <sect2 id="first-time-setup">
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
19 <title>First Time Setup</title>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
20 <para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
21 There are a few things you'll need to set up to be able to submit a code
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
22 review to these projects. This includes installing
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
23 <ulink url="https://www.reviewboard.org/downloads/rbtools/">RBTools</ulink>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
24 as well as some additional
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
25 <ulink url="https://www.mercurial-scm.org/">Mercurial</ulink>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
26 configuration.
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
27 </para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
28
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
29 <sect3 id="install-rbtools">
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
30 <title>Install RBTools</title>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
31
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
32 <para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
33 The recommended way to install RBTools is via pip and can be done with
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
34 the following command.
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
35 </para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
36
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
37 <programlisting>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
38 pip3 install -U "RBTools>=1.0.3"
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
39 </programlisting>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
40
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
41 <para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
42 Once RBTools is installed you need to make sure that <code>rbt</code>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
43 is available on your <code>$PATH</code>. To do this, you may need to
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
44 add <code>$HOME/.local/bin</code> to your <code>$PATH</code>. The exact
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
45 procedure to do this is dependent on your setup and outside of the
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
46 scope of this document.
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
47 </para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
48 </sect3>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
49
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
50 <sect3 id="configure-mercurial">
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
51 <title>Mercurial Configuration</title>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
52
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
53 <para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
54 This configuration for Mercurial is to make your life as a contributor
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
55 easier. There a few different ways to configure Mercurial, but these
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
56 instructions will update your user specific configuration in
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
57 <code>$HOME/.hgrc</code>.
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
58 </para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
59
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
60 <para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
61 The first thing we need to do is to install the evolve extension. This
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
62 extension makes rewriting history safe and we use it extensively in our
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
63 repositories. You can install it with a simple <code>pip3 install -U
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
64 hg-evolve</code>. We will enable it below with some other bundled
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
65 extensions, but you can find more information about it
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
66 <ulink url="https://www.mercurial-scm.org/wiki/EvolveExtension">here</ulink>.
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
67 </para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
68
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
69 <para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
70 When working with Mercurial repositories it is very important to make
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
71 sure that your username is set properly as it is added to every commit
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
72 you make. To set your username you must add it to the <code>[ui]</code>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
73 section in your <code>$HOME/.hgrc</code> like the following example.
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
74 </para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
75
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
76 <programlisting>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
77 [ui]
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
78 username = Full Name &lt;email@example.com&gt;
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
79 </programlisting>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
80
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
81 <para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
82 Next we need to make sure that the <emphasis>evolve</emphasis>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
83 and <emphasis>rebase</emphasis> extensions are loaded. To do so add the
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
84 lines in the following example. You do not need to put anything after
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
85 the <code>=</code> as this will tell Mercurial to look for them in the
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
86 default places for extensions.
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
87 </para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
88
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
89 <programlisting>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
90 [extensions]
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
91 evolve =
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
92 rebase =
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
93 </programlisting>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
94
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
95 <para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
96 Next we're going to create a <emphasis>revsetalias</emphasis>. This will
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
97 be used to make it easier to look at your history and submit your review
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
98 request.
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
99 </para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
100
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
101 <programlisting>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
102 [revsetalias]
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
103 wip = only(.,default)
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
104 </programlisting>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
105
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
106 <para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
107 This alias will show us just the commits that are on our working branch
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
108 and not on the default branch. The default branch is where all
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
109 accepted code contributions go. Optionally, you can add the
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
110 <code>wip</code> command alias below which will show you the revision
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
111 history of what you are working on.
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
112 </para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
113
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
114 <programlisting>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
115 [alias]
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
116 wip = log --graph --rev wip
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
117 </programlisting>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
118
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
119 <para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
120 There are quite a few other useful configuration changes you can make,
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
121 and a few examples can be found below.
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
122 </para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
123
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
124 <programlisting>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
125 [ui]
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
126 # update a large number of settings for a better user experience, highly
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
127 # recommended!!
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
128 tweakdefaults = true
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
129
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
130 [alias]
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
131 # make hg log show the graph as well as commit phase
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
132 lg = log --graph --template phases
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
133 </programlisting>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
134
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
135 <para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
136 Below is all of the above configuration settings to make it easier to
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
137 copy/paste.
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
138 </para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
139
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
140 <programlisting>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
141 [ui]
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
142 username = Full Name &lt;email@example.com&gt;
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
143 # update a large number of settings for a better user experience, highly
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
144 # recommended!!
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
145 tweakdefaults = true
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
146
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
147 [extensions]
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
148 evolve =
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
149 rebase =
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
150
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
151 [alias]
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
152 # make hg log show the graph as well as commit phase
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
153 lg = log --graph --template phases
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
154
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
155 # show everything between the upstream and your wip
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
156 wip = log --graph --rev wip
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
157
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
158 [revsetalias]
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
159 wip = only(.,default)
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
160 </programlisting>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
161 </sect3>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
162
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
163 <sect3 id="login">
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
164 <title>Log in to Review Board</title>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
165
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
166 <para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
167 To be able to submit a review request you need to have an account on
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
168 our JetBrains Hub instance at
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
169 <ulink url="https://hub.imfreedom.org">hub.imfreedom.org</ulink>. You
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
170 can create an account here in a number of ways and even turn on two
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
171 factor authentication. But please note that if you turn on two factor
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
172 authentication you will need to create an application password to be
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
173 able to login to Review Board.
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
174 </para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
175
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
176 <para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
177 Once you have that account you can use it to login our Review Board
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
178 instance at
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
179 <ulink url="https://reviews.imfreedom.org">reviews.imfreedom.org</ulink>.
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
180 Please note, you will have to login via the web interface before being
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
181 able to use RBTools.
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
182 </para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
183
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
184 <para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
185 Once you have an account and have logged into our Review Board site, you
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
186 can begin using RBTools. In your shell, navigate to a Mercurial clone of
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
187 one of the Pidgin or purple-related projects, then run the
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
188 <code>rbt login</code> command. You should only need to do this once,
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
189 unless you change your password or have run the <code>rbt logout</code>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
190 command.
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
191 </para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
192 </sect3>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
193 </sect2>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
194
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
195 <sect2 id="create">
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
196 <title>Creating a New Review Request</title>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
197
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
198 <para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
199 Before starting a new review request, you should make sure that your
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
200 local copy of the repository is up to date. To do so, make sure you are
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
201 on the <emphasis>default</emphasis> branch via
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
202 <code>hg update default</code>. Once you are on the
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
203 <emphasis>default</emphasis> branch, you can update your copy with
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
204 <code>hg pull --update</code>. Now that you're starting with the most
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
205 recent code, you can proceed with your contributions.
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
206 </para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
207
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
208 <para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
209 While it's not mandatory, it is highly recommended that you work on your
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
210 contributions via a branch. If you don't go this path, you will have
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
211 issues after your review request is merged. This branch name can be
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
212 whatever you like as it will not end up in the main repositories, and
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
213 you can delete it from your local repository after it is merged. See
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
214 <link linkend="cleanup">cleanup</link> for more information.
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
215 </para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
216
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
217 <para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
218 You can create the branch with the following command:
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
219 </para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
220
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
221 <programlisting>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
222 hg branch my-new-branch-name
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
223 </programlisting>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
224
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
225 <para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
226 Now that you have a branch started, you can go ahead and work like you
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
227 normally would, committing your code at logical times, etc. Once you
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
228 have some work committed and you are ready to create a new review
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
229 request, you can type <code>rbt post wip</code> and you should be good to
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
230 go. This will create a new review request using all of the committed work
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
231 in your repository and will output something like below.
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
232 </para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
233
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
234 <programlisting language="screen">
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
235 Review request #403 posted.
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
236
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
237 https://reviews.imfreedom.org/r/403/
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
238 https://reviews.imfreedom.org/r/403/diff/
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
239 </programlisting>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
240
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
241 <para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
242 At this point, your review request has been posted, but it is not yet
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
243 published. This means no one can review it yet. To do that, you need to
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
244 go to the URL that was output from your <code>rbt post</code> command
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
245 and verify that everything looks correct. If this review request fixes
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
246 any bugs, please make sure to enter their numbers in the bugs field on
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
247 the right. Also, be sure to review the actual diff yourself to make sure
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
248 it includes what you intended it to and nothing extra.
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
249 </para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
250
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
251 <para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
252 Once you are happy with the review request, you can hit the publish
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
253 button which will make the review request public and alert the reviewers
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
254 of its creation. Optionally you can pass <code>--open</code> to
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
255 <code>rbt post</code> in the future to automatically open the draft
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
256 review in your web browser.
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
257 </para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
258
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
259 <para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
260 <code>rbt post</code> has a ton of options, so be sure to check them out
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
261 with <code>rbt post --help</code>. There are even options to
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
262 automatically fill out the bugs fixed fields among other things.
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
263 </para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
264 </sect2>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
265
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
266 <sect2 id="update">
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
267 <title>Updating an Existing Review Request</title>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
268
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
269 <para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
270 Typically with a code review, you're going to need to make some updates.
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
271 However there's also a good chance that your original branching point
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
272 has changed as other contributions are accepted. To deal with this you'll
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
273 need to rebase your branch on top of the new changes.
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
274 </para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
275
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
276 <para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
277 Rebasing, as the name suggests is the act of replaying your previous
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
278 commits on top of a new base revision. Mercurial makes this pretty easy.
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
279 First, make sure you are on your branch with
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
280 <code>hg up my-branch-name</code>. Now you can preview the rebase with
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
281 <code>hg rebase -d default --keepbranches --dry-run</code>. We prefer
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
282 doing a dry-run just to make sure there aren't any major surprises. You
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
283 may run into some conflicts, but those will have to be fixed regardless.
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
284 </para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
285
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
286 <para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
287 If everything looks good, you can run the actual rebase with
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
288 <code>hg rebase -d default --keepbranches</code>. Again if you run into
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
289 any conflicts, you will have to resolve them and they will cause the
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
290 dry-run to fail. Once you have fixed the merge conflicts, you'll then
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
291 need to mark the files as resolved with
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
292 <code>hg resolve --mark filename</code>. When you have resolved all of
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
293 the conflicted files you can continue the rebase with
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
294 <code>hg rebase --continue</code>. You may run into multiple conflicts,
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
295 so just repeat until you're done.
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
296 </para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
297
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
298 <para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
299 After rebasing you can start addressing the comments in your review and
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
300 commit them. Once they are committed, you can update your existing
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
301 review request with <code>rbt post --update</code>. If for some reason
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
302 <code>rbt</code> can not figure out the proper review request to
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
303 update, you can pass the number in via
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
304 <code>rbt post --review-request-id #</code>. Note that when using
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
305 <code>--review-request-id</code> you no longer need to specify
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
306 <code>--update</code>.
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
307 </para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
308
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
309 <para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
310 Just like an initial <code>rbt post</code>, the updated version will be
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
311 in a draft state until you publish it. So again, you'll need to visit the
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
312 URL that was output, verify everything, and click the publish button.
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
313 </para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
314 </sect2>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
315
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
316 <sect2 id="land">
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
317 <title>Landing a Review Request</title>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
318
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
319 <para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
320 This will typically only be done by the Pidgin developers with push
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
321 access. If you want to test a patch from a review request, please see the
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
322 <link linkend="patch">patch</link> section below.
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
323 </para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
324
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
325 <para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
326 It is <emphasis>HIGHLY</emphasis> recommended that you use a separate
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
327 clone of the repository in question when you want to land review requests.
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
328 This makes it much easier to avoid accidentally pushing development work
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
329 to the canonical repository which makes everyone's life easier. Also, the
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
330 mainline repositories now auto publish, so if you do not selectively push
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
331 commits, all of your draft commits will be published. You can name this
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
332 additional clone whatever you like, but using something like
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
333 <code>pidgin-clean</code> is a fairly common practice. This makes it easy
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
334 for you to know that this clone is only meant for landing review requests,
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
335 and other admistrative work like updating the ChangeLog and COPYRIGHT
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
336 files.
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
337 </para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
338
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
339 <para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
340 When you are ready to land a review request you need to make sure you are
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
341 on the proper branch. In most cases this will be the branch named
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
342 <emphasis>default</emphasis> and can be verified by running the command
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
343 <code>hg branch</code>. Next you need to make sure that your local copy
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
344 is up to date. You can do this by running <code>hg pull --update</code>.
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
345 </para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
346
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
347 <para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
348 Please note, if you run <code>hg pull</code> and then immediately run
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
349 <code>hg pull --update</code> you will <emphasis>not</emphasis> update to
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
350 the most recent commit as this new invocation of <code>hg pull</code> has
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
351 not actually pulled in any new commits. To properly update, you'll need
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
352 to run <code>hg update</code> instead.
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
353 </para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
354
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
355 <para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
356 Once your local copy is up to date you can land the review request with
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
357 <code>rbt land --no-push --review-request-id #</code> where <code>#</code>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
358 is the number of the review request you are landing. The
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
359 <code>--no-push</code> argument is to disable pushing this commit
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
360 immediately. Most of our configuration already enables this flag for you,
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
361 but if you're in doubt, please use the <code>--no-push</code> argument.
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
362 </para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
363
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
364 <para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
365 Once the review request has been landed, make sure to verify that the
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
366 revision history looks correct, run a test build as well as the unit
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
367 tests, and if everything looks good, you can continue with the
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
368 housekeeping before we finally push the new commits.
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
369 </para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
370
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
371 <para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
372 The housekeeping we need to do entails a few things. If this is a big new
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
373 feature or bug fix, we should be documenting this in the ChangeLog file
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
374 for the repository. Please follow the existing convention of mentioning
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
375 the contributor as well as the issues addressed and the review request
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
376 number. Likewise, if this is someone's first contribution you will need
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
377 to add them to the COPYRIGHT file in the repository as well. If you had
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
378 to update either of these files, review your changes and commit them
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
379 directly.
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
380 </para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
381
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
382 <para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
383 Now that any updates to ChangeLog and COPYRIGHT are completed, we can
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
384 actually start pushing the changes back to the canonical repository.
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
385 Currently not all of the canonical repositories are publishing
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
386 repositories so we'll need to manually mark the commits as public. This
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
387 is easily accomplished with <code>hg phase --public</code>.
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
388 <emphasis>Note</emphasis>, if you are not using a separate clone of the
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
389 canonical repository you will need to specify a revision to avoid
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
390 publishing every commit in your repository. If you run into issues or
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
391 have more questions about phases see the
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
392 <ulink url="https://www.mercurial-scm.org/wiki/Phases">official documentation</ulink>.
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
393 </para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
394
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
395 <para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
396 Now that the changes have been made public, we can finally push to the
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
397 canonical repository with <code>hg push</code>. Once that is done, you'll
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
398 also need to go and mark the review request as
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
399 <emphasis>Submitted</emphasis> in the Review Board web interface.
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
400 </para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
401 </sect2>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
402
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
403 <sect2 id="patch">
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
404 <title>Testing Patches Locally</title>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
405
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
406 <para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
407 If you want to test a patch locally for any reason, you first need to
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
408 make sure that you are on the target branch for the review request which
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
409 is listed on the review request page. In most cases this will be the
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
410 <emphasis>default</emphasis> branch. Regardless you'll need to run
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
411 <code>hg up branch-name</code> before applying the patch.
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
412 </para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
413
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
414 <para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
415 Now that you are on the correct branch, you can apply the patch with
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
416 <code>rbt patch #</code> where <code>#</code> is the id of the review
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
417 request you want to test. This will apply the patch from the review
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
418 request to your working copy without committing it.
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
419 </para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
420
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
421 <para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
422 Once you're done with your testing you can remove the changes with
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
423 <code>hg revert --no-backup --all</code>. This will return your
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
424 repository to exactly what it was before the patch was applied. The
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
425 <code>--no-backup</code> argument says to not save the changes that you
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
426 are reverting and the <code>--all</code> argument tells Mercurial to
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
427 revert all files.
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
428 </para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
429 </sect2>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
430
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
431 <sect2 id="cleanup">
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
432 <title>Cleaning up a Landed or Discarded Review Request</title>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
433
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
434 <para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
435 Whether or not your pull request has been accepted, you probably want to
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
436 clean it up from your local repository. To do so, you need to update to
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
437 a branch other than the branch you built it on. In the following example,
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
438 we're going to remove the branch named
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
439 <emphasis>my-new-branch-name</emphasis> that we used to create a review
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
440 request.
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
441 </para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
442
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
443 <programlisting>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
444 hg up default
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
445 hg prune -r 'branch(my-new-branch-name)'
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
446 </programlisting>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
447
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
448 <para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
449 Now, all commits that were on the <emphasis>my-new-branch-name</emphasis>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
450 branch will have their contents removed but interally Mercurial keeps
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
451 track that these revisions have been deleted.
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
452 </para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
453
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
454 <para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
455 You can repeat this for any other branches you need to clean up, and
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
456 you're done!
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
457 </para>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
458 </sect2>
7a4e48594a24 Update all of the development documentation
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
459 </chapter>

mercurial