diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2015-10-17 17:50:54 -0400 |
---|---|---|
committer | Xavier Claessens <xavier.claessens@collabora.com> | 2015-10-17 17:50:54 -0400 |
commit | 1462d349afaeb74c356439e8a37605bee27568b4 (patch) | |
tree | 1c51651eb8e18e7dd710a6fbd82304cad6edbbdc /README |
Initial commit
Diffstat (limited to 'README')
-rw-r--r-- | README | 72 |
1 files changed, 72 insertions, 0 deletions
@@ -0,0 +1,72 @@ +INSTALL +======= + +Copy or symlink executables into your $PATH. + ln -s $PWD/git-phab ~/.local/bin/ + +REQUIREMENTS +============ + + - pip3 install GitPython + - arcanist + +DESCRIPTION +=========== + +Git subcommand to integrate with phabricator. + +The 'attach' command creates a new differential for each commit in the provided +range. Commit messages will be rewritten to include the URL of the newly created +Differential (no other information will be added to the message). If a commit +message already contains the URL of a Differential it will be updated instead of +creating a new one. + +The 'attach' command can also push the current HEAD as a new branch on a remote +repository. The branch will be named 'wip/phab/T123' when the '--task T123' +argument is given or if current branch's name is in the form "T123" or +"T123-description". Note that the remote URI should always be readable by anyone +so you might want to set it up like: + + git remote add publish git://foo + git remote set-url --push publish git+ssh://foo + git config phab.remote publish + +The 'fetch' command pulls the branch referenced by a task. + +Notes: + - Repository must be clean, use 'git stash' if needed. + - Range must not contain merge commits, use 'git rebase' if needed. + - Range must be contained in the current branch, but can stop before HEAD. In + that case commits after the end of your range will be cherry-picked after + attaching commits to Differential. + - If attaching one of the commits fails (e.g. lint is unhappy with your coding + style) the original commit will still be picked and it will still attempt to + attach next commits. So it will never leave your repository in unconsistent + state. Failed commits will be shown in a summary at the end of the process + and can then be attached separately after being fixed with for example + 'git commit --amend' or 'git rebase -i'. + - Only one branch can be associated per task. + +Examples: + # Attach all commits since origin/master + git phab attach + + # Attach only the top commit + git phab attach HEAD + + # Attach all commits since origin/master, excluding top commit + git phab attach origin/master..HEAD^ + + # Attach top 3 patches, link them to a task, and set reviewers + git phab attach --reviewers xclaesse,smcv --task T123 HEAD~3.. + + # Push current branch to origin/wip/phab/T123 + git config phab.remote origin + git phab attach --task T123 + + # Fetch a branch associated with the task T123 + git phab fetch T123 + +The 'log' command shows the list of commits in a range together with their +Differential link if any. The range definition is the same as for 'attach' +command, and is thus useful to know what attach would do. |