Auto-tools/Projects/Mozmill/RepoSetup: Difference between revisions

 
(8 intermediate revisions by 4 users not shown)
Line 1: Line 1:
= Getting Started =
= Getting Started =
* Get a [https://github.com/ GitHub account]
* Get a [https://github.com/ GitHub account]
* Fork the [http://github.com/mozautomation/mozmill mozautomation/mozmill] repo (use the Github UI for this)
* Fork the [http://github.com/mozilla/mozmill mozilla/mozmill] repo (use the Github UI for this)
* Install [http://git-scm.com/ git] on your system
* Install [http://git-scm.com/ git] on your system
* Clone your fork using your ssh key URL on Github:  
* Clone your fork using your ssh key URL on Github:  
<pre>git clone git@github.com:<your-github-username>/mozmill.git</pre>
<pre>git clone git@github.com:<your-github-username>/mozmill.git</pre>
* If you don't want to get a Github account, you can still clone the repository, but you won't be able to push upstream or issue pull requests:
* If you don't want to get a Github account, you can still clone the repository, but you won't be able to push upstream or issue pull requests:
<pre>git clone http://github.com/mozautomation/mozmill.git</pre>
<pre>git clone http://github.com/mozilla/mozmill.git</pre>


= Setting up for Development on Master =
= Setting up for Development on Master =
Master is where the next version of Mozmill comes from.  To get ready to work here, you'll need to be able to pull in changes from the remote mozautomation repo.  To set that up, you add it as a remote repo:
Master is where the next version of Mozmill comes from.  To get ready to work here, you'll need to be able to pull in changes from the remote mozautomation repo.  To set that up, you add it as a remote repo:
<pre>cd mozmill; git remote add mozauto git://github.com/mozautomation/mozmill.git</pre>
<pre>cd mozmill; git remote add mozilla git://github.com/mozilla/mozmill.git</pre>


If you are going to commit to master:
If you are going to commit to master:
<pre>git remote add mozauto git@github.com:mozautomation/mozmill.git</pre>
<pre>git remote add mozilla git@github.com:mozilla/mozmill.git</pre>


Here's how to stay up to date with the remote mozautomation repository:
Here's how to stay up to date with the remote mozautomation repository:
<pre>
<pre>
git pull --rebase mozauto master  # Pulls changes from mozauto to your local machine
git pull --rebase mozilla master  # Pulls changes from mozilla to your local machine
git push origin master            # Pushes any changes from mozauto to your Github fork
git push origin master            # Pushes any changes from mozilla to your Github fork
</pre>
</pre>
Now you're in sync.  Unless you're working on a maintenance release, skip down to "getting stuff done".
Now you're in sync.  Unless you're working on a maintenance release, skip down to "getting stuff done".
Line 26: Line 26:
Pull the 1.5 code into a local branch:
Pull the 1.5 code into a local branch:
<pre>
<pre>
git fetch mozauto
git fetch mozilla
git branch hotfix-1.5 mozauto/hotfix-1.5
git branch hotfix-1.5 mozilla/hotfix-1.5
git checkout hotfix-1.5
git checkout hotfix-1.5
</pre>
</pre>
Line 33: Line 33:


To keep your hotfix-1.5 branch updated with the changes to mozauto's 1.5 branch:
To keep your hotfix-1.5 branch updated with the changes to mozauto's 1.5 branch:
<pre>git pull --rebase mozauto hotfix-1.5</pre>
<pre>git pull --rebase mozilla hotfix-1.5</pre>


= Getting Stuff Done =
= Getting Stuff Done =
Line 57: Line 57:
We want to diff your feature branch against the master branch.  So ensure your master is up to date and create the diff:
We want to diff your feature branch against the master branch.  So ensure your master is up to date and create the diff:
<pre>
<pre>
git checkout myfeature                 // switch to myfeature branch if not already on it
git checkout myfeature   // switch to myfeature branch if not already on it
git diff -U8 -p master > mypatch.diff   // Create the patch
git rebase -i master    // Rewrite commits to a single one
git format-patch HEAD^   // Create the patch
</pre>
</pre>
Now, attach that patch to a bug in [http://bugzilla.mozilla.org Bugzilla] for review.  Don't forget to set the "Review" flag to "?" and add one of the Mozmill module owners in the text box to the right. When in doubt, put in :ctalbert.
Now, attach the created file to a bug in [http://bugzilla.mozilla.org Bugzilla] for review.  Don't forget to set the "Review" flag to "?" and add one of the Mozmill module owners in the text box to the right. When in doubt, put in :ctalbert.


== Ready to Push ==
== Ready to Push ==
Line 71: Line 72:
</pre>
</pre>


Ok, you've gotten your review, your commits are in good shape, and your commit message is correct, then you're ready to push, let's say you want to push to mozauto/master:
Ok, you've gotten your review, your commits are in good shape, and your commit message is correct, then you're ready to push, let's say you want to push to mozilla/master:
<pre>
<pre>
git checkout master              // Switch to master branch
git checkout master              // Switch to master branch
git pull --rebase mozauto master // Ensure your master is up to date: see below...
git pull --rebase mozilla master // Ensure your master is up to date: see below...
git merge myfeature              // Merges your commits to the master
git merge myfeature              // Merges your commits to the master
git push origin master          // Pushes to your fork
git push origin master          // Pushes to your fork
git push mozauto master          // Pushes to mozautomation master
git push mozilla master          // Pushes to mozilla master
                                 // PARTY!
                                 // PARTY!
</pre>
</pre>
Line 99: Line 100:
This is about writing tests for the Mozmill tool itself, not writing Mozmill tests.  For writing Mozmill tests, please refer to the [https://developer.mozilla.org/en/Mozmill Mozilla Developer Network pages].  
This is about writing tests for the Mozmill tool itself, not writing Mozmill tests.  For writing Mozmill tests, please refer to the [https://developer.mozilla.org/en/Mozmill Mozilla Developer Network pages].  


A test framework for the Mozmill tool itself has been constructed. See: https://github.com/mozautomation/mozmill/tree/master/mutt
A test framework for the Mozmill tool itself has been constructed. See: https://github.com/mozilla/mozmill/tree/master/mutt
canmove, Confirmed users, Bureaucrats and Sysops emeriti
4,714

edits