Bugzilla:Committing Patches: Difference between revisions

Change the error from <pre> to <code>
No edit summary
(Change the error from <pre> to <code>)
Line 6: Line 6:
#If you have never told bzr your name and email address, you have to use "bzr whoami" to do this: <pre>bzr whoami 'Max Kanat-Alexander &lt;mkanat@bugzilla.org&gt;'</pre> (Of course, you would replace that name and email address with your own.) The email address that you use must be identical to your login name for bzr.mozilla.org.<br><br>Please include both your full name and your email address in the "whoami", because your full name is what is displayed in the web view of the repository.  
#If you have never told bzr your name and email address, you have to use "bzr whoami" to do this: <pre>bzr whoami 'Max Kanat-Alexander &lt;mkanat@bugzilla.org&gt;'</pre> (Of course, you would replace that name and email address with your own.) The email address that you use must be identical to your login name for bzr.mozilla.org.<br><br>Please include both your full name and your email address in the "whoami", because your full name is what is displayed in the web view of the repository.  
#Configure bzr to know about bugzilla.mozilla.org as a bug-tracker (this will be important when you get to the actual commit step). To do this, edit the <code>.bazaar/bazaar.conf</code> file in your home directory and add this line at the end: <pre>bugzilla_mozilla_url = https://bugzilla.mozilla.org</pre> (If you're on Windows, this file is in <code>C:\Documents and Settings\&lt;username&gt;\Application Data\Bazaar\2.0</code> instead of in <code>$HOME/.bazaar</code>.)  
#Configure bzr to know about bugzilla.mozilla.org as a bug-tracker (this will be important when you get to the actual commit step). To do this, edit the <code>.bazaar/bazaar.conf</code> file in your home directory and add this line at the end: <pre>bugzilla_mozilla_url = https://bugzilla.mozilla.org</pre> (If you're on Windows, this file is in <code>C:\Documents and Settings\&lt;username&gt;\Application Data\Bazaar\2.0</code> instead of in <code>$HOME/.bazaar</code>.)  
#Get a checkout of Bugzilla using <code>bzr+ssh://</code> (not just <code>bzr://</code>): <pre>bzr co bzr+ssh://username@domain.com@bzr.mozilla.org/bugzilla/trunk bugzilla</pre> Note: If you want to avoid including your username every time you do a checkout over bzr+ssh, you can edit <code>$HOME/.ssh/config</code> and add the following lines:<br><br><code>Host bzr.mozilla.org<br>&nbsp;&nbsp;&nbsp;&nbsp;User username@domain.com</code><br><br>If you fail to use bzr+ssh, when you try and modify the repo you will get the unhelpful error: <pre>bzr: ERROR: Cannot lock LockDir(filtered-145825772:///bugzilla/some/path/.bzr/branch/lock): Transport operation not possible: readonly transport</pre>
#Get a checkout of Bugzilla using <code>bzr+ssh://</code> (not just <code>bzr://</code>): <pre>bzr co bzr+ssh://username@domain.com@bzr.mozilla.org/bugzilla/trunk bugzilla</pre> Note: If you want to avoid including your username every time you do a checkout over bzr+ssh, you can edit <code>$HOME/.ssh/config</code> and add the following lines:<br><br><code>Host bzr.mozilla.org<br>&nbsp;&nbsp;&nbsp;&nbsp;User username@domain.com</code><br><br>If you fail to use bzr+ssh, when you try and modify the repo you will get the unhelpful error: <code>bzr: ERROR: Cannot lock LockDir(filtered-145825772:///bugzilla/some/path/.bzr/branch/lock): Transport operation not possible: readonly transport</code>
#Apply the patch you'll be committing: <pre>cd bugzilla; patch -p0 &lt; patchfile</pre> (Or, if it's a bundle, see the instructions on [[Bugzilla:Patches|applying bundles]].)  
#Apply the patch you'll be committing: <pre>cd bugzilla; patch -p0 &lt; patchfile</pre> (Or, if it's a bundle, see the instructions on [[Bugzilla:Patches|applying bundles]].)  
#Run "bzr add" to add any files that should be added: <pre>bzr add</pre> If you add the same file on multiple branches, make sure to use the argument <code>--file-ids-from=/path/to/trunk-checkout</code> for all adds that aren't on the trunk.
#Run "bzr add" to add any files that should be added: <pre>bzr add</pre> If you add the same file on multiple branches, make sure to use the argument <code>--file-ids-from=/path/to/trunk-checkout</code> for all adds that aren't on the trunk.
canmove, Confirmed users
345

edits