CONTRIBUTE.md

Fri, 15 Nov 2019 20:11:00 +0100

author
David Demelier <markand@malikania.fr>
date
Fri, 15 Nov 2019 20:11:00 +0100
changeset 1210
422313c3fcbd
parent 594
3cffdd760a86
permissions
-rw-r--r--

text/rarian: initial import, closes #2311

594
3cffdd760a86 vanilla: improve docs files
David Demelier <markand@malikania.fr>
parents: 31
diff changeset
1 Vanilla Linux CONTRIBUTING GUIDE
3cffdd760a86 vanilla: improve docs files
David Demelier <markand@malikania.fr>
parents: 31
diff changeset
2 ================================
31
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
3
594
3cffdd760a86 vanilla: improve docs files
David Demelier <markand@malikania.fr>
parents: 31
diff changeset
4 Read this guide if you want to contribute to Vanilla Linux. The purpose of this
31
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
5 document is to describe the steps to submit a patch.
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
6
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
7 You may submit a patch when:
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
8
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
9 - You want to fix a bug / typo,
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
10 - You want to add a new feature,
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
11 - You want to change something.
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
12
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
13 There a lot of steps before submitting a patch. First, be sure to respect the
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
14 style defined in the STYLE.md file. We never accept patches that do not match
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
15 the rules.
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
16
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
17 Subscribe to the mailing list
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
18 -----------------------------
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
19
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
20 Discussion and patches are sent to the *vanilla-dev@malikania.fr* mailing list.
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
21 You need to subscribe by dropping a mail to
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
22 *vanilla-dev+subscribe@malikania.fr* first.
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
23
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
24 Enable patchbomb extension
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
25 --------------------------
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
26
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
27 While this step is optional, it brings the `hg email` command which makes most
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
28 of your submission for you.
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
29
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
30 To enable it, add the following into your .hgrc (you may also use the hgrc file
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
31 from the repository in .hg/hgrc).
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
32
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
33 [extensions]
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
34 patchbomb =
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
35
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
36 Then, you need to specify a mail server, if you want to use smtp, you can use
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
37 something like this:
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
38
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
39 [email]
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
40 from = Your Name <youraddress@yourdomain.tld>
594
3cffdd760a86 vanilla: improve docs files
David Demelier <markand@malikania.fr>
parents: 31
diff changeset
41 to = vanilla-dev@malikania.fr
31
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
42
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
43 [smtp]
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
44 host = yourdomain.tld
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
45 port = 587
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
46 tls = starttls
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
47 username = your_account
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
48 password = your_password
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
49
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
50 Note: the password is optional, if not set it will be asked each time you run
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
51 the `hg email command`.
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
52
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
53 More options are available, see:
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
54
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
55 - `hg help hgrc.email`,
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
56 - `hg help hgrc.smtp`,
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
57 - `hg help patchbomb`
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
58 - `hg help email`
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
59
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
60 ### Note to GMail users
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
61
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
62 By default, your GMail account may use 2-steps authentication which causes
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
63 troubles with the `hg email` command, you must create a specific application
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
64 password.
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
65
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
66 1. Go to https://security.google.com/settings/security/apppasswords
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
67 2. Create an application password, it will be auto generated,
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
68 3. Use this password or store it directly in the `smtp.password` option.
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
69
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
70 Use the following settings:
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
71
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
72 [smtp]
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
73 host = gmail.com
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
74 port = 587
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
75 tls = starttls
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
76 username = your_account@gmail.com
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
77 password = the_generated_application_password
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
78
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
79 Create your patch
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
80 -----------------
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
81
594
3cffdd760a86 vanilla: improve docs files
David Demelier <markand@malikania.fr>
parents: 31
diff changeset
82 Usually, when you create a patch, you should have your own copy of Vanilla Linux
3cffdd760a86 vanilla: improve docs files
David Demelier <markand@malikania.fr>
parents: 31
diff changeset
83 sources in your directory.
31
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
84
594
3cffdd760a86 vanilla: improve docs files
David Demelier <markand@malikania.fr>
parents: 31
diff changeset
85 The following steps assumes that you have already cloned the repository
3cffdd760a86 vanilla: improve docs files
David Demelier <markand@malikania.fr>
parents: 31
diff changeset
86 somewhere.
31
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
87
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
88 Note: the recommended way is to create one unique revision.
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
89
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
90 ### Commit messages
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
91
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
92 Commit messages are written using the following syntax:
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
93
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
94 topic: short message less than 80 characters
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
95
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
96 Optional additional description if needed.
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
97
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
98 Replace `topic` with one of the following:
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
99
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
100 - **vanilla**: for a non package changeset,
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
101 - **category/package**: for a specific package.
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
102
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
103 ### Quick way
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
104
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
105 If you plan to create a very small patch that consists of several lines, you can
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
106 use the following way by disabling the @ bookmark to avoid moving it.
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
107
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
108 $ hg pull # fetch last changesets
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
109 $ hg up @ # update to the last revision
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
110 $ hg book -i @ # disable the @ bookmark (optional but recommended)
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
111 (edit some files)
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
112 $ hg commit # create a unique revision
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
113 $ hg email -r . # send a mail about the current revision (interactive)
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
114
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
115 ### Bookmark way
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
116
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
117 We use Mercurial bookmarks as our workflow but we do share only @ bookmark
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
118 except when a long feature is being developed in parallel. Otherwise bookmarks
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
119 stay locally most of the time.
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
120
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
121 When you start working on a new feature, you **must** always start from the @
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
122 bookmark.
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
123
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
124 You can use this workflow if you plan to create a patch that consists of
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
125 multiple revisions.
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
126
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
127 Example:
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
128
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
129 $ hg pull
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
130 $ hg up @
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
131 $ hg book feature-xyz
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
132 (work)
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
133 $ hg commit
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
134 (work)
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
135 $ hg commit
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
136 $ hg email -r first:last
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
137
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
138 Here, you must specify **first** and **last** as the initial and last revisions
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
139 respectively. You can check these revisions using `hg log` (also try `hg log -G`
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
140 or the nice TortoiseHg interface).
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
141
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
142 Example, I've started to work on an a feature named **feature-xyz**, the log
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
143 looks like this:
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
144
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
145 changeset: 22:3fb15d8fc454
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
146 bookmark: feature-xyz
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
147 tag: tip
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
148 user: Fran├žois Jean <fj@gmail.com>
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
149 date: Thu Dec 08 16:08:40 2016 +0100
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
150 summary: vanilla: some other changes
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
151
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
152 changeset: 21:f27e577c5504
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
153 user: Fran├žois Jean <fj@gmail.com>
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
154 date: Thu Dec 08 16:03:06 2016 +0100
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
155 summary: vanilla: some changes
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
156
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
157 changeset: 20:777023816ff9
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
158 bookmark: @
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
159 user: David Demelier <markand@malikania.fr>
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
160 date: Thu Dec 08 16:02:26 2016 +0100
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
161 summary: vanilla: fix a bug
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
162
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
163 The two revisions I want to export are 21 and 22, so I use `hg email -r 21:22`,
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
164 once done, see the section below.
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
165
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
166 Additional topics
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
167 -----------------
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
168
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
169 ### Your patch is accepted
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
170
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
171 The safest choice is to just pull from the central repository and update to the
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
172 @ bookmark.
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
173
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
174 $ hg pull
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
175 $ hg up @
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
176
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
177 You can also call `hg rebase` (from rebase extension) to move your revisions on
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
178 top of upstream. If the patches were incorporated verbatim, they will be safely
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
179 discarded automatically.
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
180
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
181 $ hg pull
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
182 $ hg up @
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
183 $ hg rebase -b feature-xyz -d @
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
184 $ hg book -d feature-xyz
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
185
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
186 If you didn't created a bookmark replace **feature-xyz** with your revision
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
187 number.
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
188
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
189 Finally, if you prefer to remove the revisions you have created, use `hg strip`
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
190 like explained in the see section below.
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
191
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
192 ### Your patch is discarded
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
193
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
194 For some reasons, your patch can not be integrated within the official
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
195 repository, you can remove the revisions you have commited or keep them.
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
196
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
197 If you want to remove the revisions, you can use the `hg strip` command (from
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
198 the strip extension).
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
199
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
200 Warning: it will **remove** the revisions from history so use with care.
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
201
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
202 $ hg strip -r 21:22 # using the example above
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
203 $ hg book -d feature-xyz # delete the bookmark
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
204
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
205 Newer versions of Mercurial support `-B` argument:
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
206
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
207 $ hg strip -B feature-xyz # shortcut
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
208
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
209 You can just go back on the @ bookmark as it's the safest choice.
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
210
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
211 $ hg pull # fetch changesets
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
212 $ hg up @ # update to @
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
213
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
214 ### How to merge upstream code to continue my patch
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
215
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
216 Sometimes when you started working on a topic, you may need to pull changes from
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
217 the repository. The idea is to pull the changes and rebase your work on top of
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
218 it.
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
219
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
220 You must run these commands while your bookmark is active
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
221
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
222 $ hg up feature-xyz
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
223 $ hg pull -B @
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
224 $ hg rebase -b feature-xyz -d @
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
225
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
226 ### I forgot to create a bookmark and accidentally moved the @ bookmark
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
227
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
228 If you forgot to create a custom bookmark or disable @ before committing, you
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
229 may have moved the @ bookmark in your repository. The `hg pull` command can
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
230 recover it.
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
231
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
232 First, we create it now to point at your local revisions (optional).
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
233
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
234 $ hg book feature-xyz
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
235
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
236 Then, put it where it should be.
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
237
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
238 $ hg pull -B @
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
239
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
240 Now @ will be placed to the same revision as the central repository. If some
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
241 changesets have been pulled, you may look at the previous topic to rebase your
afb6f8eb89da vanilla: add more documentation
David Demelier <markand@malikania.fr>
parents:
diff changeset
242 work on top of it.

mercurial