Bugzilla:Committing Patches: Difference between revisions

"add" on multiple branches should use --file-ids-from, to make life a little easier for mergers
(Add a note about editing .ssh/config for username)
("add" on multiple branches should use --file-ids-from, to make life a little easier for mergers)
Line 8: Line 8:
#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>
#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>
#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>  
#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.
#Check that everything is as it should be: <pre>bzr status</pre>  
#Check that everything is as it should be: <pre>bzr status</pre>  
#Commit the patch: <pre>bzr commit --fixes mozilla:123456 --author='Somebody Else &lt;somebody@example.com&gt;'</pre> That number after <code>--fixes</code> is the bug id that the patch fixes. You should specify this with every commit. <code>--author</code> is used only when you are committing somebody else's patch. It lets bzr know who the actual author of the patch is.<br><br>It's very important to remember <code>--fixes</code> and (if necessary) <code>--author</code>--they cannot be set ''after'' you have committed, only while you are committing.  
#Commit the patch: <pre>bzr commit --fixes mozilla:123456 --author='Somebody Else &lt;somebody@example.com&gt;'</pre> That number after <code>--fixes</code> is the bug id that the patch fixes. You should specify this with every commit. <code>--author</code> is used only when you are committing somebody else's patch. It lets bzr know who the actual author of the patch is.<br><br>It's very important to remember <code>--fixes</code> and (if necessary) <code>--author</code>--they cannot be set ''after'' you have committed, only while you are committing.  
canmove, Confirmed users
345

edits