Mercurial > hg > CbC > CbC_llvm
comparison docs/Phabricator.rst @ 148:63bd29f05246
merged
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 14 Aug 2019 19:46:37 +0900 |
parents | c2174574ed3a |
children |
comparison
equal
deleted
inserted
replaced
146:3fc4d5c3e21e | 148:63bd29f05246 |
---|---|
1 .. _phabricator-reviews: | |
2 | |
1 ============================= | 3 ============================= |
2 Code Reviews with Phabricator | 4 Code Reviews with Phabricator |
3 ============================= | 5 ============================= |
4 | 6 |
5 .. contents:: | 7 .. contents:: |
14 to respond to free-form comments in mail sent to the commits list. | 16 to respond to free-form comments in mail sent to the commits list. |
15 | 17 |
16 Sign up | 18 Sign up |
17 ------- | 19 ------- |
18 | 20 |
19 To get started with Phabricator, navigate to `http://reviews.llvm.org`_ and | 21 To get started with Phabricator, navigate to `https://reviews.llvm.org`_ and |
20 click the power icon in the top right. You can register with a GitHub account, | 22 click the power icon in the top right. You can register with a GitHub account, |
21 a Google account, or you can create your own profile. | 23 a Google account, or you can create your own profile. |
22 | 24 |
23 Make *sure* that the email address registered with Phabricator is subscribed | 25 Make *sure* that the email address registered with Phabricator is subscribed |
24 to the relevant -commits mailing list. If you are not subscribed to the commit | 26 to the relevant -commits mailing list. If you are not subscribed to the commit |
92 This choice is not crucial, because you are merely suggesting and not requiring | 94 This choice is not crucial, because you are merely suggesting and not requiring |
93 them to participate. Many people will see the email notification on cfe-commits | 95 them to participate. Many people will see the email notification on cfe-commits |
94 or llvm-commits, and if the subject line suggests the patch is something they | 96 or llvm-commits, and if the subject line suggests the patch is something they |
95 should look at, they will. | 97 should look at, they will. |
96 | 98 |
99 | |
100 .. _finding-potential-reviewers: | |
101 | |
102 Finding potential reviewers | |
103 --------------------------- | |
104 | |
97 Here are a couple of ways to pick the initial reviewer(s): | 105 Here are a couple of ways to pick the initial reviewer(s): |
98 | 106 |
99 * Use ``svn blame`` and the commit log to find names of people who have | 107 * Use ``svn blame`` and the commit log to find names of people who have |
100 recently modified the same area of code that you are modifying. | 108 recently modified the same area of code that you are modifying. |
101 * Look in CODE_OWNERS.TXT to see who might be responsible for that area. | 109 * Look in CODE_OWNERS.TXT to see who might be responsible for that area. |
143 :: | 151 :: |
144 | 152 |
145 Differential Revision: <URL> | 153 Differential Revision: <URL> |
146 | 154 |
147 where ``<URL>`` is the URL for the code review, starting with | 155 where ``<URL>`` is the URL for the code review, starting with |
148 ``http://reviews.llvm.org/``. | 156 ``https://reviews.llvm.org/``. |
149 | 157 |
150 This allows people reading the version history to see the review for | 158 This allows people reading the version history to see the review for |
151 context. This also allows Phabricator to detect the commit, close the | 159 context. This also allows Phabricator to detect the commit, close the |
152 review, and add a link from the review to the commit. | 160 review, and add a link from the review to the commit. |
153 | 161 |
154 Note that if you use the Arcanist tool the ``Differential Revision`` line will | 162 Note that if you use the Arcanist tool the ``Differential Revision`` line will |
155 be added automatically. If you don't want to use Arcanist, you can add the | 163 be added automatically. If you don't want to use Arcanist, you can add the |
156 ``Differential Revision`` line (as the last line) to the commit message | 164 ``Differential Revision`` line (as the last line) to the commit message |
157 yourself. | 165 yourself. |
158 | 166 |
159 Using the Arcanist tool can simplify the process of committing reviewed code | 167 Using the Arcanist tool can simplify the process of committing reviewed code as |
160 as it will retrieve reviewers, the ``Differential Revision``, etc from the review | 168 it will retrieve reviewers, the ``Differential Revision``, etc from the review |
161 and place it in the commit message. Several methods of using Arcanist to commit | 169 and place it in the commit message. You may also commit an accepted change |
162 code are given below. If you do not wish to use Arcanist then simply commit | 170 directly using ``git llvm push``, per the section in the :ref:`getting started |
163 the reviewed patch as you would normally. | 171 guide <commit_from_git>`. |
164 | 172 |
165 Note that if you commit the change without using Arcanist and forget to add the | 173 Note that if you commit the change without using Arcanist and forget to add the |
166 ``Differential Revision`` line to your commit message then it is recommended | 174 ``Differential Revision`` line to your commit message then it is recommended |
167 that you close the review manually. In the web UI, under "Leap Into Action" put | 175 that you close the review manually. In the web UI, under "Leap Into Action" put |
168 the SVN revision number in the Comment, set the Action to "Close Revision" and | 176 the SVN revision number in the Comment, set the Action to "Close Revision" and |
169 click Submit. Note the review must have been Accepted first. | 177 click Submit. Note the review must have been Accepted first. |
170 | 178 |
171 Subversion and Arcanist | 179 |
172 ^^^^^^^^^^^^^^^^^^^^^^^ | 180 Committing someone's change from Phabricator |
173 | 181 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
174 On a clean Subversion working copy run the following (where ``<Revision>`` is | |
175 the Phabricator review number): | |
176 | |
177 :: | |
178 | |
179 arc patch D<Revision> | |
180 arc commit --revision D<Revision> | |
181 | |
182 The first command will take the latest version of the reviewed patch and apply it to the working | |
183 copy. The second command will commit this revision to trunk. | |
184 | |
185 git-svn and Arcanist | |
186 ^^^^^^^^^^^^^^^^^^^^ | |
187 | |
188 This presumes that the git repository has been configured as described in :ref:`developers-work-with-git-svn`. | |
189 | 182 |
190 On a clean Git repository on an up to date ``master`` branch run the | 183 On a clean Git repository on an up to date ``master`` branch run the |
191 following (where ``<Revision>`` is the Phabricator review number): | 184 following (where ``<Revision>`` is the Phabricator review number): |
192 | 185 |
193 :: | 186 :: |
197 | 190 |
198 This will create a new branch called ``arcpatch-D<Revision>`` based on the | 191 This will create a new branch called ``arcpatch-D<Revision>`` based on the |
199 current ``master`` and will create a commit corresponding to ``D<Revision>`` with a | 192 current ``master`` and will create a commit corresponding to ``D<Revision>`` with a |
200 commit message derived from information in the Phabricator review. | 193 commit message derived from information in the Phabricator review. |
201 | 194 |
202 Check you are happy with the commit message and amend it if necessary. Now switch to | 195 Check you are happy with the commit message and amend it if necessary. Then, |
203 the ``master`` branch and add the new commit to it and commit it to trunk. This | 196 make sure the commit is up-to-date, and commit it. This can be done by running |
204 can be done by running the following: | 197 the following: |
205 | 198 |
206 :: | 199 :: |
207 | 200 |
208 git checkout master | 201 git pull --rebase origin master |
209 git merge --ff-only arcpatch-D<Revision> | 202 git show # Ensure the patch looks correct. |
210 git svn dcommit | 203 ninja check-$whatever # Rerun the appropriate tests if needed. |
211 | 204 git llvm push |
212 | 205 |
206 Subversion and Arcanist (deprecated) | |
207 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
208 | |
209 To download a change from Phabricator and commit it with subversion, you should | |
210 first make sure you have a clean working directory. Then run the following | |
211 (where ``<Revision>`` is the Phabricator review number): | |
212 | |
213 :: | |
214 | |
215 arc patch D<Revision> | |
216 arc commit --revision D<Revision> | |
217 | |
218 The first command will take the latest version of the reviewed patch and apply | |
219 it to the working copy. The second command will commit this revision to trunk. | |
213 | 220 |
214 Abandoning a change | 221 Abandoning a change |
215 ------------------- | 222 ------------------- |
216 | 223 |
217 If you decide you should not commit the patch, you should explicitly abandon | 224 If you decide you should not commit the patch, you should explicitly abandon |
233 on an `llvm-reviews GitHub project`_ where folks can hack on it and post pull | 240 on an `llvm-reviews GitHub project`_ where folks can hack on it and post pull |
234 requests. We're looking into what the right long-term hosting for this is, but | 241 requests. We're looking into what the right long-term hosting for this is, but |
235 note that it is a derivative of an existing open source project, and so not | 242 note that it is a derivative of an existing open source project, and so not |
236 trivially a good fit for an official LLVM project. | 243 trivially a good fit for an official LLVM project. |
237 | 244 |
238 .. _LLVM's Phabricator: http://reviews.llvm.org | 245 .. _LLVM's Phabricator: https://reviews.llvm.org |
239 .. _`http://reviews.llvm.org`: http://reviews.llvm.org | 246 .. _`https://reviews.llvm.org`: https://reviews.llvm.org |
240 .. _Code Repository Browser: http://reviews.llvm.org/diffusion/ | 247 .. _Code Repository Browser: https://reviews.llvm.org/diffusion/ |
241 .. _Arcanist Quick Start: https://secure.phabricator.com/book/phabricator/article/arcanist_quick_start/ | 248 .. _Arcanist Quick Start: https://secure.phabricator.com/book/phabricator/article/arcanist_quick_start/ |
242 .. _Arcanist User Guide: https://secure.phabricator.com/book/phabricator/article/arcanist/ | 249 .. _Arcanist User Guide: https://secure.phabricator.com/book/phabricator/article/arcanist/ |
243 .. _llvm-reviews GitHub project: https://github.com/r4nt/llvm-reviews/ | 250 .. _llvm-reviews GitHub project: https://github.com/r4nt/llvm-reviews/ |