Difference between revisions of "Krita/FeatureBranchesWorkflow"

Jump to: navigation, search
Line 1: Line 1:
 
= Feature Branches Workflow =
 
= Feature Branches Workflow =
 
+
<ol>
# All your work on implementing new features should happen in separate branches, not in master.
+
<li>All your work on implementing new features should happen in separate branches, not in master.</li>
# Branch name shoudl have the following structure <tt><yourname>/<featurename></tt>
+
<li>Branch name shoudl have the following structure <tt><yourname>/<featurename></tt></li>
# Merging of the branches to master is allowed during the 2-week merge window in the beginning of every 6-weeks release cycle
+
<li>Merging of the branches to master is allowed during the 2-week merge window in the beginning of every 6-weeks release cycle</li>
# Before merging the branch into master, you should make a review request for it.  
+
<li>Before merging the branch into master, you should make a review request for it. </li>
 
<pre>
 
<pre>
 
# switch to your branch
 
# switch to your branch
Line 18: Line 18:
 
arc diff origin/master
 
arc diff origin/master
 
</pre>
 
</pre>
 
 
'''NOTE:''' Make sure you didn't merge master into your branch manually right before generating a diff! If you did, arcanist will overwrite your merging commit. If he did, reset your current head to the latest pushed commit  
 
'''NOTE:''' Make sure you didn't merge master into your branch manually right before generating a diff! If you did, arcanist will overwrite your merging commit. If he did, reset your current head to the latest pushed commit  
<pre>git reset --hard origin/<your/branch/name></pre>
+
<pre>git reset --hard origin/<your/branch/name></pre></li>
 
+
<li>Your review request text should be formatted as if it is a real commit. When you land the patch with arcanist, this text will be used for an actual commit
# Your review request text should be formatted as if it is a real commit. When you land the patch with arcanist, this text will be used for an actual commit
 
 
<pre>
 
<pre>
 
One line short description of the changes
 
One line short description of the changes
Line 40: Line 38:
 
## Add next line if your commit has features that need to be publised in social media/site/twitter
 
## Add next line if your commit has features that need to be publised in social media/site/twitter
 
Auditors:#krita_website_and_translations
 
Auditors:#krita_website_and_translations
</pre>
+
</pre></li>
# Make sure you have put the keyword to close the bug you have fixed
+
<li>Make sure you added a keyword to close the bug you have fixed</li>
# Make sure you have put the keyword to close or reference the Maniphest ticket you have been working on
+
<li>Make sure you added a keyword to close or reference the Maniphest ticket you have been working on</li>
# When you got the review and want to update your patch, do
+
<li>When you got the review and want to update your patch, do
 
<pre>
 
<pre>
 
git push
 
git push
 
git fetch
 
git fetch
 
arc diff --update D<your-revision-id> origin/master
 
arc diff --update D<your-revision-id> origin/master
</pre>
+
</pre></li>
# When you have green light for merging your branch into master, land it with the following command:
+
<li>When you have green light for merging your branch into master, land it with the following command:
 
<pre>
 
<pre>
 
git checkout your/branch/name
 
git checkout your/branch/name
 
arc land --merge --hold
 
arc land --merge --hold
</pre>
+
</pre></li>
# Make sure you use ''--merge'' option to avoid squashed commit. Squashed commits break ''git blame'' functionality, so are highly NOT recommended.
+
<li>Make sure you use ''--merge'' option to avoid squashed commit. Squashed commits break ''git blame'' functionality, so are highly NOT recommended.</li>
# Use ''--hold'' option to not allow arcanit to push your changes. It will prepare the commit for you, so you will be able to check the message and probably edit it with ''git commit --amend''
+
<li>Use ''--hold'' option to not allow arcanit to push your changes. It will prepare the commit for you, so you will be able to check the message and probably edit it with ''git commit --amend''</li>
# After you checked the commit message and tags, push your changes to the repository
+
<li>After you checked the commit message and tags, push your changes to the repository</li>

Revision as of 19:35, 1 August 2016

Feature Branches Workflow

  1. All your work on implementing new features should happen in separate branches, not in master.
  2. Branch name shoudl have the following structure <yourname>/<featurename>
  3. Merging of the branches to master is allowed during the 2-week merge window in the beginning of every 6-weeks release cycle
  4. Before merging the branch into master, you should make a review request for it.
  5. # switch to your branch
    git checkout your/branch/name
    
    # make sure you have pushed your work to the repository
    git push
    
    # fetch the latest changes in origin/master
    git fetch
    
    # generate a diff relative to the remote version of master
    arc diff origin/master
    

    NOTE: Make sure you didn't merge master into your branch manually right before generating a diff! If you did, arcanist will overwrite your merging commit. If he did, reset your current head to the latest pushed commit

    git reset --hard origin/<your/branch/name>
  6. Your review request text should be formatted as if it is a real commit. When you land the patch with arcanist, this text will be used for an actual commit
    One line short description of the changes
    
    Long description of the changed that happened
    lately in your branch with mentioning all the cute
    features it has and all the nice people you had to 
    talk to to get the complete understanding of it.
    
    BUG:<bugnumber-you-fixed>
    Fixes T<phabricator-task-id-that-is-fixed>
    Ref T<phabricator-task-id-that-is-related-but-not-fixed>
    
    ## Add next line if your commit has features that need to be added to the Krita Manual
    Auditors:#krita_manual,#krita_website_and_translations
    
    ## Add next line if your commit has features that need to be publised in social media/site/twitter
    Auditors:#krita_website_and_translations
    
  7. Make sure you added a keyword to close the bug you have fixed
  8. Make sure you added a keyword to close or reference the Maniphest ticket you have been working on
  9. When you got the review and want to update your patch, do
    git push
    git fetch
    arc diff --update D<your-revision-id> origin/master
    
  10. When you have green light for merging your branch into master, land it with the following command:
    git checkout your/branch/name
    arc land --merge --hold
    
  11. Make sure you use --merge option to avoid squashed commit. Squashed commits break git blame functionality, so are highly NOT recommended.
  12. Use --hold option to not allow arcanit to push your changes. It will prepare the commit for you, so you will be able to check the message and probably edit it with git commit --amend
  13. After you checked the commit message and tags, push your changes to the repository

Content is available under Creative Commons License SA 4.0 unless otherwise noted.