Changes between Initial Version and Version 1 of Phabricator


Ignore:
Timestamp:
Jan 23, 2017, 1:01:07 PM (7 years ago)
Author:
Itms
Comment:

New page for Phabricator

Legend:

Unmodified
Added
Removed
Modified
  • Phabricator

    v1 v1  
     1Our Phabricator instance is located at https://code.wildfiregames.com. Any issue with the website should be reported to Itms.
     2
     3== Creating an account ==
     4
     5When creating your account, choose the username '''carefully'''. If you are to become a team member, the username will be your commit name so Phabricator maps your account with your SVN commits. If you already are a team member, choose your Phabricator username so it matches exactly your SVN username.
     6
     7When logged in, you can customize a lot of things by clicking your user icon and the settings icon at the right-top of the page.
     8
     9== Finding your way around ==
     10
     11The applications you should need regularly are pinned at the left.
     12
     13* ''Differential'' allows you to create revisions and get reviews.
     14* ''Diffusion'' allows you to browse SVN commits.
     15* ''Audit'' allows you to "raise concerns" over previous commits, so issues are fixed ASAP, and not forgotten.
     16* ''Paste'' is a handy tool, make use of it instead of using alternative tools like Pastebin or Gists.
     17
     18A lot of other applications are available under Applications. If you find yourself using one frequently, you can pin it.
     19
     20== Using Differential ==
     21
     22Differential is a really powerful tool. It allows you to upload and download patches easily for review.
     23
     24A revision is a proposal of some code change. It is associated a diff, which is just a code difference. You can update the diff associated with a revision, based on comments, reviews, etc. Each time the diff is updated, Jenkins will download it, apply it to the current SVN, build and run tests; it will then post the results to the revision.
     25
     26Read [wiki:SubmittingPatches] for more information on the review process.
     27
     28There are two ways to upload patches: using Arcanist (recommended) or doing it manually.
     29
     30=== Using Arcanist ===
     31
     32Phabricator can be interacted with through Arcanist, a command line interface. The installation of Arcanist might not be too user-friendly but the user guide [https://secure.phabricator.com/book/phabricator/article/arcanist/ there] should contain what you need. Basically you will need to install php-cli, get the code for Arcanist and add the tools to your PATH.
     33
     34On Windows, I recommend using the Git Bash tool that comes with [https://git-scm.com/ Git], which you will need to install Arcanist anyways.
     35
     36Take a look at the [wiki:Phabricator#CommonproblemswithArcanist Common problems with Arcanist] section below if you have any trouble.
     37
     38Finally, associate arc with your credentials on code.wildfiregames.com using
     39{{{
     40arc install-certificate
     41}}}
     42
     43Two commands are important, that you can run at the root of a SVN clone (where .arcconfig is):
     44
     45{{{
     46arc patch Dn
     47}}}
     48applies the revision Dn (n being an integer) to your working copy. No need to download and apply, easy to update when a contributor updates a revision with a new diff, and more...
     49
     50{{{
     51arc diff --preview
     52}}}
     53creates a diff from your working copy and uploads it to Phabricator. When following the given link, you will be able to create a new revision or update an existing one with the new code change.
     54
     55Always create diffs from a clone to the public SVN. Since Phabricator tracks the public repo, if you create diffs from a clone of the commit-access one, paths won't match.
     56
     57=== Manually uploading a patch ===
     58
     59You can also create a patch by using `svn diff` (or the corresponding "Create patch" feature with TortoiseSVN on Windows, or `git format-patch` if you work on a git clone).
     60
     61Always create the diff from the root of the repository (where .arcconfig is).
     62
     63It is recommended to generate the patch with full file context so review is eased on Phabricator. Use
     64{{{
     65svn diff --diff-cmd=diff -x -U999999
     66}}}
     67to do so.
     68
     69=== Committing ===
     70
     71If you have commit access, you can clone the non-public repository. Then, you can use
     72{{{
     73arc patch Dn
     74svn st
     75}}}
     76and check everything is ready for commit.
     77
     78The commit message must contain
     79{{{
     80Differential Revision: https://code.wildfiregames.com/Dn
     81}}}
     82on its own line at the end of the message!
     83
     84A useful command is
     85{{{
     86arc commit --revision Dn --show
     87}}}
     88which pre-formats a very verbose commit message. You can copy it, remove the unneeded content and paste it into the commit message editor.
     89
     90Always use `--show` or you will commit without confirmation! For more safety you can use the command in a public clone.
     91
     92== Porting patches from Trac ==
     93
     94Please port your own patches from Trac. Don't port other people's patches! Revision authors must be the actual patch authors.
     95
     96To do so, I suggest running:
     97{{{
     98svn patch /path/to/your_patch.diff
     99arc diff --preview
     100}}}
     101
     102Then click on the link.
     103* Name the new revision and add a summary and a test plan.
     104* Write the Trac ticket number in the Trac tickets field.
     105* In the summary, if you write `#1234`, Phabricator should replace that with a link to the Trac ticket.
     106
     107== Common problems with Arcanist ==
     108
     109Some frequent issues with Arcanist are listed below, along with tips.
     110
     111On Windows,
     112* Make sure TortoiseSVN is installed with the box `command line client tools` checked.
     113* You will need to patch Arcanist against [https://secure.phabricator.com/T8075 T8075]. To do so, in your clone of the arcanist git repository, run
     114{{{
     115git remote add oujesky https://github.com/oujesky/arcanist.git
     116git fetch oujesky
     117git cherry-pick b728af9
     118}}}
     119
     120If you get errors about 'SimpleXMLElement' it's because PHP 7 does not come with php-xml. You have to install that package, which might be called php7-xml.
     121
     122If Arcanist "cannot parse svninfo" it's because your locale outputs the result of the command "svn info" in something that is not English. You can write to your shell rc file something like
     123{{{
     124alias arc='LANG=C LC_ALL=C arc'
     125}}}
     126in order to make SVN output information in its default locale, which is English, and that Arcanist can parse.