<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.mozilla.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=KWierso</id>
	<title>MozillaWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.mozilla.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=KWierso"/>
	<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/Special:Contributions/KWierso"/>
	<updated>2026-07-14T18:28:36Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.10</generator>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=ReleaseEngineering/How_To/Self_Provision_a_TaskCluster_Windows_Instance&amp;diff=1218611</id>
		<title>ReleaseEngineering/How To/Self Provision a TaskCluster Windows Instance</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=ReleaseEngineering/How_To/Self_Provision_a_TaskCluster_Windows_Instance&amp;diff=1218611"/>
		<updated>2019-10-04T21:37:16Z</updated>

		<summary type="html">&lt;p&gt;KWierso: Correct the Template&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Release Engineering How To|Self Provision a TaskCluster Windows Instance}}&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= For generic-worker 10.5.0 onwards =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Integration with taskcluster one-click loaner workflow will be done in [https://bugzil.la/1368961 bug 1368961].&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
1) If you are connecting to a hardware worker in our data center (provisionerId: &amp;quot;releng-hardware&amp;quot;) such as a MoonShot machine, make sure to &lt;br /&gt;
announce in #ci and/or create a bug under [https://bugzilla.mozilla.org/enter_bug.cgi?product=Infrastructure%20%26%20Operations&amp;amp;component=CIDuty CiDuty - Buzilla] announcing the fact that you will take a loaner. &lt;br /&gt;
&lt;br /&gt;
2) Find a the task you want to play with in treeherder, and follow the link to the Taskcluster Task Inspector.&amp;lt;br /&amp;gt;&lt;br /&gt;
3) Go to &#039;&#039;Actions -&amp;gt; Edit Task&#039;&#039;.&amp;lt;br /&amp;gt;&lt;br /&gt;
4) Add &amp;lt;code&amp;gt;rdpInfo&amp;lt;/code&amp;gt; to the payload section:&lt;br /&gt;
&lt;br /&gt;
 payload:&lt;br /&gt;
   rdpInfo: &#039;login-identity/&amp;lt;login-identity&amp;gt;/rdpinfo.txt&#039;&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
 payload:&lt;br /&gt;
   rdpInfo: &#039;login-identity/mozilla-auth0/ad|Mozilla-LDAP|pmoore/rdpinfo.txt&#039;&lt;br /&gt;
&lt;br /&gt;
(check https://tools.taskcluster.net/credentials to see what your login identity is, e.g. you should have the scope &amp;lt;code&amp;gt;assume:login-identity:&amp;lt;login-identity&amp;gt;&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
4) Check which &amp;lt;code&amp;gt;workerType&amp;lt;/code&amp;gt; the task uses from the task definition, and then add the following scope to the list of task scopes:&lt;br /&gt;
&lt;br /&gt;
 scopes:&lt;br /&gt;
   - &#039;generic-worker:allow-rdp:aws-provisioner-v1/&amp;lt;workerType&amp;gt;&#039;&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
 scopes:&lt;br /&gt;
   - &#039;generic-worker:allow-rdp:aws-provisioner-v1/gecko-t-win7-32&#039;&lt;br /&gt;
&lt;br /&gt;
5) If you will require administrator privileges:&lt;br /&gt;
&lt;br /&gt;
5.1) Ensure you have scope &amp;lt;code&amp;gt;generic-worker:os-group:&amp;lt;provisionerId&amp;gt;/&amp;lt;workerType&amp;gt;/Administrators&amp;lt;/code&amp;gt; in https://tools.taskcluster.net/credentials/&lt;br /&gt;
&lt;br /&gt;
If you do not have the scope, request it using a [https://bugzilla.mozilla.org/enter_bug.cgi?product=Taskcluster&amp;amp;component=Service%20Request Service Request] or by asking in &amp;lt;code&amp;gt;#taskcluster&amp;lt;/code&amp;gt; IRC channel. &lt;br /&gt;
&lt;br /&gt;
5.2) Add the following to the task payload:&lt;br /&gt;
&lt;br /&gt;
 scopes:&lt;br /&gt;
   - generic-worker:os-group:&amp;lt;provisionerId&amp;gt;/&amp;lt;workerType&amp;gt;/Administrators&lt;br /&gt;
 payload:&lt;br /&gt;
   osGroups:&lt;br /&gt;
     - Administrators&lt;br /&gt;
&lt;br /&gt;
6) Make sure that if your payload mounts any artifacts, that the task ID(s) are included as a list in top level property &amp;lt;code&amp;gt;dependencies&amp;lt;/code&amp;gt; (&#039;&#039;&#039;not&#039;&#039;&#039; under &amp;lt;code&amp;gt;payload&amp;lt;/code&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
So if it says&lt;br /&gt;
&lt;br /&gt;
  mounts:&lt;br /&gt;
    - directory: .&lt;br /&gt;
      content:&lt;br /&gt;
        taskId: HUqhbXTMTXSXYEM6K2H3wA&lt;br /&gt;
&lt;br /&gt;
Add (at the top level indent)&lt;br /&gt;
&lt;br /&gt;
 dependencies:&lt;br /&gt;
   - HUqhbXTMTXSXYEM6K2H3wA&lt;br /&gt;
&lt;br /&gt;
7) Submit the task. If the task resolves as exception and doesn&#039;t run, &#039;&#039;&#039;check the task log file&#039;&#039;&#039;. It should provide more information about the cause.&amp;lt;br /&amp;gt;&lt;br /&gt;
8) When the task successfully starts, go to &#039;&#039;Run Artifacts&#039;&#039; to see the &amp;lt;code&amp;gt;rdpInfo.txt&amp;lt;/code&amp;gt; file appear with rdp connection information.&amp;lt;br /&amp;gt;&lt;br /&gt;
9) Enter the connection information into your RDP client of choice.&amp;lt;br /&amp;gt;&lt;br /&gt;
10) Connect with screen resolution 1280x1024 ! Note, it is &#039;&#039;&#039;important&#039;&#039;&#039; to use this resolution for gecko tests, since this is the screen size used by the tests, and the screen size cannot change once you have made a connection.&lt;br /&gt;
&lt;br /&gt;
== Performing operations as Administrator ==&lt;br /&gt;
&lt;br /&gt;
Until [https://bugzil.la/1465374 bug 1465374] is resolved this can be a little tricky.&lt;br /&gt;
&lt;br /&gt;
1) Make sure you followed step 5 above!&amp;lt;br /&amp;gt;&lt;br /&gt;
2) Open a regular command shell (e.g. &#039;&#039;Start Menu&#039;&#039; -&amp;gt; &#039;&#039;Run&#039;&#039; -&amp;gt; &amp;lt;code&amp;gt;cmd.exe&amp;lt;/code&amp;gt;)&amp;lt;br /&amp;gt;&lt;br /&gt;
3) From there check which users are in the Administrators group:&lt;br /&gt;
&lt;br /&gt;
 C:\Windows\System32&amp;gt;net localgroup Administrators&lt;br /&gt;
 Alias name     Administrators&lt;br /&gt;
 Comment        Administrators have complete and unrestricted access to the computer/domain&lt;br /&gt;
 &lt;br /&gt;
 Members&lt;br /&gt;
 &lt;br /&gt;
 -------------------------------------------------------------------------------&lt;br /&gt;
 Administrator&lt;br /&gt;
 task_1527672240&lt;br /&gt;
 The command completed successfully.&lt;br /&gt;
 &lt;br /&gt;
4) Check the user you are logged in as is one of the above listed users:&lt;br /&gt;
 &lt;br /&gt;
 C:\Windows\System32&amp;gt;whoami&lt;br /&gt;
 i-015fe55bb8553\task_1527672240&lt;br /&gt;
&lt;br /&gt;
5) Open a new UAC elevated command shell: &lt;br /&gt;
&lt;br /&gt;
 C:\Windows\System32&amp;gt;powershell.exe Start-Process cmd.exe -Verb runAs&lt;br /&gt;
&lt;br /&gt;
6) This will require you enter Administrative credentials. You will be presented with a prompt similar to this:&lt;br /&gt;
&lt;br /&gt;
[[File:Screen Shot 2018-05-30 at 12.13.51.png|none|Screenshot of dialogue box asking for Administrative credentials]]&lt;br /&gt;
&lt;br /&gt;
Click on &#039;&#039;More choices&#039;&#039; and select the task user, and copy/paste the task password (&amp;lt;code&amp;gt;Ctrl-V&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
You should now have a command shell running as Administrator!&lt;br /&gt;
&lt;br /&gt;
== Rerunning tasks after they have completed ==&lt;br /&gt;
&lt;br /&gt;
If you want to rerun a step after the task has completed, there is a script for each command in the task payload. They are named like this:&lt;br /&gt;
&lt;br /&gt;
 Z:\task_XXXXXXX\command_000000_wrapper.bat&lt;br /&gt;
 Z:\task_XXXXXXX\command_000001_wrapper.bat &lt;br /&gt;
 Z:\task_XXXXXXX\command_000002_wrapper.bat &lt;br /&gt;
 ....&lt;br /&gt;
&lt;br /&gt;
Simply run them by hand to reproduce any of the task steps. If you wish to make changes, feel free to edit them. After the loan expires, the task directory, including all your changes, will be deleted. Therefore make sure to keep track of any changes that need to be put back in the gecko build system.&lt;/div&gt;</summary>
		<author><name>KWierso</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=ReleaseEngineering/TryServer&amp;diff=1218236</id>
		<title>ReleaseEngineering/TryServer</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=ReleaseEngineering/TryServer&amp;diff=1218236"/>
		<updated>2019-09-24T18:50:29Z</updated>

		<summary type="html">&lt;p&gt;KWierso: Document the Add New Jobs (Search) option in Treeherder&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Try Server =&lt;br /&gt;
The [https://treeherder.mozilla.org/#/jobs?repo=try try server] is an easy way to test a patch without actually checking the patch into the core repository. Your code will go through the same tests as a mozilla-central push, and you&#039;ll be able to download builds if you wish.&lt;br /&gt;
&lt;br /&gt;
== Getting access to the Try Server  ==&lt;br /&gt;
To use the try server, you&#039;ll need [http://www.mozilla.org/hacking/commit-access-policy/ Level 1 Commit Access]. You can learn more about Mozilla&#039;s commit access policies and start the process of signing up for an account here: [http://www.mozilla.org/hacking/committer/ Becoming a Mozilla Contributor]&lt;br /&gt;
&lt;br /&gt;
After you have level 1 commit access, you&#039;ll need to do a bit of setup before you&#039;ll be able to push. See [https://mozilla-version-control-tools.readthedocs.io/en/latest/hgmozilla/auth.html this guide] for instructions.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
Before using try, there is some recommended configuration you should set up. This can be accomplished by running:&lt;br /&gt;
&lt;br /&gt;
 $ ./mach vcs-setup&lt;br /&gt;
&lt;br /&gt;
Be sure to at least enable the [http://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/firefoxtree.html firefoxtree extension] and the push-to-try extension. The push-to-try extension is required if you wish to use the |mach try| command (see below). Firefoxtree will give you a handy &#039;try&#039; alias you can use for pushing, and prevent you from accidentally pushing multiple heads. If for some reason you prefer not to use firefoxtree, you can set the same alias up manually in your hgrc:&lt;br /&gt;
&lt;br /&gt;
 [paths]&lt;br /&gt;
 try = ssh://hg.mozilla.org/try&lt;br /&gt;
&lt;br /&gt;
Note: Never pull the whole try repo. You&#039;ll end up with hundreds of heads containing everyone&#039;s half baked and broken pushes.&lt;br /&gt;
&lt;br /&gt;
For more information, see [http://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/index.html mercurial for mozillians].&lt;br /&gt;
&lt;br /&gt;
== How to push to try ==&lt;br /&gt;
There are a few ways to schedule jobs on try.&lt;br /&gt;
&lt;br /&gt;
=== Scheduling jobs with Mach Try ===&lt;br /&gt;
&lt;br /&gt;
The recommended way to [https://firefox-source-docs.mozilla.org/tools/try/index.html interact with try] is via the command line tool |mach try|. Since try can be used for a wide range of use cases, by developers with varying levels of experience, there is no one size fits all solution when it comes to selecting which tasks to run. Therefore |mach try| offers a range of subcommands called &amp;quot;selectors&amp;quot; for a variety of purposes. To see a list of available selectors, run:&lt;br /&gt;
&lt;br /&gt;
  $ mach try --help&lt;br /&gt;
&lt;br /&gt;
For deeper information on a given selector, run:&lt;br /&gt;
&lt;br /&gt;
  $ mach try &amp;lt;selector&amp;gt; --help&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t specify a selector/subcommand to try, it will default to using the `syntax` selector. You can change which selector gets used by default by creating ~/.mozbuild/machrc and adding:&lt;br /&gt;
&lt;br /&gt;
  [try]&lt;br /&gt;
  default=&amp;lt;selector&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [https://firefox-source-docs.mozilla.org/tools/try/selectors/index.html this documentation] for more information on all the available selectors.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Scheduling jobs with Treeherder ===&lt;br /&gt;
&lt;br /&gt;
You can push to try with:&lt;br /&gt;
&lt;br /&gt;
 $ ./mach try empty&lt;br /&gt;
&lt;br /&gt;
Once the push succeeds, you can open it in Treeherder and then sign in to schedule jobs manually.&lt;br /&gt;
&lt;br /&gt;
Select the drop-down arrow at the top right of your push, and choose &amp;quot;Add new Jobs&amp;quot;. It might take several seconds for the jobs to load ({{bug|1288028}}) :&lt;br /&gt;
&lt;br /&gt;
https://s3.amazonaws.com/media-p.slid.es/uploads/185196/images/2042414/TH_dropdown.png&lt;br /&gt;
&lt;br /&gt;
If it helps, you can use the filter box in the site header to restrict the list of runnable jobs being displayed.  Click the job symbols you wish to schedule. &lt;br /&gt;
&lt;br /&gt;
If you select a test job, the required build will automatically be scheduled:&lt;br /&gt;
&lt;br /&gt;
https://s3.amazonaws.com/media-p.slid.es/uploads/185196/images/2042426/TH_with_jobs.png&lt;br /&gt;
&lt;br /&gt;
Finally, click &amp;quot;Trigger New Jobs&amp;quot; near the top right of your push.&lt;br /&gt;
&lt;br /&gt;
NOTE: An action task gets scheduled which will schedule all the tasks you chose.&lt;br /&gt;
&lt;br /&gt;
=== Scheduling jobs with Treeherder (Search) ===&lt;br /&gt;
&lt;br /&gt;
Similar to the above method, there is now an additional way to add jobs to an existing push via Treeherder. Open the push in Treeherder and then choose &amp;quot;Add New Jobs (Search)&amp;quot; from the push&#039;s menu:&lt;br /&gt;
&lt;br /&gt;
[[File:Add New Jobs Search.png]]&lt;br /&gt;
&lt;br /&gt;
Treeherder will then fetch the list of runnable jobs in the background, then pop up a dialog window listing those jobs:&lt;br /&gt;
&lt;br /&gt;
[[File:Addnewjobssearchinterface.png]]&lt;br /&gt;
&lt;br /&gt;
At the top of the dialog, there is a search bar. Type part of your desired job name into the search bar and press &#039;Enter&#039; to filter the list of jobs. (This uses a fuzzy search library, so some minimal typos are allowed). From the filtered list of jobs, select as many of the results as you want (ctrl/shift modifiers work on this list for selecting multiple jobs):&lt;br /&gt;
&lt;br /&gt;
[[File:Filteredaddnewjobssearch.png]]&lt;br /&gt;
&lt;br /&gt;
Then click the green &amp;quot;Add Selected&amp;quot; button to add the selected jobs to the list of jobs to be run (or click the green &amp;quot;Add All&amp;quot; button to add the entire list of jobs currently in view.&lt;br /&gt;
&lt;br /&gt;
Repeat the filter and selection process until you have all of your desired jobs added to the list. You can remove jobs from the list to be run using the red buttons lower on the dialog if you selected them in error:&lt;br /&gt;
&lt;br /&gt;
[[File:Addnewjobssearchselectedjobs.png]]&lt;br /&gt;
&lt;br /&gt;
When you are happy with your selection, click the blue &amp;quot;Trigger (X) Selected Jobs&amp;quot; button at the bottom of the dialog. Treeherder will send out a request for those jobs to be run, and an action task will be spawned to do all of the behind the scenes magic to make that happen.&lt;br /&gt;
&lt;br /&gt;
=== Pushing Directly ===&lt;br /&gt;
&lt;br /&gt;
It&#039;s also possible to push to try directly from hg (for now). This might be required if you&#039;re using [https://www.mercurial-scm.org/wiki/MqExtension mercurial queues]. In this case, the only way to select tasks is by manually adding try syntax to your commit message:&lt;br /&gt;
&lt;br /&gt;
  $ hg commit -m &amp;quot;try: -b o -p linux64 -u mochitest&amp;quot;&lt;br /&gt;
  $ hg push -f try&lt;br /&gt;
&lt;br /&gt;
Using |mach try| is recommended as that will automatically create and cleanup a temporary commit no your behalf, whereas with this method you are responsible for cleaning up any extra commits you make or commit messages you modify.&lt;br /&gt;
&lt;br /&gt;
== Viewing the results ==&lt;br /&gt;
You can see the results of your tryserver build in a number of ways:&lt;br /&gt;
&lt;br /&gt;
* You&#039;ll get an email on a successful push with a link to treeherder for your revision as well as optional emails on any non-successful build/test/talos results&lt;br /&gt;
* You can have the results of your try run posted to bug(s) automatically at the completion of the run using the --post-to-bugzilla flag in your try syntax&lt;br /&gt;
* The link to treeherder will be printed on the command line.&lt;br /&gt;
* Look for your changeset on [https://treeherder.mozilla.org/#/jobs?repo=try Treeherder]. You can add &#039;&#039;&#039;&amp;amp;author=YOUR.EMAIL&#039;&#039;&#039; to only see your pushes.&lt;br /&gt;
* Download your completed builds from [http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/?C=M;O=D firefox/tryserver-builds on ftp.m.o].&lt;br /&gt;
&lt;br /&gt;
== Using a custom mozconfig  ==&lt;br /&gt;
The mozconfigs for recent mozilla-central clones are located in the browser/config/mozconfigs directory. Edit those as you please.&lt;br /&gt;
&lt;br /&gt;
If you want to apply the same mozconfig changes to multiple platforms, you can edit &amp;lt;tt&amp;gt;build/mozconfig.common.override&amp;lt;/tt&amp;gt; instead.  This file is included at the end of each of the in-tree mozconfig files.&lt;br /&gt;
&lt;br /&gt;
Android mozconfigs are in mobile/android/config/mozconfigs.&lt;br /&gt;
&lt;br /&gt;
If you modify a mozconfig file named &amp;lt;tt&amp;gt;nightly&amp;lt;/tt&amp;gt;, please make sure you also change any mozconfig file named &amp;lt;tt&amp;gt;beta&amp;lt;/tt&amp;gt; and/or &amp;lt;tt&amp;gt;release&amp;lt;/tt&amp;gt; in the same directory, otherwise the test_compare_mozconfigs test will fail.&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
* TryServer purpose is to tell what will happen on Tinderbox, not to check every possible build option/configuration.&lt;br /&gt;
** Any non-standard feature is implicitly unsupported. You may try them, but don&#039;t complain if they break.&lt;br /&gt;
&lt;br /&gt;
== Getting debug symbols ==&lt;br /&gt;
By default native debug symbols are not uploaded for Try server builds because of their size. If you want to debug your builds locally you must add &amp;lt;tt&amp;gt;MOZ_CRASHREPORTER_UPLOAD_FULL_SYMBOLS=1&amp;lt;/tt&amp;gt; to the in-tree mozconfigs. You can do this for all platforms by importing [http://hg.mozilla.org/users/tmielczarek_mozilla.com/mq/raw-file/b44faf6cd177/enable-full-symbols this patch] into your mq and pushing it along with your changes to Try. This will cause a ...crashreporter-symbols-full.zip package to be uploaded to the builds directory for each platform built.&lt;br /&gt;
&lt;br /&gt;
== Adding new jobs ==&lt;br /&gt;
It&#039;s possible to create new jobs (or modify existing ones) directly *in* your try push, provided you use taskcluster. Just edit the relevant configuration in testing/taskcluster. For more information on creating jobs, see the [http://docs.taskcluster.net/ taskcluster docs].&lt;br /&gt;
&lt;br /&gt;
== Desktop l10n jobs ==&lt;br /&gt;
You can use the steps in [[ReleaseEngineering/TryServer#Scheduling jobs with Treeherder|Scheduling jobs with Treeherder]] to add localized desktop builds to your try push, regardless of whether you used try syntax at first. Filtering with &#039;l10n&#039; helps to find the jobs amongst the many possibilities.&lt;br /&gt;
&lt;br /&gt;
The jobs can be customized by modifying files prior to pushing:&lt;br /&gt;
* reducing the number of locales by limiting &amp;lt;tt&amp;gt;browser/locales/all-locales&amp;lt;/tt&amp;gt; (eg top-locales like de fr ja ja-JP-mac ru zh-TW). Leaving a full list of locales is likely to hit a timeout on Mac and Windows&lt;br /&gt;
* use a different en-US build by modifying [https://dxr.mozilla.org/mozilla-central/source/testing/mozharness/configs/single_locale/try.py#4 en_us_binary_url], but note that the building en-US and then l10n in one push is not a tested scenario&lt;br /&gt;
&lt;br /&gt;
The resulting builds are uploaded to the same sub-directory as en-US builds, eg try-linux/ for 32bit linux.&lt;br /&gt;
&lt;br /&gt;
== Desktop l10n jobs (on Taskcluster) ==&lt;br /&gt;
&lt;br /&gt;
To get Desktop l10n jobs on taskcluster on try, simply pass `-b o -p linux64-l10n,linux-l10n` with your try push. You&#039;ll also get these jobs automatically with `-p linux64,linux` if you are touching one of the files known to be heavily involved in l10n jobs. (Taskcluster support for other platforms is not yet available)&lt;br /&gt;
&lt;br /&gt;
You can also use the steps in [[ReleaseEngineering/TryServer#Scheduling jobs with Treeherder|Scheduling jobs with Treeherder]] to add localized desktop builds to your try push, regardless of whether you used try syntax at first. Filtering with &#039;l10n&#039; helps to find the jobs amongst the many possibilities.&lt;br /&gt;
&lt;br /&gt;
The jobs can be customized by modifying files prior to pushing:&lt;br /&gt;
* reducing the number of locales by limiting &amp;lt;tt&amp;gt;browser/locales/all-locales&amp;lt;/tt&amp;gt; (eg top-locales like de fr ja ja-JP-mac ru zh-TW).&lt;br /&gt;
* use a different en-US build by modifying [https://dxr.mozilla.org/mozilla-central/source/testing/mozharness/configs/single_locale/try.py#4 en_us_binary_url], but note that the building en-US and then l10n in one push is not a tested scenario&lt;br /&gt;
&lt;br /&gt;
The resulting builds are uploaded as a task artifact, and are not yet signed.&lt;br /&gt;
&lt;br /&gt;
== Android Single-Locale l10n jobs (on Taskcluster) ==&lt;br /&gt;
&lt;br /&gt;
(NOTE: Only supported on Gecko 51a1 and above)&lt;br /&gt;
&lt;br /&gt;
To get Android l10n jobs on taskcluster on try, simply pass `-p android-api-15-l10n` with your try push. You&#039;ll also get these jobs automatically with `-p android-api-15` if you are touching one of the files known to be heavily involved in l10n jobs.&lt;br /&gt;
&lt;br /&gt;
You can also use the steps in [[ReleaseEngineering/TryServer#Scheduling jobs with Treeherder|Scheduling jobs with Treeherder]] to add localized desktop builds to your try push, regardless of whether you used try syntax at first. Filtering with &#039;l10n&#039; helps to find the jobs amongst the many possibilities.&lt;br /&gt;
&lt;br /&gt;
The jobs can be customized by modifying files prior to pushing:&lt;br /&gt;
* reducing the number of locales by limiting &amp;lt;tt&amp;gt;mobile/android/locales/all-locales&amp;lt;/tt&amp;gt; (eg top-locales like de fr ru zh-TW).&lt;br /&gt;
* use a different en-US build by modifying [https://dxr.mozilla.org/mozilla-central/source/testing/mozharness/configs/single_locale/try_android-api-15.py#3 en_us_binary_url], but note that the building en-US and then l10n in one push is not a tested scenario&lt;br /&gt;
&lt;br /&gt;
The resulting builds are uploaded as a task artifact, and are not yet signed.&lt;br /&gt;
&lt;br /&gt;
== Server Status ==&lt;br /&gt;
* Pending builds by revision are at https://secure.pub.build.mozilla.org/buildapi/pending&lt;br /&gt;
* In-progress builds by revision are are https://secure.pub.build.mozilla.org/buildapi/running&lt;br /&gt;
&lt;br /&gt;
== Other Notes ==&lt;br /&gt;
* Finished builds will live in  http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/&amp;lt;your_ldap_email&amp;gt;-&amp;lt;revision&amp;gt; for 14 days before deletion&lt;br /&gt;
* Treeherder data is purged after 4 months.&lt;br /&gt;
* If you have any problems please [https://bugzilla.mozilla.org/enter_bug.cgi?product=mozilla.org&amp;amp;component=Release%20Engineering&amp;amp;status_whiteboard=tryserver file a bug]&lt;br /&gt;
&lt;br /&gt;
* Suggestions for the future can be made [[Build:TryServer:Suggestions|here]] or file a blocking bug against {{bug|try_enhancements}}&lt;br /&gt;
&lt;br /&gt;
== Other Mozilla Try Servers ==&lt;br /&gt;
* [[ReleaseEngineering/ThunderbirdTryServer|Thunderbird Try Server]] for the comm-central repository&lt;br /&gt;
&lt;br /&gt;
== Problem Diagnosis ==&lt;br /&gt;
=== Can not access try server ===&lt;br /&gt;
Test your account &amp;amp; configuration&lt;br /&gt;
* &amp;lt;code&amp;gt;ssh hg.mozilla.org&amp;lt;/code&amp;gt;, response: &amp;quot;No Interactive shells allowed here!&amp;quot;&lt;br /&gt;
* &amp;lt;code&amp;gt;ssh hg.mozilla.org clone invalid_sandbox&amp;lt;/code&amp;gt;, response: menu display and interactive prompting.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;long_try_push&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
=== Pushes to try take a very long time ===&lt;br /&gt;
Note: if a fellow developer cancelled their try push, they have saddled you with the cost of rebuilding the cache. (See [http://dtor.com/halfire/2014/07/02/2014_06_try_server_update.html#caching caching] details.)&lt;br /&gt;
&lt;br /&gt;
If you&#039;re experiencing excessive wait times (&amp;gt; 45min) pushing to try, please file a bug asking IT to reset the try repository using [https://bugzilla.mozilla.org/enter_bug.cgi?comment=please%20schedule%20a%20reset%20of%20the%20try%20repository%20ASAP%20with%20sheriffs%20%26%20releng.&amp;amp;component=WebOps%3A%20Source%20Control&amp;amp;op_sys=All&amp;amp;product=Infrastructure%20%26%20Operations&amp;amp;rep_platform=All&amp;amp;short_desc=Push%20to%20try%20taking%20XXX%20minutes this template] (please include specifics of your experience). They will coordinate with sheriffs and release engineering as needed.&lt;br /&gt;
&lt;br /&gt;
=== Waiting for Lock ===&lt;br /&gt;
If you get a message similar to:&lt;br /&gt;
    remote: waiting for lock on repository /repo/hg/mozilla/try/ held by &#039;hgssh1.dmz.scl3.mozilla.com:23974&#039;&lt;br /&gt;
    remote: abort: repository /repo/hg/mozilla/try/: timed out waiting for lock held by hgssh1.dmz.scl3.mozilla.com:30549&lt;br /&gt;
It means several developers are trying to push to try at the same time. In the case above, nothing appears to be wrong, as the PID changes between the messages.&lt;br /&gt;
&lt;br /&gt;
=== Waiting for Lock multiple times with the same pid ===&lt;br /&gt;
Similar to the above case, but with the same pid when you retry over and over again.&lt;br /&gt;
&lt;br /&gt;
Please retry your push. If you see messages indicating the same process has been pushing for more than 15 minutes, treat as [[#long_try_push|above]].&lt;br /&gt;
&lt;br /&gt;
== CiDuty issues == &lt;br /&gt;
=== How do I trigger additional talos/test runs for a given try build? ===&lt;br /&gt;
If your syntax included the tests you&#039;d like more of, then select the job you want on Treeherder and use the + button. For test suites you didn&#039;t request originally you can use the &amp;quot;Add New Jobs&amp;quot; interface in Treeherder.&lt;br /&gt;
&lt;br /&gt;
=== How do I cancel existing jobs? ===&lt;br /&gt;
For individual jobs, select the relevant one on Treeherder and use the cancel button. To cancel all jobs, use the menu arrow shown on the header row for each push, and then the &amp;quot;Cancel all&amp;quot; option.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* https://developer.mozilla.org/en/Creating_Mercurial_User_Repositories&lt;br /&gt;
* https://wiki.mozilla.org/Sheriffing/How:To:Recommended_Try_Practices&lt;br /&gt;
* https://wiki.mozilla.org/ReleaseEngineering:Autoland&lt;br /&gt;
* [http://build.mozilla.org/buildapi/self-serve Manage Submissions] [[https://build.mozilla.org/buildapi/self-serve/try try]]&lt;br /&gt;
* [https://catlee.github.io/highscores/highscores.html Scoreboard]&lt;/div&gt;</summary>
		<author><name>KWierso</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=File:Addnewjobssearchselectedjobs.png&amp;diff=1218235</id>
		<title>File:Addnewjobssearchselectedjobs.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=File:Addnewjobssearchselectedjobs.png&amp;diff=1218235"/>
		<updated>2019-09-24T18:48:05Z</updated>

		<summary type="html">&lt;p&gt;KWierso: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Screenshot showing the Add New Jobs (Search) interface with several jobs selected&lt;/div&gt;</summary>
		<author><name>KWierso</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=File:Filteredaddnewjobssearch.png&amp;diff=1218232</id>
		<title>File:Filteredaddnewjobssearch.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=File:Filteredaddnewjobssearch.png&amp;diff=1218232"/>
		<updated>2019-09-24T18:43:30Z</updated>

		<summary type="html">&lt;p&gt;KWierso: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Screenshot showing a filtered list of jobs in Add New Jobs (Search) mode&lt;/div&gt;</summary>
		<author><name>KWierso</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=File:Addnewjobssearchinterface.png&amp;diff=1218231</id>
		<title>File:Addnewjobssearchinterface.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=File:Addnewjobssearchinterface.png&amp;diff=1218231"/>
		<updated>2019-09-24T18:39:12Z</updated>

		<summary type="html">&lt;p&gt;KWierso: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Screenshot showing the add new jobs (search) interface&lt;/div&gt;</summary>
		<author><name>KWierso</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=File:Add_New_Jobs_Search.png&amp;diff=1218230</id>
		<title>File:Add New Jobs Search.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=File:Add_New_Jobs_Search.png&amp;diff=1218230"/>
		<updated>2019-09-24T18:34:14Z</updated>

		<summary type="html">&lt;p&gt;KWierso: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Screenshot showing the Add New Jobs (Search) menu button&lt;/div&gt;</summary>
		<author><name>KWierso</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=ReleaseEngineering/TryServer&amp;diff=1181323</id>
		<title>ReleaseEngineering/TryServer</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=ReleaseEngineering/TryServer&amp;diff=1181323"/>
		<updated>2017-09-26T20:14:26Z</updated>

		<summary type="html">&lt;p&gt;KWierso: Update the addnewjobs section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Try Server =&lt;br /&gt;
The [https://treeherder.mozilla.org/#/jobs?repo=try try server] is an easy way to test a patch without actually checking the patch into the core repository. Your code will go through the same tests as a mozilla-central push, and you&#039;ll be able to download builds if you wish.&lt;br /&gt;
&lt;br /&gt;
== Getting access to the Try Server  ==&lt;br /&gt;
To use the try server, you&#039;ll need [http://www.mozilla.org/hacking/commit-access-policy/ Level 1 Commit Access]. You can learn more about Mozilla&#039;s commit access policies and start the process of signing up for an account here: [http://www.mozilla.org/hacking/committer/ Becoming a Mozilla Contributor]&lt;br /&gt;
&lt;br /&gt;
After you have level 1 commit access, you&#039;ll need to do a bit of setup before you&#039;ll be able to push. See [https://developer.mozilla.org/en-US/docs/Mercurial/Using_Mercurial#How_do_I_check_stuff_in.3F this guide] for instructions. Assuming you only have level 1 access, you won&#039;t be able to push to mozilla-central, but you can replace &#039;hg.mozilla.org/mozilla-central&#039; with &#039;hg.mozilla.org/try&#039;.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
Before using try, there is some recommended configuration you should set up. This can be accomplished by running:&lt;br /&gt;
&lt;br /&gt;
 $ ./mach mercurial-setup&lt;br /&gt;
&lt;br /&gt;
Be sure to at least enable the [http://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/firefoxtree.html firefoxtree extension] and the push-to-try extension. The push-to-try extension is required if you wish to use the |mach try| command (see below). Firefoxtree will give you a handy &#039;try&#039; alias you can use for pushing, and prevent you from accidentally pushing multiple heads. If for some reason you prefer not to use firefoxtree, you can set the same alias up manually in your hgrc:&lt;br /&gt;
&lt;br /&gt;
 [paths]&lt;br /&gt;
 try = ssh://hg.mozilla.org/try&lt;br /&gt;
&lt;br /&gt;
Note: Never pull the whole try repo. You&#039;ll end up with hundreds of heads containing everyone&#039;s half baked and broken pushes.&lt;br /&gt;
&lt;br /&gt;
For more information, see [http://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/index.html mercurial for mozillians].&lt;br /&gt;
&lt;br /&gt;
== How to push to try ==&lt;br /&gt;
There are two ways to schedule jobs on try. You can either push like normal, and select which jobs you want using [https://wiki.mozilla.org/EngineeringProductivity/Projects/Treeherder treeherder], or you can specify a try syntax in your commit message to schedule jobs automatically. &lt;br /&gt;
&lt;br /&gt;
=== Scheduling jobs with Treeherder ===&lt;br /&gt;
&lt;br /&gt;
You can push to try with:&lt;br /&gt;
&lt;br /&gt;
 $ ./mach try empty&lt;br /&gt;
&lt;br /&gt;
Once the push succeeds, you can open it in Treeherder and then sign in to schedule jobs manually.&lt;br /&gt;
&lt;br /&gt;
Select the drop-down arrow at the top right of your push, and choose &amp;quot;Add new Jobs&amp;quot;. It might take several seconds for the jobs to load ({{bug|1288028}}) :&lt;br /&gt;
&lt;br /&gt;
https://s3.amazonaws.com/media-p.slid.es/uploads/185196/images/2042414/TH_dropdown.png&lt;br /&gt;
&lt;br /&gt;
If it helps, you can use the filter box in the site header to restrict the list of runnable jobs being displayed.  Click the job symbols you wish to schedule. &lt;br /&gt;
&lt;br /&gt;
If you select a test job, the required build will automatically be scheduled:&lt;br /&gt;
&lt;br /&gt;
https://s3.amazonaws.com/media-p.slid.es/uploads/185196/images/2042426/TH_with_jobs.png&lt;br /&gt;
&lt;br /&gt;
Finally, click &amp;quot;Trigger New Jobs&amp;quot; near the top right of your push.&lt;br /&gt;
&lt;br /&gt;
NOTE: An action task gets scheduled which will schedule all the tasks you chose.&lt;br /&gt;
&lt;br /&gt;
=== Scheduling jobs with Try Syntax ===&lt;br /&gt;
If you know exactly what you want to run, you can use [[Build:TryChooser]] to select which jobs run directly in your commit message. Make sure the commit message containing try syntax is placed in your &#039;&#039;topmost commit&#039;&#039;.  The [http://trychooser.pub.build.mozilla.org/ TryChooser] web page can help you build a commit message for custom requests. It will generate both a syntax string as well as a mach command you can simply paste into your terminal.&lt;br /&gt;
&lt;br /&gt;
==== Using mach ====&lt;br /&gt;
The recommended way to push with a try syntax, is to use |mach try|. It works with both mercurial and git, and you can use the [http://trychooser.pub.build.mozilla.org/ TryChooser] web page to generate the command. For example:&lt;br /&gt;
&lt;br /&gt;
 $ mach try -b o -p linux -u mochitest-1 -t none&lt;br /&gt;
&lt;br /&gt;
The |mach try| command also has some advanced features. It can actually change how the job gets run within automation. For example, to run only mochitests under &#039;dom/indexedDB&#039;:&lt;br /&gt;
&lt;br /&gt;
 $ mach try -b o -p linux -u mochitests --and dom/indexedDB&lt;br /&gt;
&lt;br /&gt;
For more information see:&lt;br /&gt;
&lt;br /&gt;
 $ mach try --help&lt;br /&gt;
&lt;br /&gt;
Note: This method doesn&#039;t work well with mq.&lt;br /&gt;
&lt;br /&gt;
==== Using the Trychooser Extension ====&lt;br /&gt;
You can also use the [https://bitbucket.org/sfink/trychooser mercurial trychooser extension] from sfink. It has some neat features, like a curses ui that lets you graphically choose a try syntax. Though {{bug|1197868}} tracks implementing this feature in |mach try|. Eventually trychooser will be deprecated in favor of |mach try|.&lt;br /&gt;
&lt;br /&gt;
==== Using mq ====&lt;br /&gt;
The aforementioned tools may not play all that nicely with [https://www.mercurial-scm.org/wiki/MqExtension mercurial queues]. If you use mq, you can still push to try manually. First build your try syntax with the [http://trychooser.pub.build.mozilla.org/ TryChooser] web page. Then run:&lt;br /&gt;
&lt;br /&gt;
 $ hg qref --message &amp;quot;try: &amp;lt;your-computed-syntax-here&amp;gt;&amp;quot;&lt;br /&gt;
 $ hg push -f try&lt;br /&gt;
&lt;br /&gt;
== Viewing the results ==&lt;br /&gt;
You can see the results of your tryserver build in a number of ways:&lt;br /&gt;
&lt;br /&gt;
* You&#039;ll get an email on a successful push with a link to treeherder for your revision as well as optional emails on any non-successful build/test/talos results (this setting can be adjusted using [[Build:TryChooser]] args for email notification)&lt;br /&gt;
* You can have the results of your try run posted to bug(s) automatically at the completion of the run using the --post-to-bugzilla flag in your try syntax (see: [[Build:TryChooser]] for examples)&lt;br /&gt;
* The link to treeherder will be printed on the command line.&lt;br /&gt;
* Look for your changeset on [https://treeherder.mozilla.org/#/jobs?repo=try Treeherder]. You can add &#039;&#039;&#039;&amp;amp;author=YOUR.EMAIL&#039;&#039;&#039; to only see your pushes.&lt;br /&gt;
* Download your completed builds from [http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/?C=M;O=D firefox/tryserver-builds on ftp.m.o].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using a custom mozconfig  ==&lt;br /&gt;
The mozconfigs for recent mozilla-central clones are located in the browser/config/mozconfigs directory. Edit those as you please.&lt;br /&gt;
&lt;br /&gt;
If you want to apply the same mozconfig changes to multiple platforms, you can edit &amp;lt;tt&amp;gt;build/mozconfig.common.override&amp;lt;/tt&amp;gt; instead.  This file is included at the end of each of the in-tree mozconfig files.&lt;br /&gt;
&lt;br /&gt;
Android mozconfigs are in mobile/android/config/mozconfigs.&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
* TryServer purpose is to tell what will happen on Tinderbox, not to check every possible build option/configuration.&lt;br /&gt;
** Any non-standard feature is implicitly unsupported. You may try them, but don&#039;t complain if they break.&lt;br /&gt;
&lt;br /&gt;
== Getting debug symbols ==&lt;br /&gt;
By default native debug symbols are not uploaded for Try server builds because of their size. If you want to debug your builds locally you must add &amp;lt;tt&amp;gt;MOZ_CRASHREPORTER_UPLOAD_FULL_SYMBOLS=1&amp;lt;/tt&amp;gt; to the in-tree mozconfigs. You can do this for all platforms by importing [http://hg.mozilla.org/users/tmielczarek_mozilla.com/mq/raw-file/b44faf6cd177/enable-full-symbols this patch] into your mq and pushing it along with your changes to Try. This will cause a ...crashreporter-symbols-full.zip package to be uploaded to the builds directory for each platform built.&lt;br /&gt;
&lt;br /&gt;
== Adding new jobs ==&lt;br /&gt;
It&#039;s possible to create new jobs (or modify existing ones) directly *in* your try push, provided you use taskcluster. Just edit the relevant configuration in testing/taskcluster. For more information on creating jobs, see the [http://docs.taskcluster.net/ taskcluster docs].&lt;br /&gt;
&lt;br /&gt;
== Desktop l10n jobs ==&lt;br /&gt;
You can use the steps in [[ReleaseEngineering/TryServer#Scheduling jobs with Treeherder|Scheduling jobs with Treeherder]] to add localized desktop builds to your try push, regardless of whether you used try syntax at first. Filtering with &#039;l10n&#039; helps to find the jobs amongst the many possibilities.&lt;br /&gt;
&lt;br /&gt;
The jobs can be customized by modifying files prior to pushing:&lt;br /&gt;
* reducing the number of locales by limiting &amp;lt;tt&amp;gt;browser/locales/all-locales&amp;lt;/tt&amp;gt; (eg top-locales like de fr ja ja-JP-mac ru zh-TW). Leaving a full list of locales is likely to hit a timeout on Mac and Windows&lt;br /&gt;
* use a different en-US build by modifying [https://dxr.mozilla.org/mozilla-central/source/testing/mozharness/configs/single_locale/try.py#4 en_us_binary_url], but note that the building en-US and then l10n in one push is not a tested scenario&lt;br /&gt;
&lt;br /&gt;
The resulting builds are uploaded to the same sub-directory as en-US builds, eg try-linux/ for 32bit linux.&lt;br /&gt;
&lt;br /&gt;
== Desktop l10n jobs (on Taskcluster) ==&lt;br /&gt;
&lt;br /&gt;
To get Desktop l10n jobs on taskcluster on try, simply pass `-b o -p linux64-l10n,linux-l10n` with your try push. You&#039;ll also get these jobs automatically with `-p linux64,linux` if you are touching one of the files known to be heavily involved in l10n jobs. (Taskcluster support for other platforms is not yet available)&lt;br /&gt;
&lt;br /&gt;
You can also use the steps in [[ReleaseEngineering/TryServer#Scheduling jobs with Treeherder|Scheduling jobs with Treeherder]] to add localized desktop builds to your try push, regardless of whether you used try syntax at first. Filtering with &#039;l10n&#039; helps to find the jobs amongst the many possibilities.&lt;br /&gt;
&lt;br /&gt;
The jobs can be customized by modifying files prior to pushing:&lt;br /&gt;
* reducing the number of locales by limiting &amp;lt;tt&amp;gt;browser/locales/all-locales&amp;lt;/tt&amp;gt; (eg top-locales like de fr ja ja-JP-mac ru zh-TW).&lt;br /&gt;
* use a different en-US build by modifying [https://dxr.mozilla.org/mozilla-central/source/testing/mozharness/configs/single_locale/try.py#4 en_us_binary_url], but note that the building en-US and then l10n in one push is not a tested scenario&lt;br /&gt;
&lt;br /&gt;
The resulting builds are uploaded as a task artifact, and are not yet signed.&lt;br /&gt;
&lt;br /&gt;
== Android Single-Locale l10n jobs (on Taskcluster) ==&lt;br /&gt;
&lt;br /&gt;
(NOTE: Only supported on Gecko 51a1 and above)&lt;br /&gt;
&lt;br /&gt;
To get Android l10n jobs on taskcluster on try, simply pass `-p android-api-15-l10n` with your try push. You&#039;ll also get these jobs automatically with `-p android-api-15` if you are touching one of the files known to be heavily involved in l10n jobs.&lt;br /&gt;
&lt;br /&gt;
You can also use the steps in [[ReleaseEngineering/TryServer#Scheduling jobs with Treeherder|Scheduling jobs with Treeherder]] to add localized desktop builds to your try push, regardless of whether you used try syntax at first. Filtering with &#039;l10n&#039; helps to find the jobs amongst the many possibilities.&lt;br /&gt;
&lt;br /&gt;
The jobs can be customized by modifying files prior to pushing:&lt;br /&gt;
* reducing the number of locales by limiting &amp;lt;tt&amp;gt;mobile/android/locales/all-locales&amp;lt;/tt&amp;gt; (eg top-locales like de fr ru zh-TW).&lt;br /&gt;
* use a different en-US build by modifying [https://dxr.mozilla.org/mozilla-central/source/testing/mozharness/configs/single_locale/try_android-api-15.py#3 en_us_binary_url], but note that the building en-US and then l10n in one push is not a tested scenario&lt;br /&gt;
&lt;br /&gt;
The resulting builds are uploaded as a task artifact, and are not yet signed.&lt;br /&gt;
&lt;br /&gt;
== Server Status ==&lt;br /&gt;
* Pending builds by revision are at https://secure.pub.build.mozilla.org/buildapi/pending&lt;br /&gt;
* In-progress builds by revision are are https://secure.pub.build.mozilla.org/buildapi/running&lt;br /&gt;
&lt;br /&gt;
== Other Notes ==&lt;br /&gt;
* Finished builds will live in  http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/&amp;lt;your_ldap_email&amp;gt;-&amp;lt;revision&amp;gt; for 14 days before deletion&lt;br /&gt;
* Treeherder data is purged after 4 months.&lt;br /&gt;
* If you have any problems please [https://bugzilla.mozilla.org/enter_bug.cgi?product=mozilla.org&amp;amp;component=Release%20Engineering&amp;amp;status_whiteboard=tryserver file a bug]&lt;br /&gt;
&lt;br /&gt;
* Suggestions for the future can be made [[Build:TryServer:Suggestions|here]] or file a blocking bug against {{bug|try_enhancements}}&lt;br /&gt;
&lt;br /&gt;
== Other Mozilla Try Servers ==&lt;br /&gt;
* [[ReleaseEngineering/ThunderbirdTryServer|Thunderbird Try Server]] for the comm-central repository&lt;br /&gt;
&lt;br /&gt;
== Problem Diagnosis ==&lt;br /&gt;
=== Can not access try server ===&lt;br /&gt;
Test your account &amp;amp; configuration&lt;br /&gt;
* &amp;lt;code&amp;gt;ssh hg.mozilla.org&amp;lt;/code&amp;gt;, response: &amp;quot;No Interactive shells allowed here!&amp;quot;&lt;br /&gt;
* &amp;lt;code&amp;gt;ssh hg.mozilla.org clone invalid_sandbox&amp;lt;/code&amp;gt;, response: menu display and interactive prompting.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;long_try_push&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
=== Pushes to try take a very long time ===&lt;br /&gt;
Note: if a fellow developer cancelled their try push, they have saddled you with the cost of rebuilding the cache. (See [http://dtor.com/halfire/2014/07/02/2014_06_try_server_update.html#caching caching] details.)&lt;br /&gt;
&lt;br /&gt;
If you&#039;re experiencing excessive wait times (&amp;gt; 45min) pushing to try, please file a bug asking IT to reset the try repository using [https://bugzilla.mozilla.org/enter_bug.cgi?comment=please%20schedule%20a%20reset%20of%20the%20try%20repository%20ASAP%20with%20sheriffs%20%26%20releng.&amp;amp;component=WebOps%3A%20Source%20Control&amp;amp;op_sys=All&amp;amp;product=Infrastructure%20%26%20Operations&amp;amp;rep_platform=All&amp;amp;short_desc=Push%20to%20try%20taking%20XXX%20minutes this template] (please include specifics of your experience). They will coordinate with sheriffs and release engineering as needed.&lt;br /&gt;
&lt;br /&gt;
=== Waiting for Lock ===&lt;br /&gt;
If you get a message similar to:&lt;br /&gt;
    remote: waiting for lock on repository /repo/hg/mozilla/try/ held by &#039;hgssh1.dmz.scl3.mozilla.com:23974&#039;&lt;br /&gt;
    remote: abort: repository /repo/hg/mozilla/try/: timed out waiting for lock held by hgssh1.dmz.scl3.mozilla.com:30549&lt;br /&gt;
It means several developers are trying to push to try at the same time. In the case above, nothing appears to be wrong, as the PID changes between the messages.&lt;br /&gt;
&lt;br /&gt;
=== Waiting for Lock multiple times with the same pid ===&lt;br /&gt;
Similar to the above case, but with the same pid when you retry over and over again.&lt;br /&gt;
&lt;br /&gt;
Please retry your push. If you see messages indicating the same process has been pushing for more than 15 minutes, treat as [[#long_try_push|above]].&lt;br /&gt;
&lt;br /&gt;
== Buildduty issues == &lt;br /&gt;
=== How do I trigger additional talos/test runs for a given try build? ===&lt;br /&gt;
If your trychooser syntax included the tests you&#039;d like more of, then select the job you want on Treeherder and use the + button. For test suites you didn&#039;t request originally you can use the &amp;quot;Add New Jobs&amp;quot; interface in Treeherder.&lt;br /&gt;
&lt;br /&gt;
=== How do I cancel existing jobs? ===&lt;br /&gt;
For individual jobs, select the relevant one on Treeherder and use the cancel button. To cancel all jobs, use the menu arrow shown on the header row for each push, and then the &amp;quot;Cancel all&amp;quot; option.&lt;br /&gt;
&lt;br /&gt;
=== TryChooser ===&lt;br /&gt;
See the [[ReleaseEngineering/TryChooser#Buildduty_Issues|TryChooser]] wiki page.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* https://developer.mozilla.org/en/Creating_Mercurial_User_Repositories&lt;br /&gt;
* http://trychooser.pub.build.mozilla.org/&lt;br /&gt;
* https://wiki.mozilla.org/Sheriffing/How:To:Recommended_Try_Practices&lt;br /&gt;
* https://wiki.mozilla.org/Build:TryChooser&lt;br /&gt;
* https://wiki.mozilla.org/ReleaseEngineering:Autoland&lt;br /&gt;
* [http://build.mozilla.org/buildapi/self-serve Manage Submissions] [[https://build.mozilla.org/buildapi/self-serve/try try]]&lt;br /&gt;
* [https://secure.pub.build.mozilla.org/builddata/reports/reportor/daily/highscores/highscores.html Scoreboard]&lt;/div&gt;</summary>
		<author><name>KWierso</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Retrigger_Jobs&amp;diff=1177676</id>
		<title>Sheriffing/How To/Retrigger Jobs</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Retrigger_Jobs&amp;diff=1177676"/>
		<updated>2017-08-08T19:46:13Z</updated>

		<summary type="html">&lt;p&gt;KWierso: Describe how to schedule PGO builds in the brave new Taskcluster world&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Sheriffing How To|Retrigger jobs}}&lt;br /&gt;
__TOC__&lt;br /&gt;
Sometimes builds and tests need to be retriggered. For some classes of automation/infrastructure failures, this happens automatically and the job is marked in the [https://treeherder.mozilla.org/userguide.html Treeherder UI] as dark blue. For other cases, or if you&#039;re doing investigative work e.g. testing for an intermittent failure, you&#039;ll need to retrigger the job manually.&lt;br /&gt;
&lt;br /&gt;
= Manual retriggers =&lt;br /&gt;
* Select a job result in Treeherder and click on it.&lt;br /&gt;
* This will display a results pane in the left bottom corner with information like Job, Machine, Task, etc.&lt;br /&gt;
* To retrigger this job/test, click on the circular arrow with the mouseover text of &amp;quot;Repeat the selected job&amp;quot; at the top of the results pane and the job will be retriggered. You can accomplish the same thing by simply pressing &amp;quot;r&amp;quot; in the results pane when you are logged in to Treeherder.&lt;br /&gt;
&lt;br /&gt;
= Retriggering PGO Builds =&lt;br /&gt;
&lt;br /&gt;
With the recent switch to Taskcluster-based builds, every push to inbound/autoland now automatically schedules PGO builds for Linux and Windows, so they can be retriggered manually as needed within Treeherder, just like any other failed job. &lt;br /&gt;
&lt;br /&gt;
Release/ESR52 still need to use self-serve to manually schedule PGO builds. Click the &amp;quot;BuildAPI&amp;quot; link on the desired push in Treeherder, copy the push&#039;s revision, paste it into the &amp;quot;Create new PGO builds on &amp;lt;tree&amp;gt;&amp;quot; textbox, and click &amp;quot;Submit&amp;quot; to request them.&lt;br /&gt;
&lt;br /&gt;
= Retriggering Nightly Builds =&lt;br /&gt;
&lt;br /&gt;
As of Jul 26, 2017 nightly builds for all platforms on m-c are now running in taskcluster so the instructions on how to respin them have been updated for these platforms&lt;br /&gt;
See https://wiki.mozilla.org/ReleaseEngineering/Buildduty/Other_Duties#Nightlies&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;CAVEAT&#039;&#039;&#039;: there are implications to triggering too many Nightly builds in a single day or in quick succession. Please talk with a sheriff first before retriggering Nightly builds.&lt;br /&gt;
&lt;br /&gt;
Release/ESR52 still need to use self-serve to manually schedule Nightly builds. Click the &amp;quot;BuildAPI&amp;quot; link on the desired push in Treeherder, copy the push&#039;s revision, paste it into the &amp;quot;Create new nightly builds on &amp;lt;tree&amp;gt;&amp;quot; textbox, and click &amp;quot;Submit&amp;quot; to request them.&lt;/div&gt;</summary>
		<author><name>KWierso</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Retrigger_Jobs&amp;diff=1177671</id>
		<title>Sheriffing/How To/Retrigger Jobs</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Retrigger_Jobs&amp;diff=1177671"/>
		<updated>2017-08-08T19:37:23Z</updated>

		<summary type="html">&lt;p&gt;KWierso: Remove the buildbot rules for triggering Nightlies&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Sheriffing How To|Retrigger jobs}}&lt;br /&gt;
__TOC__&lt;br /&gt;
Sometimes builds and tests need to be retriggered. For some classes of automation/infrastructure failures, this happens automatically and the job is marked in the [https://treeherder.mozilla.org/userguide.html Treeherder UI] as dark blue. For other cases, or if you&#039;re doing investigative work e.g. testing for an intermittent failure, you&#039;ll need to retrigger the job manually.&lt;br /&gt;
&lt;br /&gt;
= Manual retriggers =&lt;br /&gt;
* Select a job result in Treeherder and click on it.&lt;br /&gt;
* This will display a results pane in the left bottom corner with information like Job, Machine, Task, etc.&lt;br /&gt;
* To retrigger this job/test, click on the circular arrow with the mouseover text of &amp;quot;Repeat the selected job&amp;quot; at the top of the results pane and the job will be retriggered. You can accomplish the same thing by simply pressing &amp;quot;r&amp;quot; in the results pane when you are logged in to Treeherder.&lt;br /&gt;
&lt;br /&gt;
= Retriggering PGO Builds =&lt;br /&gt;
PGO (&#039;&#039;&#039;P&#039;&#039;&#039;rofile-&#039;&#039;&#039;G&#039;&#039;&#039;uided &#039;&#039;&#039;O&#039;&#039;&#039;&#039;ptimization) builds can break, just like anything else. When you fix the bustage with a backout or with help from a developer, you can trigger PGO builds to verify that the issue is fixed.&lt;br /&gt;
&lt;br /&gt;
To retrigger PGO builds on your changeset:&lt;br /&gt;
* Go the buildapi self-serve page for mozilla-central: https://secure.pub.build.mozilla.org/buildapi/self-serve/mozilla-central &lt;br /&gt;
* Input your changeset into the box labelled &amp;quot;Create new PGO builds on mozilla-central revision&amp;quot; at the bottom of the page.&lt;br /&gt;
* Click Submit&lt;br /&gt;
&lt;br /&gt;
= Retriggering Nightly Builds =&lt;br /&gt;
&lt;br /&gt;
As of Jul 26, 2017 nightly builds for all platforms on m-c are now running in taskcluster so the instructions on how to respin them have been updated for these platforms&lt;br /&gt;
See https://wiki.mozilla.org/ReleaseEngineering/Buildduty/Other_Duties#Nightlies&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;CAVEAT&#039;&#039;&#039;: there are implications to triggering too many Nightly builds in a single day or in quick succession. Please talk with a sheriff first before retriggering Nightly builds.&lt;/div&gt;</summary>
		<author><name>KWierso</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Unified_Repos&amp;diff=1177555</id>
		<title>Sheriffing/How To/Unified Repos</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Unified_Repos&amp;diff=1177555"/>
		<updated>2017-08-08T01:10:32Z</updated>

		<summary type="html">&lt;p&gt;KWierso: Drop references to fx-team&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Sheriffing How To|Unified repos}}&lt;br /&gt;
= Unified Repos =&lt;br /&gt;
* http://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/unifiedrepo.html&lt;br /&gt;
* https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/firefoxtree.html&lt;br /&gt;
&lt;br /&gt;
== Setting up the repo ==&lt;br /&gt;
* Set up your ssh key yourself&lt;br /&gt;
* Install [https://www.mercurial-scm.org/downloads Mercurial 4.2] or higher&lt;br /&gt;
* Make a copy of your .hgrc file for safekeeping and delete the original&lt;br /&gt;
* hg clone https://hg.mozilla.org/mozilla-central&lt;br /&gt;
* cd mozilla-central&lt;br /&gt;
* ./mach mercurial-setup&lt;br /&gt;
&lt;br /&gt;
Configure mercurial as desired. At a minimum, you need the following:&lt;br /&gt;
* Set your username and email.&lt;br /&gt;
* Enable the firefoxtree extension.&lt;br /&gt;
* Enable the histedit extension.&lt;br /&gt;
&lt;br /&gt;
The following will pull all (or at least most) of the branches sheriffs need to have on hand:&lt;br /&gt;
* hg pull inbound &amp;amp;&amp;amp; hg pull autoland &amp;amp;&amp;amp; hg pull beta &amp;amp;&amp;amp; hg pull release &amp;amp;&amp;amp; hg pull esr52&lt;br /&gt;
If you need other branches, you can find their names in the [https://hg.mozilla.org/hgcustom/version-control-tools/file/default/pylib/mozautomation/mozautomation/repository.py firefoxtree extension source].&lt;br /&gt;
&lt;br /&gt;
You should now have everything set up for proper use! &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want, you can rename the mozilla-central folder to something like &amp;quot;unified&amp;quot;, since it is more than just mozilla-central at this point.&lt;br /&gt;
&lt;br /&gt;
The `hg fxheads` command should list references to each of the relevant branch names, and the current revision and commit message for each.&lt;br /&gt;
&lt;br /&gt;
To pull in newly landed changes, you can use one of the following commands:&lt;br /&gt;
* hg pull fxtrees # this will pull from all branches listed with the fxheads command&lt;br /&gt;
* hg pull integration # this will pull from the mozilla-inbound and autoland branches&lt;br /&gt;
* hg pull releases # this will pull from pretty much every release branch (FYI: including old, unused branches)&lt;br /&gt;
&lt;br /&gt;
== Merges ==&lt;br /&gt;
This assumes you have your unified repo all set up so that `hg fxheads` lists each of central, autoland, and inbound.&lt;br /&gt;
&lt;br /&gt;
To merge a specific non-tip &amp;lt;revision&amp;gt; from mozilla-inbound to mozilla-central:&lt;br /&gt;
# hg pull central&lt;br /&gt;
# hg pull inbound&lt;br /&gt;
# hg up central&lt;br /&gt;
# hg merge -r &amp;lt;revision&amp;gt;&lt;br /&gt;
# hg commit -m &amp;quot;Merge mozilla-inbound to mozilla-central a=merge&amp;quot;&lt;br /&gt;
# hg push -r . central&lt;br /&gt;
&lt;br /&gt;
To merge mozilla-central into mozilla-inbound:&lt;br /&gt;
# hg pull central&lt;br /&gt;
# hg pull inbound&lt;br /&gt;
# hg up inbound&lt;br /&gt;
# hg merge central&lt;br /&gt;
# hg commit -m &amp;quot;Merge mozilla-central to mozilla-inbound a=merge&amp;quot;&lt;br /&gt;
# hg push -r . inbound&lt;br /&gt;
&lt;br /&gt;
* If the `hg merge central` command results in &amp;quot;abort: nothing to merge&amp;quot;, you should instead use `hg update -r &amp;lt;mozilla-central&#039;s tip revision&amp;gt;` to do a non-merging update, then you can do `hg push -r . inbound` to push it as usual.&lt;br /&gt;
&lt;br /&gt;
== Checkin-neededs ==&lt;br /&gt;
This assumes we&#039;re checking things in to autoland. Replace autoland with another branch name as needed.&lt;br /&gt;
&lt;br /&gt;
==== Single repository and single set of patches ====&lt;br /&gt;
Update autoland and prepare for the patches:&lt;br /&gt;
* hg pull autoland&lt;br /&gt;
* hg up autoland&lt;br /&gt;
* hg bookmark autoland-checkins&lt;br /&gt;
Import the patches:&lt;br /&gt;
* hg import https://link.to/correct/checkin-needed.patch&lt;br /&gt;
* Repeat ^ as needed for all autoland checkin-needed patches&lt;br /&gt;
Verify your outgoing changes:&lt;br /&gt;
* hg out -r . autoland&lt;br /&gt;
If you haven&#039;t lost a push race:&lt;br /&gt;
* hg push -r . autoland&lt;br /&gt;
If you lost a push race:&lt;br /&gt;
* hg pull autoland&lt;br /&gt;
* hg rebase -d autoland&lt;br /&gt;
* hg push -r . autoland&lt;br /&gt;
Delete your no longer needed bookmark:&lt;br /&gt;
* hg bookmark -d autoland-checkins&lt;br /&gt;
&lt;br /&gt;
==== Multiple repositories with a single set of patches each ====&lt;br /&gt;
You can set up multiple sets of patches at once against multiple repositories:&lt;br /&gt;
Update autoland&lt;br /&gt;
* hg pull autoland &amp;amp;&amp;amp; hg up autoland&lt;br /&gt;
Create a bookmark to base your autoland checkin-needed patches&lt;br /&gt;
* hg bookmark autoland-checkins&lt;br /&gt;
Import a bunch of patches against autoland&lt;br /&gt;
* hg import &amp;lt;patch1&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch2&amp;gt;&lt;br /&gt;
Update inbound and make a bookmark for inbound patches&lt;br /&gt;
* hg pull inbound &amp;amp;&amp;amp; hg up inbound &amp;amp;&amp;amp; hg bookmark inbound-checkins&lt;br /&gt;
Import some patches against inbound&lt;br /&gt;
* hg import &amp;lt;patch3&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch4&amp;gt;&lt;br /&gt;
See what you&#039;d be pushing to inbound and push it&lt;br /&gt;
* hg out -r . inbound # this will only show patch3 and patch4&lt;br /&gt;
* hg push -r . inbound # this only pushes patch3 and patch4&lt;br /&gt;
* hg bookmark -d inbound-checkins # delete inbound&#039;s checkin bookmark as it&#039;s not needed&lt;br /&gt;
Go back to your autoland checkins and add another patch to the bookmark, then push it&lt;br /&gt;
* hg up autoland-checkins&lt;br /&gt;
* hg import &amp;lt;patch5&amp;gt;&lt;br /&gt;
* hg out -r . autoland # this will be patch1, patch2, and patch5&lt;br /&gt;
* hg push -r . autoland&lt;br /&gt;
* hg bookmark -d autoland-checkins&lt;br /&gt;
&lt;br /&gt;
==== Single repository with multiple sets of patches ====&lt;br /&gt;
Or have multiple sets of patches against a single repository:&lt;br /&gt;
Update autoland&lt;br /&gt;
* hg pull autoland &amp;amp;&amp;amp; hg up autoland&lt;br /&gt;
Make the first bookmark/set&lt;br /&gt;
* hg bookmark autoland-checkins-1&lt;br /&gt;
* hg import &amp;lt;patch1&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch2&amp;gt;&lt;br /&gt;
Make the second set&lt;br /&gt;
* hg up autoland &amp;amp;&amp;amp; hg bookmark autoland-checkins-2&lt;br /&gt;
* hg import &amp;lt;patch3&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch4&amp;gt;&lt;br /&gt;
See what&#039;s going to be pushed in each&lt;br /&gt;
* hg out -r . autoland # patch3 and patch4&lt;br /&gt;
* hg up autoland-checkins-1 &amp;amp;&amp;amp; hg out -r . autoland # patch1 and patch2&lt;br /&gt;
Push the first set&lt;br /&gt;
* hg push -r . autoland # pushes patch1 and patch2&lt;br /&gt;
Get ready to push the second set&lt;br /&gt;
* hg up autoland-checkins-2&lt;br /&gt;
* hg rebase -d autoland # Rebase the second set onto the now-pushed first set&lt;br /&gt;
And push it&lt;br /&gt;
* hg push -r . autoland # pushes patch3 and patch4&lt;br /&gt;
Delete the now-unneeded bookmarks&lt;br /&gt;
* hg bookmark -d autoland-checkins-1&lt;br /&gt;
* hg bookmark -d autoland-checkins-2&lt;br /&gt;
&lt;br /&gt;
== Uplifts ==&lt;br /&gt;
If branch-specific patches are posted, follow the checkin-needed instructions above, importing the patches onto the release branch.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re uplifting directly from an m-c checkin to aurora:&lt;br /&gt;
&lt;br /&gt;
Pull and update to prepare for the uplifts:&lt;br /&gt;
* hg pull central&lt;br /&gt;
* hg pull aurora&lt;br /&gt;
* hg up aurora&lt;br /&gt;
Graft the mc commit and bring up the editor to edit the commit message, adding &amp;quot;a=foo&amp;quot; as needed:&lt;br /&gt;
* hg graft --edit -r &amp;lt;revision&amp;gt;&lt;br /&gt;
Repeat the previous step as needed for all uplifts as needed.&lt;br /&gt;
Verify the outgoing changes and push:&lt;br /&gt;
* hg out -r . aurora&lt;br /&gt;
* hg push -r . aurora&lt;br /&gt;
&lt;br /&gt;
You can graft a range of commits at once if that&#039;s easier:&lt;br /&gt;
* hg graft -r &amp;lt;toprevision&amp;gt;::&amp;lt;bottomrevision&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Read the documentation for [https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/unifiedrepo.html#uplifting-backporting-commits graft] for further help.&lt;br /&gt;
&lt;br /&gt;
== Backouts ==&lt;br /&gt;
Better tools are coming:&lt;br /&gt;
* https://bugzilla.mozilla.org/show_bug.cgi?id=1117632&lt;br /&gt;
* https://bugzilla.mozilla.org/show_bug.cgi?id=1121211&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The standard backout command makes backing out revisions more difficult than it should, as it won&#039;t pre-fill the backout commit message with a bug number:&lt;br /&gt;
* Copy backout &amp;lt;revision&amp;gt; from treeherder, note the bug &amp;lt;number&amp;gt;, and remember the &amp;lt;reason&amp;gt;&lt;br /&gt;
* hg backout -r &amp;lt;revision&amp;gt;&lt;br /&gt;
** This should open up your editor with a completely empty commit message. Type in the backout message like &amp;quot;Backout revision &amp;lt;revision&amp;gt; (bug &amp;lt;number&amp;gt;) for &amp;lt;reason&amp;gt;&amp;quot; (possibly with &amp;quot;CLOSED TREE&amp;quot; in there to get around a closure hook).&lt;br /&gt;
* hg push -r . &amp;lt;tree&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://hg.mozilla.org/hgcustom/version-control-tools/file/4e7ab9638cf0/hgext/qbackout qbackout] can still be used, though you will want to use `hg oops` in place of `hg qbackout` (eg if you use `hg share` to get multiple working directories, qbackout and other uses of mq do not play nice with shared repos):&lt;br /&gt;
* Copy the backout &amp;lt;revision&amp;gt; from treeherder&lt;br /&gt;
* hg oops -e -r &amp;lt;revision&amp;gt;&lt;br /&gt;
** This should open up your editor with a prepopulated commit message like &amp;quot;Backed out &amp;lt;revision&amp;gt; (bug &amp;lt;number&amp;gt;)&amp;quot;. Add in the &amp;lt;reason&amp;gt; and possibly &amp;quot;CLOSED TREE&amp;quot; to get around a closure hook.&lt;br /&gt;
* hg out -r . &amp;lt;tree&amp;gt;&lt;br /&gt;
** to double-check what you will be pushing&lt;br /&gt;
* hg push -r . &amp;lt;tree&amp;gt;&lt;br /&gt;
&lt;br /&gt;
qbackout can also back out a range of commits in a single backout commit:&lt;br /&gt;
* hg oops -e -s -r &amp;lt;toprevision&amp;gt;:&amp;lt;bottomrevision&amp;gt;&lt;br /&gt;
** This will open your editor with a prepopulated commit message like &amp;quot;Backed out &amp;lt;toprevision&amp;gt;,&amp;lt;anymiddlerevisions&amp;gt;,&amp;lt;bottomrevision&amp;gt; (bug &amp;lt;number&amp;gt;,any other bug &amp;lt;numbers&amp;gt;)&amp;quot;. Add in the &amp;lt;reason&amp;gt; and possibly &amp;quot;CLOSED TREE&amp;quot; to get around a closure hook.&lt;br /&gt;
* hg push -r . &amp;lt;tree&amp;gt;&lt;br /&gt;
(Omit oops&#039;s -s flag to back out each individual revision in the range as a separate commit.)&lt;br /&gt;
&lt;br /&gt;
=== Revert a backout ===&lt;br /&gt;
* `hg graft`, see https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/common.html#revive-a-commit-that-was-backed-out&lt;br /&gt;
&lt;br /&gt;
== Rebasing after losing a push race ==&lt;br /&gt;
This assumes you have commits you&#039;re attempting to push to mozilla-inbound when you lose a push race with someone. Change `inbound` to the correct branch name as needed.&lt;br /&gt;
&lt;br /&gt;
* hg pull inbound &lt;br /&gt;
* hg rebase -d inbound &lt;br /&gt;
* hg push -r . inbound&lt;br /&gt;
&lt;br /&gt;
== Recovering from mistakes ==&lt;br /&gt;
&amp;lt;big&amp;gt;WARNING:&amp;lt;/big&amp;gt; This will strip out any commits that haven&#039;t been pushed to the remote repositories, regardless of what branch/label/tag those commits are on. (So if you have local changes on inbound and run this command to strip something bad on autoland, both inbound and autoland will be stripped.) Only do this if you don&#039;t care about any of those commits!&lt;br /&gt;
* hg strip &#039;not public()&#039;&lt;br /&gt;
&lt;br /&gt;
You may also need to use some combination of the following to get things back to a known-good state:&lt;br /&gt;
* hg purge # http://mercurial.selenic.com/wiki/PurgeExtension&lt;br /&gt;
* hg up -C&lt;br /&gt;
&lt;br /&gt;
== See what you&#039;re about to push ==&lt;br /&gt;
`hg out` without any flags added will show you a LOT of unrelated commits. To see just what you&#039;ll be pushing to a given branch, use `hg out -r . &amp;lt;branch&amp;gt;`&lt;br /&gt;
* hg out -r . inbound&lt;br /&gt;
** This will only display the things you&#039;re about to push to the inbound branch&lt;br /&gt;
&lt;br /&gt;
== View incoming changes ==&lt;br /&gt;
Since your unified repo will likely have all changesets from the various branches pulled locally, `hg in &amp;lt;somebranch&amp;gt; -r &amp;lt;somerev&amp;gt;` will likely not help you see what would be pulled into your current branch from &amp;lt;somebranch&amp;gt; up to that &amp;lt;somerev&amp;gt;.&lt;br /&gt;
Instead, you can use the following to print out the equivalent. Say you want to see what would be merged onto mozilla-central from autoland&#039;s revision ca142ec8ba0f:&lt;br /&gt;
&lt;br /&gt;
Make sure m-c is fully up to date:&lt;br /&gt;
* hg pull central &lt;br /&gt;
* hg up central &lt;br /&gt;
Get all of autoland&#039;s changesets:&lt;br /&gt;
* hg pull autoland&lt;br /&gt;
Do a preview of the merge without actually performing the merge:&lt;br /&gt;
* hg merge -r ca142ec8ba0f -P&lt;br /&gt;
This will print out everything on autoland (up to and including revision ca142ec8ba0f) that is not already on mozilla-central.&lt;br /&gt;
&lt;br /&gt;
== See the log for a particular branch ==&lt;br /&gt;
* hg log -fr [branch]&lt;br /&gt;
&lt;br /&gt;
= Extras =&lt;br /&gt;
== hg aliases ==&lt;br /&gt;
=== mergetocentral/mergetointegration ===&lt;br /&gt;
I set up the following aliases in my global .hgrc file to make merging things around trunk a little faster:&lt;br /&gt;
 [alias]&lt;br /&gt;
 # merge tree $1, revision $2 to central, optionally appending $3 (for &amp;quot;CLOSED TREE&amp;quot;, etc)&lt;br /&gt;
 mergetocentral = !$HG pull central ; $HG up central ; $HG pull $1 ; $HG merge $2 ; $HG commit -m &amp;quot;Merge $1 to central, a=merge $3&amp;quot; ; $HG push -r . central&lt;br /&gt;
 # merge central tip to tree $1, optionally appending $2 (for &amp;quot;CLOSED TREE&amp;quot;, etc)&lt;br /&gt;
 mergetointegration = !$HG pull central ; $HG pull $1 ; $HG up $1 ; $HG merge central ; $HG commit -m &amp;quot;Merge m-c to $1, a=merge $2&amp;quot; ; $HG push -r . $1&lt;br /&gt;
&lt;br /&gt;
With these set up, I can merge autoland&#039;s revision 04a3d9130aa0 over to mozilla-central with the following command:&lt;br /&gt;
 hg mergetocentral autoland 04a3d9130aa0&lt;br /&gt;
and then I can merge mozilla-central&#039;s tip back to autoland with the following command:&lt;br /&gt;
 hg mergetointegration autoland&lt;br /&gt;
This cuts down on a lot of repetitive typing, saving a bit of time.&lt;br /&gt;
&lt;br /&gt;
=== rbimport ===&lt;br /&gt;
For merging from reviewboard patches, there&#039;s this alias&lt;br /&gt;
  rbimport = !hg transplant -e -s https://reviewboard-hg.mozilla.org/gecko -b $1&lt;br /&gt;
&lt;br /&gt;
Then, it&#039;s matter of importing the right hash like the following command:&lt;br /&gt;
  hg rbimport dd1462ba321db983061b94e30cee92b6bd81e908&lt;/div&gt;</summary>
		<author><name>KWierso</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Unified_Repos&amp;diff=1177554</id>
		<title>Sheriffing/How To/Unified Repos</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Unified_Repos&amp;diff=1177554"/>
		<updated>2017-08-08T01:10:14Z</updated>

		<summary type="html">&lt;p&gt;KWierso: Drop references to fx-team&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Sheriffing How To|Unified repos}}&lt;br /&gt;
= Unified Repos =&lt;br /&gt;
* http://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/unifiedrepo.html&lt;br /&gt;
* https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/firefoxtree.html&lt;br /&gt;
&lt;br /&gt;
== Setting up the repo ==&lt;br /&gt;
* Set up your ssh key yourself&lt;br /&gt;
* Install [https://www.mercurial-scm.org/downloads Mercurial 4.2] or higher&lt;br /&gt;
* Make a copy of your .hgrc file for safekeeping and delete the original&lt;br /&gt;
* hg clone https://hg.mozilla.org/mozilla-central&lt;br /&gt;
* cd mozilla-central&lt;br /&gt;
* ./mach mercurial-setup&lt;br /&gt;
&lt;br /&gt;
Configure mercurial as desired. At a minimum, you need the following:&lt;br /&gt;
* Set your username and email.&lt;br /&gt;
* Enable the firefoxtree extension.&lt;br /&gt;
* Enable the histedit extension.&lt;br /&gt;
&lt;br /&gt;
The following will pull all (or at least most) of the branches sheriffs need to have on hand:&lt;br /&gt;
* hg pull inbound &amp;amp;&amp;amp; hg pull autoland &amp;amp;&amp;amp; hg pull beta &amp;amp;&amp;amp; hg pull release &amp;amp;&amp;amp; hg pull esr52&lt;br /&gt;
If you need other branches, you can find their names in the [https://hg.mozilla.org/hgcustom/version-control-tools/file/default/pylib/mozautomation/mozautomation/repository.py firefoxtree extension source].&lt;br /&gt;
&lt;br /&gt;
You should now have everything set up for proper use! &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want, you can rename the mozilla-central folder to something like &amp;quot;unified&amp;quot;, since it is more than just mozilla-central at this point.&lt;br /&gt;
&lt;br /&gt;
The `hg fxheads` command should list references to each of the relevant branch names, and the current revision and commit message for each.&lt;br /&gt;
&lt;br /&gt;
To pull in newly landed changes, you can use one of the following commands:&lt;br /&gt;
* hg pull fxtrees # this will pull from all branches listed with the fxheads command&lt;br /&gt;
* hg pull integration # this will pull from the mozilla-inbound and autoland branches&lt;br /&gt;
* hg pull releases # this will pull from pretty much every release branch (FYI: including old, unused branches)&lt;br /&gt;
&lt;br /&gt;
== Merges ==&lt;br /&gt;
This assumes you have your unified repo all set up so that `hg fxheads` lists each of central, autoland, and inbound.&lt;br /&gt;
&lt;br /&gt;
To merge a specific non-tip &amp;lt;revision&amp;gt; from mozilla-inbound to mozilla-central:&lt;br /&gt;
# hg pull central&lt;br /&gt;
# hg pull inbound&lt;br /&gt;
# hg up central&lt;br /&gt;
# hg merge -r &amp;lt;revision&amp;gt;&lt;br /&gt;
# hg commit -m &amp;quot;Merge mozilla-inbound to mozilla-central a=merge&amp;quot;&lt;br /&gt;
# hg push -r . central&lt;br /&gt;
&lt;br /&gt;
To merge mozilla-central into mozilla-inbound:&lt;br /&gt;
# hg pull central&lt;br /&gt;
# hg pull inbound&lt;br /&gt;
# hg up inbound&lt;br /&gt;
# hg merge central&lt;br /&gt;
# hg commit -m &amp;quot;Merge mozilla-central to mozilla-inbound a=merge&amp;quot;&lt;br /&gt;
# hg push -r . inbound&lt;br /&gt;
&lt;br /&gt;
* If the `hg merge central` command results in &amp;quot;abort: nothing to merge&amp;quot;, you should instead use `hg update -r &amp;lt;mozilla-central&#039;s tip revision&amp;gt;` to do a non-merging update, then you can do `hg push -r . inbound` to push it as usual.&lt;br /&gt;
&lt;br /&gt;
== Checkin-neededs ==&lt;br /&gt;
This assumes we&#039;re checking things in to autoland. Replace autoland with another branch name as needed.&lt;br /&gt;
&lt;br /&gt;
==== Single repository and single set of patches ====&lt;br /&gt;
Update autoland and prepare for the patches:&lt;br /&gt;
* hg pull autoland&lt;br /&gt;
* hg up autoland&lt;br /&gt;
* hg bookmark autoland-checkins&lt;br /&gt;
Import the patches:&lt;br /&gt;
* hg import https://link.to/correct/checkin-needed.patch&lt;br /&gt;
* Repeat ^ as needed for all autoland checkin-needed patches&lt;br /&gt;
Verify your outgoing changes:&lt;br /&gt;
* hg out -r . autoland&lt;br /&gt;
If you haven&#039;t lost a push race:&lt;br /&gt;
* hg push -r . autoland&lt;br /&gt;
If you lost a push race:&lt;br /&gt;
* hg pull autoland&lt;br /&gt;
* hg rebase -d autoland&lt;br /&gt;
* hg push -r . autoland&lt;br /&gt;
Delete your no longer needed bookmark:&lt;br /&gt;
* hg bookmark -d autoland-checkins&lt;br /&gt;
&lt;br /&gt;
==== Multiple repositories with a single set of patches each ====&lt;br /&gt;
You can set up multiple sets of patches at once against multiple repositories:&lt;br /&gt;
Update autoland&lt;br /&gt;
* hg pull autoland &amp;amp;&amp;amp; hg up autoland&lt;br /&gt;
Create a bookmark to base your autoland checkin-needed patches&lt;br /&gt;
* hg bookmark autoland-checkins&lt;br /&gt;
Import a bunch of patches against autoland&lt;br /&gt;
* hg import &amp;lt;patch1&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch2&amp;gt;&lt;br /&gt;
Update inbound and make a bookmark for inbound patches&lt;br /&gt;
* hg pull inbound &amp;amp;&amp;amp; hg up inbound &amp;amp;&amp;amp; hg bookmark inbound-checkins&lt;br /&gt;
Import some patches against inbound&lt;br /&gt;
* hg import &amp;lt;patch3&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch4&amp;gt;&lt;br /&gt;
See what you&#039;d be pushing to inbound and push it&lt;br /&gt;
* hg out -r . inbound # this will only show patch3 and patch4&lt;br /&gt;
* hg push -r . inbound # this only pushes patch3 and patch4&lt;br /&gt;
* hg bookmark -d inbound-checkins # delete inbound&#039;s checkin bookmark as it&#039;s not needed&lt;br /&gt;
Go back to your autoland checkins and add another patch to the bookmark, then push it&lt;br /&gt;
* hg up autoland-checkins&lt;br /&gt;
* hg import &amp;lt;patch5&amp;gt;&lt;br /&gt;
* hg out -r . autoland # this will be patch1, patch2, and patch5&lt;br /&gt;
* hg push -r . autoland&lt;br /&gt;
* hg bookmark -d autoland-checkins&lt;br /&gt;
&lt;br /&gt;
==== Single repository with multiple sets of patches ====&lt;br /&gt;
Or have multiple sets of patches against a single repository:&lt;br /&gt;
Update autoland&lt;br /&gt;
* hg pull autoland &amp;amp;&amp;amp; hg up autoland&lt;br /&gt;
Make the first bookmark/set&lt;br /&gt;
* hg bookmark autoland-checkins-1&lt;br /&gt;
* hg import &amp;lt;patch1&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch2&amp;gt;&lt;br /&gt;
Make the second set&lt;br /&gt;
* hg up autoland &amp;amp;&amp;amp; hg bookmark autoland-checkins-2&lt;br /&gt;
* hg import &amp;lt;patch3&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch4&amp;gt;&lt;br /&gt;
See what&#039;s going to be pushed in each&lt;br /&gt;
* hg out -r . autoland # patch3 and patch4&lt;br /&gt;
* hg up autoland-checkins-1 &amp;amp;&amp;amp; hg out -r . autoland # patch1 and patch2&lt;br /&gt;
Push the first set&lt;br /&gt;
* hg push -r . autoland # pushes patch1 and patch2&lt;br /&gt;
Get ready to push the second set&lt;br /&gt;
* hg up autoland-checkins-2&lt;br /&gt;
* hg rebase -d autoland # Rebase the second set onto the now-pushed first set&lt;br /&gt;
And push it&lt;br /&gt;
* hg push -r . autoland # pushes patch3 and patch4&lt;br /&gt;
Delete the now-unneeded bookmarks&lt;br /&gt;
* hg bookmark -d autoland-checkins-1&lt;br /&gt;
* hg bookmark -d autoland-checkins-2&lt;br /&gt;
&lt;br /&gt;
== Uplifts ==&lt;br /&gt;
If branch-specific patches are posted, follow the checkin-needed instructions above, importing the patches onto the release branch.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re uplifting directly from an m-c checkin to aurora:&lt;br /&gt;
&lt;br /&gt;
Pull and update to prepare for the uplifts:&lt;br /&gt;
* hg pull central&lt;br /&gt;
* hg pull aurora&lt;br /&gt;
* hg up aurora&lt;br /&gt;
Graft the mc commit and bring up the editor to edit the commit message, adding &amp;quot;a=foo&amp;quot; as needed:&lt;br /&gt;
* hg graft --edit -r &amp;lt;revision&amp;gt;&lt;br /&gt;
Repeat the previous step as needed for all uplifts as needed.&lt;br /&gt;
Verify the outgoing changes and push:&lt;br /&gt;
* hg out -r . aurora&lt;br /&gt;
* hg push -r . aurora&lt;br /&gt;
&lt;br /&gt;
You can graft a range of commits at once if that&#039;s easier:&lt;br /&gt;
* hg graft -r &amp;lt;toprevision&amp;gt;::&amp;lt;bottomrevision&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Read the documentation for [https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/unifiedrepo.html#uplifting-backporting-commits graft] for further help.&lt;br /&gt;
&lt;br /&gt;
== Backouts ==&lt;br /&gt;
Better tools are coming:&lt;br /&gt;
* https://bugzilla.mozilla.org/show_bug.cgi?id=1117632&lt;br /&gt;
* https://bugzilla.mozilla.org/show_bug.cgi?id=1121211&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The standard backout command makes backing out revisions more difficult than it should, as it won&#039;t pre-fill the backout commit message with a bug number:&lt;br /&gt;
* Copy backout &amp;lt;revision&amp;gt; from treeherder, note the bug &amp;lt;number&amp;gt;, and remember the &amp;lt;reason&amp;gt;&lt;br /&gt;
* hg backout -r &amp;lt;revision&amp;gt;&lt;br /&gt;
** This should open up your editor with a completely empty commit message. Type in the backout message like &amp;quot;Backout revision &amp;lt;revision&amp;gt; (bug &amp;lt;number&amp;gt;) for &amp;lt;reason&amp;gt;&amp;quot; (possibly with &amp;quot;CLOSED TREE&amp;quot; in there to get around a closure hook).&lt;br /&gt;
* hg push -r . &amp;lt;tree&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://hg.mozilla.org/hgcustom/version-control-tools/file/4e7ab9638cf0/hgext/qbackout qbackout] can still be used, though you will want to use `hg oops` in place of `hg qbackout` (eg if you use `hg share` to get multiple working directories, qbackout and other uses of mq do not play nice with shared repos):&lt;br /&gt;
* Copy the backout &amp;lt;revision&amp;gt; from treeherder&lt;br /&gt;
* hg oops -e -r &amp;lt;revision&amp;gt;&lt;br /&gt;
** This should open up your editor with a prepopulated commit message like &amp;quot;Backed out &amp;lt;revision&amp;gt; (bug &amp;lt;number&amp;gt;)&amp;quot;. Add in the &amp;lt;reason&amp;gt; and possibly &amp;quot;CLOSED TREE&amp;quot; to get around a closure hook.&lt;br /&gt;
* hg out -r . &amp;lt;tree&amp;gt;&lt;br /&gt;
** to double-check what you will be pushing&lt;br /&gt;
* hg push -r . &amp;lt;tree&amp;gt;&lt;br /&gt;
&lt;br /&gt;
qbackout can also back out a range of commits in a single backout commit:&lt;br /&gt;
* hg oops -e -s -r &amp;lt;toprevision&amp;gt;:&amp;lt;bottomrevision&amp;gt;&lt;br /&gt;
** This will open your editor with a prepopulated commit message like &amp;quot;Backed out &amp;lt;toprevision&amp;gt;,&amp;lt;anymiddlerevisions&amp;gt;,&amp;lt;bottomrevision&amp;gt; (bug &amp;lt;number&amp;gt;,any other bug &amp;lt;numbers&amp;gt;)&amp;quot;. Add in the &amp;lt;reason&amp;gt; and possibly &amp;quot;CLOSED TREE&amp;quot; to get around a closure hook.&lt;br /&gt;
* hg push -r . &amp;lt;tree&amp;gt;&lt;br /&gt;
(Omit oops&#039;s -s flag to back out each individual revision in the range as a separate commit.)&lt;br /&gt;
&lt;br /&gt;
=== Revert a backout ===&lt;br /&gt;
* `hg graft`, see https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/common.html#revive-a-commit-that-was-backed-out&lt;br /&gt;
&lt;br /&gt;
== Rebasing after losing a push race ==&lt;br /&gt;
This assumes you have commits you&#039;re attempting to push to mozilla-inbound when you lose a push race with someone. Change `inbound` to the correct branch name as needed.&lt;br /&gt;
&lt;br /&gt;
* hg pull inbound &lt;br /&gt;
* hg rebase -d inbound &lt;br /&gt;
* hg push -r . inbound&lt;br /&gt;
&lt;br /&gt;
== Recovering from mistakes ==&lt;br /&gt;
&amp;lt;big&amp;gt;WARNING:&amp;lt;/big&amp;gt; This will strip out any commits that haven&#039;t been pushed to the remote repositories, regardless of what branch/label/tag those commits are on. (So if you have local changes on inbound and run this command to strip something bad on autoland, both inbound and autoland will be stripped.) Only do this if you don&#039;t care about any of those commits!&lt;br /&gt;
* hg strip &#039;not public()&#039;&lt;br /&gt;
&lt;br /&gt;
You may also need to use some combination of the following to get things back to a known-good state:&lt;br /&gt;
* hg purge # http://mercurial.selenic.com/wiki/PurgeExtension&lt;br /&gt;
* hg up -C&lt;br /&gt;
&lt;br /&gt;
== See what you&#039;re about to push ==&lt;br /&gt;
`hg out` without any flags added will show you a LOT of unrelated commits. To see just what you&#039;ll be pushing to a given branch, use `hg out -r . &amp;lt;branch&amp;gt;`&lt;br /&gt;
* hg out -r . inbound&lt;br /&gt;
** This will only display the things you&#039;re about to push to the inbound branch&lt;br /&gt;
&lt;br /&gt;
== View incoming changes ==&lt;br /&gt;
Since your unified repo will likely have all changesets from the various branches pulled locally, `hg in &amp;lt;somebranch&amp;gt; -r &amp;lt;somerev&amp;gt;` will likely not help you see what would be pulled into your current branch from &amp;lt;somebranch&amp;gt; up to that &amp;lt;somerev&amp;gt;.&lt;br /&gt;
Instead, you can use the following to print out the equivalent. Say you want to see what would be merged onto mozilla-central from b2g-inbound&#039;s revision ca142ec8ba0f:&lt;br /&gt;
&lt;br /&gt;
Make sure m-c is fully up to date:&lt;br /&gt;
* hg pull central &lt;br /&gt;
* hg up central &lt;br /&gt;
Get all of autoland&#039;s changesets:&lt;br /&gt;
* hg pull autoland&lt;br /&gt;
Do a preview of the merge without actually performing the merge:&lt;br /&gt;
* hg merge -r ca142ec8ba0f -P&lt;br /&gt;
This will print out everything on autoland (up to and including revision ca142ec8ba0f) that is not already on mozilla-central.&lt;br /&gt;
&lt;br /&gt;
== See the log for a particular branch ==&lt;br /&gt;
* hg log -fr [branch]&lt;br /&gt;
&lt;br /&gt;
= Extras =&lt;br /&gt;
== hg aliases ==&lt;br /&gt;
=== mergetocentral/mergetointegration ===&lt;br /&gt;
I set up the following aliases in my global .hgrc file to make merging things around trunk a little faster:&lt;br /&gt;
 [alias]&lt;br /&gt;
 # merge tree $1, revision $2 to central, optionally appending $3 (for &amp;quot;CLOSED TREE&amp;quot;, etc)&lt;br /&gt;
 mergetocentral = !$HG pull central ; $HG up central ; $HG pull $1 ; $HG merge $2 ; $HG commit -m &amp;quot;Merge $1 to central, a=merge $3&amp;quot; ; $HG push -r . central&lt;br /&gt;
 # merge central tip to tree $1, optionally appending $2 (for &amp;quot;CLOSED TREE&amp;quot;, etc)&lt;br /&gt;
 mergetointegration = !$HG pull central ; $HG pull $1 ; $HG up $1 ; $HG merge central ; $HG commit -m &amp;quot;Merge m-c to $1, a=merge $2&amp;quot; ; $HG push -r . $1&lt;br /&gt;
&lt;br /&gt;
With these set up, I can merge autoland&#039;s revision 04a3d9130aa0 over to mozilla-central with the following command:&lt;br /&gt;
 hg mergetocentral autoland 04a3d9130aa0&lt;br /&gt;
and then I can merge mozilla-central&#039;s tip back to autoland with the following command:&lt;br /&gt;
 hg mergetointegration autoland&lt;br /&gt;
This cuts down on a lot of repetitive typing, saving a bit of time.&lt;br /&gt;
&lt;br /&gt;
=== rbimport ===&lt;br /&gt;
For merging from reviewboard patches, there&#039;s this alias&lt;br /&gt;
  rbimport = !hg transplant -e -s https://reviewboard-hg.mozilla.org/gecko -b $1&lt;br /&gt;
&lt;br /&gt;
Then, it&#039;s matter of importing the right hash like the following command:&lt;br /&gt;
  hg rbimport dd1462ba321db983061b94e30cee92b6bd81e908&lt;/div&gt;</summary>
		<author><name>KWierso</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Unified_Repos&amp;diff=1177553</id>
		<title>Sheriffing/How To/Unified Repos</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Unified_Repos&amp;diff=1177553"/>
		<updated>2017-08-08T01:09:34Z</updated>

		<summary type="html">&lt;p&gt;KWierso: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Sheriffing How To|Unified repos}}&lt;br /&gt;
= Unified Repos =&lt;br /&gt;
* http://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/unifiedrepo.html&lt;br /&gt;
* https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/firefoxtree.html&lt;br /&gt;
&lt;br /&gt;
== Setting up the repo ==&lt;br /&gt;
* Set up your ssh key yourself&lt;br /&gt;
* Install [https://www.mercurial-scm.org/downloads Mercurial 4.2] or higher&lt;br /&gt;
* Make a copy of your .hgrc file for safekeeping and delete the original&lt;br /&gt;
* hg clone https://hg.mozilla.org/mozilla-central&lt;br /&gt;
* cd mozilla-central&lt;br /&gt;
* ./mach mercurial-setup&lt;br /&gt;
&lt;br /&gt;
Configure mercurial as desired. At a minimum, you need the following:&lt;br /&gt;
* Set your username and email.&lt;br /&gt;
* Enable the firefoxtree extension.&lt;br /&gt;
* Enable the histedit extension.&lt;br /&gt;
&lt;br /&gt;
The following will pull all (or at least most) of the branches sheriffs need to have on hand:&lt;br /&gt;
* hg pull inbound &amp;amp;&amp;amp; hg pull autoland &amp;amp;&amp;amp; hg pull beta &amp;amp;&amp;amp; hg pull release &amp;amp;&amp;amp; hg pull esr52&lt;br /&gt;
If you need other branches, you can find their names in the [https://hg.mozilla.org/hgcustom/version-control-tools/file/default/pylib/mozautomation/mozautomation/repository.py firefoxtree extension source].&lt;br /&gt;
&lt;br /&gt;
You should now have everything set up for proper use! &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want, you can rename the mozilla-central folder to something like &amp;quot;unified&amp;quot;, since it is more than just mozilla-central at this point.&lt;br /&gt;
&lt;br /&gt;
The `hg fxheads` command should list references to each of the relevant branch names, and the current revision and commit message for each.&lt;br /&gt;
&lt;br /&gt;
To pull in newly landed changes, you can use one of the following commands:&lt;br /&gt;
* hg pull fxtrees # this will pull from all branches listed with the fxheads command&lt;br /&gt;
* hg pull integration # this will pull from the mozilla-inbound and autoland branches&lt;br /&gt;
* hg pull releases # this will pull from pretty much every release branch (FYI: including old, unused branches)&lt;br /&gt;
&lt;br /&gt;
== Merges ==&lt;br /&gt;
This assumes you have your unified repo all set up so that `hg fxheads` lists each of central, autoland, and inbound.&lt;br /&gt;
&lt;br /&gt;
To merge a specific non-tip &amp;lt;revision&amp;gt; from mozilla-inbound to mozilla-central:&lt;br /&gt;
# hg pull central&lt;br /&gt;
# hg pull inbound&lt;br /&gt;
# hg up central&lt;br /&gt;
# hg merge -r &amp;lt;revision&amp;gt;&lt;br /&gt;
# hg commit -m &amp;quot;Merge mozilla-inbound to mozilla-central a=merge&amp;quot;&lt;br /&gt;
# hg push -r . central&lt;br /&gt;
&lt;br /&gt;
To merge mozilla-central into mozilla-inbound:&lt;br /&gt;
# hg pull central&lt;br /&gt;
# hg pull inbound&lt;br /&gt;
# hg up inbound&lt;br /&gt;
# hg merge central&lt;br /&gt;
# hg commit -m &amp;quot;Merge mozilla-central to mozilla-inbound a=merge&amp;quot;&lt;br /&gt;
# hg push -r . inbound&lt;br /&gt;
&lt;br /&gt;
* If the `hg merge central` command results in &amp;quot;abort: nothing to merge&amp;quot;, you should instead use `hg update -r &amp;lt;mozilla-central&#039;s tip revision&amp;gt;` to do a non-merging update, then you can do `hg push -r . inbound` to push it as usual.&lt;br /&gt;
&lt;br /&gt;
== Checkin-neededs ==&lt;br /&gt;
This assumes we&#039;re checking things in to autoland. Replace autoland with another branch name as needed.&lt;br /&gt;
&lt;br /&gt;
==== Single repository and single set of patches ====&lt;br /&gt;
Update autoland and prepare for the patches:&lt;br /&gt;
* hg pull autoland&lt;br /&gt;
* hg up autoland&lt;br /&gt;
* hg bookmark autoland-checkins&lt;br /&gt;
Import the patches:&lt;br /&gt;
* hg import https://link.to/correct/checkin-needed.patch&lt;br /&gt;
* Repeat ^ as needed for all autoland checkin-needed patches&lt;br /&gt;
Verify your outgoing changes:&lt;br /&gt;
* hg out -r . autoland&lt;br /&gt;
If you haven&#039;t lost a push race:&lt;br /&gt;
* hg push -r . autoland&lt;br /&gt;
If you lost a push race:&lt;br /&gt;
* hg pull autoland&lt;br /&gt;
* hg rebase -d autoland&lt;br /&gt;
* hg push -r . autoland&lt;br /&gt;
Delete your no longer needed bookmark:&lt;br /&gt;
* hg bookmark -d autoland-checkins&lt;br /&gt;
&lt;br /&gt;
==== Multiple repositories with a single set of patches each ====&lt;br /&gt;
You can set up multiple sets of patches at once against multiple repositories:&lt;br /&gt;
Update autoland&lt;br /&gt;
* hg pull autoland &amp;amp;&amp;amp; hg up autoland&lt;br /&gt;
Create a bookmark to base your autoland checkin-needed patches&lt;br /&gt;
* hg bookmark autoland-checkins&lt;br /&gt;
Import a bunch of patches against autoland&lt;br /&gt;
* hg import &amp;lt;patch1&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch2&amp;gt;&lt;br /&gt;
Update inbound and make a bookmark for inbound patches&lt;br /&gt;
* hg pull inbound &amp;amp;&amp;amp; hg up inbound &amp;amp;&amp;amp; hg bookmark inbound-checkins&lt;br /&gt;
Import some patches against inbound&lt;br /&gt;
* hg import &amp;lt;patch3&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch4&amp;gt;&lt;br /&gt;
See what you&#039;d be pushing to inbound and push it&lt;br /&gt;
* hg out -r . inbound # this will only show patch3 and patch4&lt;br /&gt;
* hg push -r . inbound # this only pushes patch3 and patch4&lt;br /&gt;
* hg bookmark -d inbound-checkins # delete inbound&#039;s checkin bookmark as it&#039;s not needed&lt;br /&gt;
Go back to your autoland checkins and add another patch to the bookmark, then push it&lt;br /&gt;
* hg up autoland-checkins&lt;br /&gt;
* hg import &amp;lt;patch5&amp;gt;&lt;br /&gt;
* hg out -r . autoland # this will be patch1, patch2, and patch5&lt;br /&gt;
* hg push -r . autoland&lt;br /&gt;
* hg bookmark -d autoland-checkins&lt;br /&gt;
&lt;br /&gt;
==== Single repository with multiple sets of patches ====&lt;br /&gt;
Or have multiple sets of patches against a single repository:&lt;br /&gt;
Update autoland&lt;br /&gt;
* hg pull autoland &amp;amp;&amp;amp; hg up autoland&lt;br /&gt;
Make the first bookmark/set&lt;br /&gt;
* hg bookmark autoland-checkins-1&lt;br /&gt;
* hg import &amp;lt;patch1&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch2&amp;gt;&lt;br /&gt;
Make the second set&lt;br /&gt;
* hg up autoland &amp;amp;&amp;amp; hg bookmark autoland-checkins-2&lt;br /&gt;
* hg import &amp;lt;patch3&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch4&amp;gt;&lt;br /&gt;
See what&#039;s going to be pushed in each&lt;br /&gt;
* hg out -r . autoland # patch3 and patch4&lt;br /&gt;
* hg up autoland-checkins-1 &amp;amp;&amp;amp; hg out -r . autoland # patch1 and patch2&lt;br /&gt;
Push the first set&lt;br /&gt;
* hg push -r . autoland # pushes patch1 and patch2&lt;br /&gt;
Get ready to push the second set&lt;br /&gt;
* hg up autoland-checkins-2&lt;br /&gt;
* hg rebase -d autoland # Rebase the second set onto the now-pushed first set&lt;br /&gt;
And push it&lt;br /&gt;
* hg push -r . autoland # pushes patch3 and patch4&lt;br /&gt;
Delete the now-unneeded bookmarks&lt;br /&gt;
* hg bookmark -d autoland-checkins-1&lt;br /&gt;
* hg bookmark -d autoland-checkins-2&lt;br /&gt;
&lt;br /&gt;
== Uplifts ==&lt;br /&gt;
If branch-specific patches are posted, follow the checkin-needed instructions above, importing the patches onto the release branch.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re uplifting directly from an m-c checkin to aurora:&lt;br /&gt;
&lt;br /&gt;
Pull and update to prepare for the uplifts:&lt;br /&gt;
* hg pull central&lt;br /&gt;
* hg pull aurora&lt;br /&gt;
* hg up aurora&lt;br /&gt;
Graft the mc commit and bring up the editor to edit the commit message, adding &amp;quot;a=foo&amp;quot; as needed:&lt;br /&gt;
* hg graft --edit -r &amp;lt;revision&amp;gt;&lt;br /&gt;
Repeat the previous step as needed for all uplifts as needed.&lt;br /&gt;
Verify the outgoing changes and push:&lt;br /&gt;
* hg out -r . aurora&lt;br /&gt;
* hg push -r . aurora&lt;br /&gt;
&lt;br /&gt;
You can graft a range of commits at once if that&#039;s easier:&lt;br /&gt;
* hg graft -r &amp;lt;toprevision&amp;gt;::&amp;lt;bottomrevision&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Read the documentation for [https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/unifiedrepo.html#uplifting-backporting-commits graft] for further help.&lt;br /&gt;
&lt;br /&gt;
== Backouts ==&lt;br /&gt;
Better tools are coming:&lt;br /&gt;
* https://bugzilla.mozilla.org/show_bug.cgi?id=1117632&lt;br /&gt;
* https://bugzilla.mozilla.org/show_bug.cgi?id=1121211&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The standard backout command makes backing out revisions more difficult than it should, as it won&#039;t pre-fill the backout commit message with a bug number:&lt;br /&gt;
* Copy backout &amp;lt;revision&amp;gt; from treeherder, note the bug &amp;lt;number&amp;gt;, and remember the &amp;lt;reason&amp;gt;&lt;br /&gt;
* hg backout -r &amp;lt;revision&amp;gt;&lt;br /&gt;
** This should open up your editor with a completely empty commit message. Type in the backout message like &amp;quot;Backout revision &amp;lt;revision&amp;gt; (bug &amp;lt;number&amp;gt;) for &amp;lt;reason&amp;gt;&amp;quot; (possibly with &amp;quot;CLOSED TREE&amp;quot; in there to get around a closure hook).&lt;br /&gt;
* hg push -r . &amp;lt;tree&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://hg.mozilla.org/hgcustom/version-control-tools/file/4e7ab9638cf0/hgext/qbackout qbackout] can still be used, though you will want to use `hg oops` in place of `hg qbackout` (eg if you use `hg share` to get multiple working directories, qbackout and other uses of mq do not play nice with shared repos):&lt;br /&gt;
* Copy the backout &amp;lt;revision&amp;gt; from treeherder&lt;br /&gt;
* hg oops -e -r &amp;lt;revision&amp;gt;&lt;br /&gt;
** This should open up your editor with a prepopulated commit message like &amp;quot;Backed out &amp;lt;revision&amp;gt; (bug &amp;lt;number&amp;gt;)&amp;quot;. Add in the &amp;lt;reason&amp;gt; and possibly &amp;quot;CLOSED TREE&amp;quot; to get around a closure hook.&lt;br /&gt;
* hg out -r . &amp;lt;tree&amp;gt;&lt;br /&gt;
** to double-check what you will be pushing&lt;br /&gt;
* hg push -r . &amp;lt;tree&amp;gt;&lt;br /&gt;
&lt;br /&gt;
qbackout can also back out a range of commits in a single backout commit:&lt;br /&gt;
* hg oops -e -s -r &amp;lt;toprevision&amp;gt;:&amp;lt;bottomrevision&amp;gt;&lt;br /&gt;
** This will open your editor with a prepopulated commit message like &amp;quot;Backed out &amp;lt;toprevision&amp;gt;,&amp;lt;anymiddlerevisions&amp;gt;,&amp;lt;bottomrevision&amp;gt; (bug &amp;lt;number&amp;gt;,any other bug &amp;lt;numbers&amp;gt;)&amp;quot;. Add in the &amp;lt;reason&amp;gt; and possibly &amp;quot;CLOSED TREE&amp;quot; to get around a closure hook.&lt;br /&gt;
* hg push -r . &amp;lt;tree&amp;gt;&lt;br /&gt;
(Omit oops&#039;s -s flag to back out each individual revision in the range as a separate commit.)&lt;br /&gt;
&lt;br /&gt;
=== Revert a backout ===&lt;br /&gt;
* `hg graft`, see https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/common.html#revive-a-commit-that-was-backed-out&lt;br /&gt;
&lt;br /&gt;
== Rebasing after losing a push race ==&lt;br /&gt;
This assumes you have commits you&#039;re attempting to push to mozilla-inbound when you lose a push race with someone. Change `inbound` to the correct branch name as needed.&lt;br /&gt;
&lt;br /&gt;
* hg pull inbound &lt;br /&gt;
* hg rebase -d inbound &lt;br /&gt;
* hg push -r . inbound&lt;br /&gt;
&lt;br /&gt;
== Recovering from mistakes ==&lt;br /&gt;
&amp;lt;big&amp;gt;WARNING:&amp;lt;/big&amp;gt; This will strip out any commits that haven&#039;t been pushed to the remote repositories, regardless of what branch/label/tag those commits are on. (So if you have local changes on inbound and run this command to strip something bad on autoland, both inbound and autoland will be stripped.) Only do this if you don&#039;t care about any of those commits!&lt;br /&gt;
* hg strip &#039;not public()&#039;&lt;br /&gt;
&lt;br /&gt;
You may also need to use some combination of the following to get things back to a known-good state:&lt;br /&gt;
* hg purge # http://mercurial.selenic.com/wiki/PurgeExtension&lt;br /&gt;
* hg up -C&lt;br /&gt;
&lt;br /&gt;
== See what you&#039;re about to push ==&lt;br /&gt;
`hg out` without any flags added will show you a LOT of unrelated commits. To see just what you&#039;ll be pushing to a given branch, use `hg out -r . &amp;lt;branch&amp;gt;`&lt;br /&gt;
* hg out -r . inbound&lt;br /&gt;
** This will only display the things you&#039;re about to push to the inbound branch&lt;br /&gt;
&lt;br /&gt;
== View incoming changes ==&lt;br /&gt;
Since your unified repo will likely have all changesets from the various branches pulled locally, `hg in &amp;lt;somebranch&amp;gt; -r &amp;lt;somerev&amp;gt;` will likely not help you see what would be pulled into your current branch from &amp;lt;somebranch&amp;gt; up to that &amp;lt;somerev&amp;gt;.&lt;br /&gt;
Instead, you can use the following to print out the equivalent. Say you want to see what would be merged onto mozilla-central from b2g-inbound&#039;s revision ca142ec8ba0f:&lt;br /&gt;
&lt;br /&gt;
Make sure m-c is fully up to date:&lt;br /&gt;
* hg pull central &lt;br /&gt;
* hg up central &lt;br /&gt;
Get all of b2g-inbound&#039;s changesets:&lt;br /&gt;
* hg pull b2ginbound&lt;br /&gt;
Do a preview of the merge without actually performing the merge:&lt;br /&gt;
* hg merge -r ca142ec8ba0f -P&lt;br /&gt;
This will print out everything on b2g-inbound (up to and including revision ca142ec8ba0f) that is not already on mozilla-central.&lt;br /&gt;
&lt;br /&gt;
== See the log for a particular branch ==&lt;br /&gt;
* hg log -fr [branch]&lt;br /&gt;
&lt;br /&gt;
= Extras =&lt;br /&gt;
== hg aliases ==&lt;br /&gt;
=== mergetocentral/mergetointegration ===&lt;br /&gt;
I set up the following aliases in my global .hgrc file to make merging things around trunk a little faster:&lt;br /&gt;
 [alias]&lt;br /&gt;
 # merge tree $1, revision $2 to central, optionally appending $3 (for &amp;quot;CLOSED TREE&amp;quot;, etc)&lt;br /&gt;
 mergetocentral = !$HG pull central ; $HG up central ; $HG pull $1 ; $HG merge $2 ; $HG commit -m &amp;quot;Merge $1 to central, a=merge $3&amp;quot; ; $HG push -r . central&lt;br /&gt;
 # merge central tip to tree $1, optionally appending $2 (for &amp;quot;CLOSED TREE&amp;quot;, etc)&lt;br /&gt;
 mergetointegration = !$HG pull central ; $HG pull $1 ; $HG up $1 ; $HG merge central ; $HG commit -m &amp;quot;Merge m-c to $1, a=merge $2&amp;quot; ; $HG push -r . $1&lt;br /&gt;
&lt;br /&gt;
With these set up, I can merge autoland&#039;s revision 04a3d9130aa0 over to mozilla-central with the following command:&lt;br /&gt;
 hg mergetocentral autoland 04a3d9130aa0&lt;br /&gt;
and then I can merge mozilla-central&#039;s tip back to autoland with the following command:&lt;br /&gt;
 hg mergetointegration autoland&lt;br /&gt;
This cuts down on a lot of repetitive typing, saving a bit of time.&lt;br /&gt;
&lt;br /&gt;
=== rbimport ===&lt;br /&gt;
For merging from reviewboard patches, there&#039;s this alias&lt;br /&gt;
  rbimport = !hg transplant -e -s https://reviewboard-hg.mozilla.org/gecko -b $1&lt;br /&gt;
&lt;br /&gt;
Then, it&#039;s matter of importing the right hash like the following command:&lt;br /&gt;
  hg rbimport dd1462ba321db983061b94e30cee92b6bd81e908&lt;/div&gt;</summary>
		<author><name>KWierso</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Unified_Repos&amp;diff=1177552</id>
		<title>Sheriffing/How To/Unified Repos</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Unified_Repos&amp;diff=1177552"/>
		<updated>2017-08-08T01:08:59Z</updated>

		<summary type="html">&lt;p&gt;KWierso: Drop references to fx-team&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Sheriffing How To|Unified repos}}&lt;br /&gt;
= Unified Repos =&lt;br /&gt;
* http://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/unifiedrepo.html&lt;br /&gt;
* https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/firefoxtree.html&lt;br /&gt;
&lt;br /&gt;
== Setting up the repo ==&lt;br /&gt;
* Set up your ssh key yourself&lt;br /&gt;
* Install [https://www.mercurial-scm.org/downloads Mercurial 4.2] or higher&lt;br /&gt;
* Make a copy of your .hgrc file for safekeeping and delete the original&lt;br /&gt;
* hg clone https://hg.mozilla.org/mozilla-central&lt;br /&gt;
* cd mozilla-central&lt;br /&gt;
* ./mach mercurial-setup&lt;br /&gt;
&lt;br /&gt;
Configure mercurial as desired. At a minimum, you need the following:&lt;br /&gt;
* Set your username and email.&lt;br /&gt;
* Enable the firefoxtree extension.&lt;br /&gt;
* Enable the histedit extension.&lt;br /&gt;
&lt;br /&gt;
The following will pull all (or at least most) of the branches sheriffs need to have on hand:&lt;br /&gt;
* hg pull inbound &amp;amp;&amp;amp; hg pull autoland &amp;amp;&amp;amp; hg pull beta &amp;amp;&amp;amp; hg pull release &amp;amp;&amp;amp; hg pull esr52&lt;br /&gt;
If you need other branches, you can find their names in the [https://hg.mozilla.org/hgcustom/version-control-tools/file/default/pylib/mozautomation/mozautomation/repository.py firefoxtree extension source].&lt;br /&gt;
&lt;br /&gt;
You should now have everything set up for proper use! &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want, you can rename the mozilla-central folder to something like &amp;quot;unified&amp;quot;, since it is more than just mozilla-central at this point.&lt;br /&gt;
&lt;br /&gt;
The `hg fxheads` command should list references to each of the relevant branch names, and the current revision and commit message for each.&lt;br /&gt;
&lt;br /&gt;
To pull in newly landed changes, you can use one of the following commands:&lt;br /&gt;
* hg pull fxtrees # this will pull from all branches listed with the fxheads command&lt;br /&gt;
* hg pull integration # this will pull from the mozilla-inbound and autoland branches&lt;br /&gt;
* hg pull releases # this will pull from pretty much every release branch (FYI: including old, unused branches)&lt;br /&gt;
&lt;br /&gt;
== Merges ==&lt;br /&gt;
This assumes you have your unified repo all set up so that `hg fxheads` lists each of central, autoland, and inbound.&lt;br /&gt;
&lt;br /&gt;
To merge a specific non-tip &amp;lt;revision&amp;gt; from mozilla-inbound to mozilla-central:&lt;br /&gt;
# hg pull central&lt;br /&gt;
# hg pull inbound&lt;br /&gt;
# hg up central&lt;br /&gt;
# hg merge -r &amp;lt;revision&amp;gt;&lt;br /&gt;
# hg commit -m &amp;quot;Merge mozilla-inbound to mozilla-central a=merge&amp;quot;&lt;br /&gt;
# hg push -r . central&lt;br /&gt;
&lt;br /&gt;
To merge mozilla-central into mozilla-inbound:&lt;br /&gt;
# hg pull central&lt;br /&gt;
# hg pull inbound&lt;br /&gt;
# hg up inbound&lt;br /&gt;
# hg merge central&lt;br /&gt;
# hg commit -m &amp;quot;Merge mozilla-central to mozilla-inbound a=merge&amp;quot;&lt;br /&gt;
# hg push -r . inbound&lt;br /&gt;
&lt;br /&gt;
* If the `hg merge central` command results in &amp;quot;abort: nothing to merge&amp;quot;, you should instead use `hg update -r &amp;lt;mozilla-central&#039;s tip revision&amp;gt;` to do a non-merging update, then you can do `hg push -r . inbound` to push it as usual.&lt;br /&gt;
&lt;br /&gt;
== Checkin-neededs ==&lt;br /&gt;
This assumes we&#039;re checking things in to autoland. Replace autoland with another branch name as needed.&lt;br /&gt;
&lt;br /&gt;
==== Single repository and single set of patches ====&lt;br /&gt;
Update autoland and prepare for the patches:&lt;br /&gt;
* hg pull autoland&lt;br /&gt;
* hg up autoland&lt;br /&gt;
* hg bookmark autoland-checkins&lt;br /&gt;
Import the patches:&lt;br /&gt;
* hg import https://link.to/correct/checkin-needed.patch&lt;br /&gt;
* Repeat ^ as needed for all autoland checkin-needed patches&lt;br /&gt;
Verify your outgoing changes:&lt;br /&gt;
* hg out -r . autoland&lt;br /&gt;
If you haven&#039;t lost a push race:&lt;br /&gt;
* hg push -r . autoland&lt;br /&gt;
If you lost a push race:&lt;br /&gt;
* hg pull autoland&lt;br /&gt;
* hg rebase -d autoland&lt;br /&gt;
* hg push -r . autoland&lt;br /&gt;
Delete your no longer needed bookmark:&lt;br /&gt;
* hg bookmark -d autoland-checkins&lt;br /&gt;
&lt;br /&gt;
==== Multiple repositories with a single set of patches each ====&lt;br /&gt;
You can set up multiple sets of patches at once against multiple repositories:&lt;br /&gt;
Update autoland&lt;br /&gt;
* hg pull autoland &amp;amp;&amp;amp; hg up autoland&lt;br /&gt;
Create a bookmark to base your autoland checkin-needed patches&lt;br /&gt;
* hg bookmark autoland-checkins&lt;br /&gt;
Import a bunch of patches against autoland&lt;br /&gt;
* hg import &amp;lt;patch1&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch2&amp;gt;&lt;br /&gt;
Update inbound and make a bookmark for inbound patches&lt;br /&gt;
* hg pull inbound &amp;amp;&amp;amp; hg up inbound &amp;amp;&amp;amp; hg bookmark inbound-checkins&lt;br /&gt;
Import some patches against inbound&lt;br /&gt;
* hg import &amp;lt;patch3&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch4&amp;gt;&lt;br /&gt;
See what you&#039;d be pushing to inbound and push it&lt;br /&gt;
* hg out -r . inbound # this will only show patch3 and patch4&lt;br /&gt;
* hg push -r . inbound # this only pushes patch3 and patch4&lt;br /&gt;
* hg bookmark -d inbound-checkins # delete inbound&#039;s checkin bookmark as it&#039;s not needed&lt;br /&gt;
Go back to your autoland checkins and add another patch to the bookmark, then push it&lt;br /&gt;
* hg up autoland-checkins&lt;br /&gt;
* hg import &amp;lt;patch5&amp;gt;&lt;br /&gt;
* hg out -r . autoland # this will be patch1, patch2, and patch5&lt;br /&gt;
* hg push -r . autoland&lt;br /&gt;
* hg bookmark -d autoland-checkins&lt;br /&gt;
&lt;br /&gt;
==== Single repository with multiple sets of patches ====&lt;br /&gt;
Or have multiple sets of patches against a single repository:&lt;br /&gt;
Update autoland&lt;br /&gt;
* hg pull autoland &amp;amp;&amp;amp; hg up autoland&lt;br /&gt;
Make the first bookmark/set&lt;br /&gt;
* hg bookmark autoland-checkins-1&lt;br /&gt;
* hg import &amp;lt;patch1&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch2&amp;gt;&lt;br /&gt;
Make the second set&lt;br /&gt;
* hg up autoland &amp;amp;&amp;amp; hg bookmark autoland-checkins-2&lt;br /&gt;
* hg import &amp;lt;patch3&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch4&amp;gt;&lt;br /&gt;
See what&#039;s going to be pushed in each&lt;br /&gt;
* hg out -r . autoland # patch3 and patch4&lt;br /&gt;
* hg up autoland-checkins-1 &amp;amp;&amp;amp; hg out -r . autoland # patch1 and patch2&lt;br /&gt;
Push the first set&lt;br /&gt;
* hg push -r . autoland # pushes patch1 and patch2&lt;br /&gt;
Get ready to push the second set&lt;br /&gt;
* hg up autoland-checkins-2&lt;br /&gt;
* hg rebase -d autoland # Rebase the second set onto the now-pushed first set&lt;br /&gt;
And push it&lt;br /&gt;
* hg push -r . autoland # pushes patch3 and patch4&lt;br /&gt;
Delete the now-unneeded bookmarks&lt;br /&gt;
* hg bookmark -d autoland-checkins-1&lt;br /&gt;
* hg bookmark -d autoland-checkins-2&lt;br /&gt;
&lt;br /&gt;
== Uplifts ==&lt;br /&gt;
If branch-specific patches are posted, follow the checkin-needed instructions above, importing the patches onto the release branch.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re uplifting directly from an m-c checkin to aurora:&lt;br /&gt;
&lt;br /&gt;
Pull and update to prepare for the uplifts:&lt;br /&gt;
* hg pull central&lt;br /&gt;
* hg pull aurora&lt;br /&gt;
* hg up aurora&lt;br /&gt;
Graft the mc commit and bring up the editor to edit the commit message, adding &amp;quot;a=foo&amp;quot; as needed:&lt;br /&gt;
* hg graft --edit -r &amp;lt;revision&amp;gt;&lt;br /&gt;
Repeat the previous step as needed for all uplifts as needed.&lt;br /&gt;
Verify the outgoing changes and push:&lt;br /&gt;
* hg out -r . aurora&lt;br /&gt;
* hg push -r . aurora&lt;br /&gt;
&lt;br /&gt;
You can graft a range of commits at once if that&#039;s easier:&lt;br /&gt;
* hg graft -r &amp;lt;toprevision&amp;gt;::&amp;lt;bottomrevision&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Read the documentation for [https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/unifiedrepo.html#uplifting-backporting-commits graft] for further help.&lt;br /&gt;
&lt;br /&gt;
== Backouts ==&lt;br /&gt;
Better tools are coming:&lt;br /&gt;
* https://bugzilla.mozilla.org/show_bug.cgi?id=1117632&lt;br /&gt;
* https://bugzilla.mozilla.org/show_bug.cgi?id=1121211&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The standard backout command makes backing out revisions more difficult than it should, as it won&#039;t pre-fill the backout commit message with a bug number:&lt;br /&gt;
* Copy backout &amp;lt;revision&amp;gt; from treeherder, note the bug &amp;lt;number&amp;gt;, and remember the &amp;lt;reason&amp;gt;&lt;br /&gt;
* hg backout -r &amp;lt;revision&amp;gt;&lt;br /&gt;
** This should open up your editor with a completely empty commit message. Type in the backout message like &amp;quot;Backout revision &amp;lt;revision&amp;gt; (bug &amp;lt;number&amp;gt;) for &amp;lt;reason&amp;gt;&amp;quot; (possibly with &amp;quot;CLOSED TREE&amp;quot; in there to get around a closure hook).&lt;br /&gt;
* hg push -r . &amp;lt;tree&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://hg.mozilla.org/hgcustom/version-control-tools/file/4e7ab9638cf0/hgext/qbackout qbackout] can still be used, though you will want to use `hg oops` in place of `hg qbackout` (eg if you use `hg share` to get multiple working directories, qbackout and other uses of mq do not play nice with shared repos):&lt;br /&gt;
* Copy the backout &amp;lt;revision&amp;gt; from treeherder&lt;br /&gt;
* hg oops -e -r &amp;lt;revision&amp;gt;&lt;br /&gt;
** This should open up your editor with a prepopulated commit message like &amp;quot;Backed out &amp;lt;revision&amp;gt; (bug &amp;lt;number&amp;gt;)&amp;quot;. Add in the &amp;lt;reason&amp;gt; and possibly &amp;quot;CLOSED TREE&amp;quot; to get around a closure hook.&lt;br /&gt;
* hg out -r . &amp;lt;tree&amp;gt;&lt;br /&gt;
** to double-check what you will be pushing&lt;br /&gt;
* hg push -r . &amp;lt;tree&amp;gt;&lt;br /&gt;
&lt;br /&gt;
qbackout can also back out a range of commits in a single backout commit:&lt;br /&gt;
* hg oops -e -s -r &amp;lt;toprevision&amp;gt;:&amp;lt;bottomrevision&amp;gt;&lt;br /&gt;
** This will open your editor with a prepopulated commit message like &amp;quot;Backed out &amp;lt;toprevision&amp;gt;,&amp;lt;anymiddlerevisions&amp;gt;,&amp;lt;bottomrevision&amp;gt; (bug &amp;lt;number&amp;gt;,any other bug &amp;lt;numbers&amp;gt;)&amp;quot;. Add in the &amp;lt;reason&amp;gt; and possibly &amp;quot;CLOSED TREE&amp;quot; to get around a closure hook.&lt;br /&gt;
* hg push -r . &amp;lt;tree&amp;gt;&lt;br /&gt;
(Omit oops&#039;s -s flag to back out each individual revision in the range as a separate commit.)&lt;br /&gt;
&lt;br /&gt;
=== Revert a backout ===&lt;br /&gt;
* `hg graft`, see https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/common.html#revive-a-commit-that-was-backed-out&lt;br /&gt;
&lt;br /&gt;
== Rebasing after losing a push race ==&lt;br /&gt;
This assumes you have commits you&#039;re attempting to push to mozilla-inbound when you lose a push race with someone. Change `inbound` to the correct branch name as needed.&lt;br /&gt;
&lt;br /&gt;
* hg pull inbound &lt;br /&gt;
* hg rebase -d inbound &lt;br /&gt;
* hg push -r . inbound&lt;br /&gt;
&lt;br /&gt;
== Recovering from mistakes ==&lt;br /&gt;
&amp;lt;big&amp;gt;WARNING:&amp;lt;/big&amp;gt; This will strip out any commits that haven&#039;t been pushed to the remote repositories, regardless of what branch/label/tag those commits are on. (So if you have local changes on inbound and run this command to strip something bad on autoland, both inbound and autoland will be stripped.) Only do this if you don&#039;t care about any of those commits!&lt;br /&gt;
* hg strip &#039;not public()&#039;&lt;br /&gt;
&lt;br /&gt;
You may also need to use some combination of the following to get things back to a known-good state:&lt;br /&gt;
* hg purge # http://mercurial.selenic.com/wiki/PurgeExtension&lt;br /&gt;
* hg up -C&lt;br /&gt;
&lt;br /&gt;
== See what you&#039;re about to push ==&lt;br /&gt;
`hg out` without any flags added will show you a LOT of unrelated commits. To see just what you&#039;ll be pushing to a given branch, use `hg out -r . &amp;lt;branch&amp;gt;`&lt;br /&gt;
* hg out -r . inbound&lt;br /&gt;
** This will only display the things you&#039;re about to push to the inbound branch&lt;br /&gt;
&lt;br /&gt;
== View incoming changes ==&lt;br /&gt;
Since your unified repo will likely have all changesets from the various branches pulled locally, `hg in &amp;lt;somebranch&amp;gt; -r &amp;lt;somerev&amp;gt;` will likely not help you see what would be pulled into your current branch from &amp;lt;somebranch&amp;gt; up to that &amp;lt;somerev&amp;gt;.&lt;br /&gt;
Instead, you can use the following to print out the equivalent. Say you want to see what would be merged onto mozilla-central from b2g-inbound&#039;s revision ca142ec8ba0f:&lt;br /&gt;
&lt;br /&gt;
Make sure m-c is fully up to date:&lt;br /&gt;
* hg pull central &lt;br /&gt;
* hg up central &lt;br /&gt;
Get all of b2g-inbound&#039;s changesets:&lt;br /&gt;
* hg pull b2ginbound&lt;br /&gt;
Do a preview of the merge without actually performing the merge:&lt;br /&gt;
* hg merge -r ca142ec8ba0f -P&lt;br /&gt;
This will print out everything on b2g-inbound (up to and including revision ca142ec8ba0f) that is not already on mozilla-central.&lt;br /&gt;
&lt;br /&gt;
== See the log for a particular branch ==&lt;br /&gt;
* hg log -fr [branch]&lt;br /&gt;
&lt;br /&gt;
= Extras =&lt;br /&gt;
== hg aliases ==&lt;br /&gt;
=== mergetocentral/mergetointegration ===&lt;br /&gt;
I set up the following aliases in my global .hgrc file to make merging things around trunk a little faster:&lt;br /&gt;
 [alias]&lt;br /&gt;
 # merge tree $1, revision $2 to central, optionally appending $3 (for &amp;quot;CLOSED TREE&amp;quot;, etc)&lt;br /&gt;
 mergetocentral = !$HG pull central ; $HG up central ; $HG pull $1 ; $HG merge $2 ; $HG commit -m &amp;quot;Merge $1 to central, a=merge $3&amp;quot; ; $HG push -r . central&lt;br /&gt;
 # merge central tip to tree $1, optionally appending $2 (for &amp;quot;CLOSED TREE&amp;quot;, etc)&lt;br /&gt;
 mergetointegration = !$HG pull central ; $HG pull $1 ; $HG up $1 ; $HG merge central ; $HG commit -m &amp;quot;Merge m-c to $1, a=merge $2&amp;quot; ; $HG push -r . $1&lt;br /&gt;
&lt;br /&gt;
With these set up, I can merge fx-team&#039;s revision 04a3d9130aa0 over to mozilla-central with the following command:&lt;br /&gt;
 hg mergetocentral fx-team 04a3d9130aa0&lt;br /&gt;
and then I can merge mozilla-central&#039;s tip back to fx-team with the following command:&lt;br /&gt;
 hg mergetointegration fx-team&lt;br /&gt;
This cuts down on a lot of repetitive typing, saving a bit of time.&lt;br /&gt;
&lt;br /&gt;
=== rbimport ===&lt;br /&gt;
For merging from reviewboard patches, there&#039;s this alias&lt;br /&gt;
  rbimport = !hg transplant -e -s https://reviewboard-hg.mozilla.org/gecko -b $1&lt;br /&gt;
&lt;br /&gt;
Then, it&#039;s matter of importing the right hash like the following command:&lt;br /&gt;
  hg rbimport dd1462ba321db983061b94e30cee92b6bd81e908&lt;/div&gt;</summary>
		<author><name>KWierso</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Unified_Repos&amp;diff=1177551</id>
		<title>Sheriffing/How To/Unified Repos</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Unified_Repos&amp;diff=1177551"/>
		<updated>2017-08-08T01:08:01Z</updated>

		<summary type="html">&lt;p&gt;KWierso: Drop references to fx-team&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Sheriffing How To|Unified repos}}&lt;br /&gt;
= Unified Repos =&lt;br /&gt;
* http://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/unifiedrepo.html&lt;br /&gt;
* https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/firefoxtree.html&lt;br /&gt;
&lt;br /&gt;
== Setting up the repo ==&lt;br /&gt;
* Set up your ssh key yourself&lt;br /&gt;
* Install [https://www.mercurial-scm.org/downloads Mercurial 4.2] or higher&lt;br /&gt;
* Make a copy of your .hgrc file for safekeeping and delete the original&lt;br /&gt;
* hg clone https://hg.mozilla.org/mozilla-central&lt;br /&gt;
* cd mozilla-central&lt;br /&gt;
* ./mach mercurial-setup&lt;br /&gt;
&lt;br /&gt;
Configure mercurial as desired. At a minimum, you need the following:&lt;br /&gt;
* Set your username and email.&lt;br /&gt;
* Enable the firefoxtree extension.&lt;br /&gt;
* Enable the histedit extension.&lt;br /&gt;
&lt;br /&gt;
The following will pull all (or at least most) of the branches sheriffs need to have on hand:&lt;br /&gt;
* hg pull inbound &amp;amp;&amp;amp; hg pull autoland &amp;amp;&amp;amp; hg pull beta &amp;amp;&amp;amp; hg pull release &amp;amp;&amp;amp; hg pull esr52&lt;br /&gt;
If you need other branches, you can find their names in the [https://hg.mozilla.org/hgcustom/version-control-tools/file/default/pylib/mozautomation/mozautomation/repository.py firefoxtree extension source].&lt;br /&gt;
&lt;br /&gt;
You should now have everything set up for proper use! &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want, you can rename the mozilla-central folder to something like &amp;quot;unified&amp;quot;, since it is more than just mozilla-central at this point.&lt;br /&gt;
&lt;br /&gt;
The `hg fxheads` command should list references to each of the relevant branch names, and the current revision and commit message for each.&lt;br /&gt;
&lt;br /&gt;
To pull in newly landed changes, you can use one of the following commands:&lt;br /&gt;
* hg pull fxtrees # this will pull from all branches listed with the fxheads command&lt;br /&gt;
* hg pull integration # this will pull from the mozilla-inbound and autoland branches&lt;br /&gt;
* hg pull releases # this will pull from pretty much every release branch (FYI: including old, unused branches)&lt;br /&gt;
&lt;br /&gt;
== Merges ==&lt;br /&gt;
This assumes you have your unified repo all set up so that `hg fxheads` lists each of central, autoland, and inbound.&lt;br /&gt;
&lt;br /&gt;
To merge a specific non-tip &amp;lt;revision&amp;gt; from mozilla-inbound to mozilla-central:&lt;br /&gt;
# hg pull central&lt;br /&gt;
# hg pull inbound&lt;br /&gt;
# hg up central&lt;br /&gt;
# hg merge -r &amp;lt;revision&amp;gt;&lt;br /&gt;
# hg commit -m &amp;quot;Merge mozilla-inbound to mozilla-central a=merge&amp;quot;&lt;br /&gt;
# hg push -r . central&lt;br /&gt;
&lt;br /&gt;
To merge mozilla-central into mozilla-inbound:&lt;br /&gt;
# hg pull central&lt;br /&gt;
# hg pull inbound&lt;br /&gt;
# hg up inbound&lt;br /&gt;
# hg merge central&lt;br /&gt;
# hg commit -m &amp;quot;Merge mozilla-central to mozilla-inbound a=merge&amp;quot;&lt;br /&gt;
# hg push -r . inbound&lt;br /&gt;
&lt;br /&gt;
* If the `hg merge central` command results in &amp;quot;abort: nothing to merge&amp;quot;, you should instead use `hg update -r &amp;lt;mozilla-central&#039;s tip revision&amp;gt;` to do a non-merging update, then you can do `hg push -r . inbound` to push it as usual.&lt;br /&gt;
&lt;br /&gt;
== Checkin-neededs ==&lt;br /&gt;
This assumes we&#039;re checking things in to autoland. Replace autoland with another branch name as needed.&lt;br /&gt;
&lt;br /&gt;
==== Single repository and single set of patches ====&lt;br /&gt;
Update autoland and prepare for the patches:&lt;br /&gt;
* hg pull autoland&lt;br /&gt;
* hg up autoland&lt;br /&gt;
* hg bookmark autoland-checkins&lt;br /&gt;
Import the patches:&lt;br /&gt;
* hg import https://link.to/correct/checkin-needed.patch&lt;br /&gt;
* Repeat ^ as needed for all autoland checkin-needed patches&lt;br /&gt;
Verify your outgoing changes:&lt;br /&gt;
* hg out -r . autoland&lt;br /&gt;
If you haven&#039;t lost a push race:&lt;br /&gt;
* hg push -r . autoland&lt;br /&gt;
If you lost a push race:&lt;br /&gt;
* hg pull autoland&lt;br /&gt;
* hg rebase -d autoland&lt;br /&gt;
* hg push -r . autoland&lt;br /&gt;
Delete your no longer needed bookmark:&lt;br /&gt;
* hg bookmark -d autoland-checkins&lt;br /&gt;
&lt;br /&gt;
==== Multiple repositories with a single set of patches each ====&lt;br /&gt;
You can set up multiple sets of patches at once against multiple repositories:&lt;br /&gt;
Update autoland&lt;br /&gt;
* hg pull autoland &amp;amp;&amp;amp; hg up autoland&lt;br /&gt;
Create a bookmark to base your autoland checkin-needed patches&lt;br /&gt;
* hg bookmark autoland-checkins&lt;br /&gt;
Import a bunch of patches against autoland&lt;br /&gt;
* hg import &amp;lt;patch1&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch2&amp;gt;&lt;br /&gt;
Update inbound and make a bookmark for inbound patches&lt;br /&gt;
* hg pull inbound &amp;amp;&amp;amp; hg up inbound &amp;amp;&amp;amp; hg bookmark inbound-checkins&lt;br /&gt;
Import some patches against inbound&lt;br /&gt;
* hg import &amp;lt;patch3&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch4&amp;gt;&lt;br /&gt;
See what you&#039;d be pushing to inbound and push it&lt;br /&gt;
* hg out -r . inbound # this will only show patch3 and patch4&lt;br /&gt;
* hg push -r . inbound # this only pushes patch3 and patch4&lt;br /&gt;
* hg bookmark -d inbound-checkins # delete inbound&#039;s checkin bookmark as it&#039;s not needed&lt;br /&gt;
Go back to your autoland checkins and add another patch to the bookmark, then push it&lt;br /&gt;
* hg up autoland-checkins&lt;br /&gt;
* hg import &amp;lt;patch5&amp;gt;&lt;br /&gt;
* hg out -r . autoland # this will be patch1, patch2, and patch5&lt;br /&gt;
* hg push -r . autoland&lt;br /&gt;
* hg bookmark -d autoland-checkins&lt;br /&gt;
&lt;br /&gt;
==== Single repository with multiple sets of patches ====&lt;br /&gt;
Or have multiple sets of patches against a single repository:&lt;br /&gt;
Update autoland&lt;br /&gt;
* hg pull autoland &amp;amp;&amp;amp; hg up autoland&lt;br /&gt;
Make the first bookmark/set&lt;br /&gt;
* hg bookmark autoland-checkins-1&lt;br /&gt;
* hg import &amp;lt;patch1&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch2&amp;gt;&lt;br /&gt;
Make the second set&lt;br /&gt;
* hg up autoland &amp;amp;&amp;amp; hg bookmark autoland-checkins-2&lt;br /&gt;
* hg import &amp;lt;patch3&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch4&amp;gt;&lt;br /&gt;
See what&#039;s going to be pushed in each&lt;br /&gt;
* hg out -r . autoland # patch3 and patch4&lt;br /&gt;
* hg up autoland-checkins-1 &amp;amp;&amp;amp; hg out -r . autoland # patch1 and patch2&lt;br /&gt;
Push the first set&lt;br /&gt;
* hg push -r . autoland # pushes patch1 and patch2&lt;br /&gt;
Get ready to push the second set&lt;br /&gt;
* hg up autoland-checkins-2&lt;br /&gt;
* hg rebase -d autoland # Rebase the second set onto the now-pushed first set&lt;br /&gt;
And push it&lt;br /&gt;
* hg push -r . autoland # pushes patch3 and patch4&lt;br /&gt;
Delete the now-unneeded bookmarks&lt;br /&gt;
* hg bookmark -d autoland-checkins-1&lt;br /&gt;
* hg bookmark -d autoland-checkins-2&lt;br /&gt;
&lt;br /&gt;
== Uplifts ==&lt;br /&gt;
If branch-specific patches are posted, follow the checkin-needed instructions above, importing the patches onto the release branch.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re uplifting directly from an m-c checkin to aurora:&lt;br /&gt;
&lt;br /&gt;
Pull and update to prepare for the uplifts:&lt;br /&gt;
* hg pull central&lt;br /&gt;
* hg pull aurora&lt;br /&gt;
* hg up aurora&lt;br /&gt;
Graft the mc commit and bring up the editor to edit the commit message, adding &amp;quot;a=foo&amp;quot; as needed:&lt;br /&gt;
* hg graft --edit -r &amp;lt;revision&amp;gt;&lt;br /&gt;
Repeat the previous step as needed for all uplifts as needed.&lt;br /&gt;
Verify the outgoing changes and push:&lt;br /&gt;
* hg out -r . aurora&lt;br /&gt;
* hg push -r . aurora&lt;br /&gt;
&lt;br /&gt;
You can graft a range of commits at once if that&#039;s easier:&lt;br /&gt;
* hg graft -r &amp;lt;toprevision&amp;gt;::&amp;lt;bottomrevision&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Read the documentation for [https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/unifiedrepo.html#uplifting-backporting-commits graft] for further help.&lt;br /&gt;
&lt;br /&gt;
== Backouts ==&lt;br /&gt;
Better tools are coming:&lt;br /&gt;
* https://bugzilla.mozilla.org/show_bug.cgi?id=1117632&lt;br /&gt;
* https://bugzilla.mozilla.org/show_bug.cgi?id=1121211&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The standard backout command makes backing out revisions more difficult than it should, as it won&#039;t pre-fill the backout commit message with a bug number:&lt;br /&gt;
* Copy backout &amp;lt;revision&amp;gt; from treeherder, note the bug &amp;lt;number&amp;gt;, and remember the &amp;lt;reason&amp;gt;&lt;br /&gt;
* hg backout -r &amp;lt;revision&amp;gt;&lt;br /&gt;
** This should open up your editor with a completely empty commit message. Type in the backout message like &amp;quot;Backout revision &amp;lt;revision&amp;gt; (bug &amp;lt;number&amp;gt;) for &amp;lt;reason&amp;gt;&amp;quot; (possibly with &amp;quot;CLOSED TREE&amp;quot; in there to get around a closure hook).&lt;br /&gt;
* hg push -r . &amp;lt;tree&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://hg.mozilla.org/hgcustom/version-control-tools/file/4e7ab9638cf0/hgext/qbackout qbackout] can still be used, though you will want to use `hg oops` in place of `hg qbackout` (eg if you use `hg share` to get multiple working directories, qbackout and other uses of mq do not play nice with shared repos):&lt;br /&gt;
* Copy the backout &amp;lt;revision&amp;gt; from treeherder&lt;br /&gt;
* hg oops -e -r &amp;lt;revision&amp;gt;&lt;br /&gt;
** This should open up your editor with a prepopulated commit message like &amp;quot;Backed out &amp;lt;revision&amp;gt; (bug &amp;lt;number&amp;gt;)&amp;quot;. Add in the &amp;lt;reason&amp;gt; and possibly &amp;quot;CLOSED TREE&amp;quot; to get around a closure hook.&lt;br /&gt;
* hg out -r . &amp;lt;tree&amp;gt;&lt;br /&gt;
** to double-check what you will be pushing&lt;br /&gt;
* hg push -r . &amp;lt;tree&amp;gt;&lt;br /&gt;
&lt;br /&gt;
qbackout can also back out a range of commits in a single backout commit:&lt;br /&gt;
* hg oops -e -s -r &amp;lt;toprevision&amp;gt;:&amp;lt;bottomrevision&amp;gt;&lt;br /&gt;
** This will open your editor with a prepopulated commit message like &amp;quot;Backed out &amp;lt;toprevision&amp;gt;,&amp;lt;anymiddlerevisions&amp;gt;,&amp;lt;bottomrevision&amp;gt; (bug &amp;lt;number&amp;gt;,any other bug &amp;lt;numbers&amp;gt;)&amp;quot;. Add in the &amp;lt;reason&amp;gt; and possibly &amp;quot;CLOSED TREE&amp;quot; to get around a closure hook.&lt;br /&gt;
* hg push -r . &amp;lt;tree&amp;gt;&lt;br /&gt;
(Omit oops&#039;s -s flag to back out each individual revision in the range as a separate commit.)&lt;br /&gt;
&lt;br /&gt;
=== Revert a backout ===&lt;br /&gt;
* `hg graft`, see https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/common.html#revive-a-commit-that-was-backed-out&lt;br /&gt;
&lt;br /&gt;
== Rebasing after losing a push race ==&lt;br /&gt;
This assumes you have commits you&#039;re attempting to push to mozilla-inbound when you lose a push race with someone. Change `inbound` to the correct branch name as needed.&lt;br /&gt;
&lt;br /&gt;
* hg pull inbound &lt;br /&gt;
* hg rebase -d inbound &lt;br /&gt;
* hg push -r . inbound&lt;br /&gt;
&lt;br /&gt;
== Recovering from mistakes ==&lt;br /&gt;
&amp;lt;big&amp;gt;WARNING:&amp;lt;/big&amp;gt; This will strip out any commits that haven&#039;t been pushed to the remote repositories, regardless of what branch/label/tag those commits are on. (So if you have local changes on inbound and run this command to strip something bad on fx-team, both inbound and fx-team will be stripped.) Only do this if you don&#039;t care about any of those commits!&lt;br /&gt;
* hg strip &#039;not public()&#039;&lt;br /&gt;
&lt;br /&gt;
You may also need to use some combination of the following to get things back to a known-good state:&lt;br /&gt;
* hg purge # http://mercurial.selenic.com/wiki/PurgeExtension&lt;br /&gt;
* hg up -C&lt;br /&gt;
&lt;br /&gt;
== See what you&#039;re about to push ==&lt;br /&gt;
`hg out` without any flags added will show you a LOT of unrelated commits. To see just what you&#039;ll be pushing to a given branch, use `hg out -r . &amp;lt;branch&amp;gt;`&lt;br /&gt;
* hg out -r . inbound&lt;br /&gt;
** This will only display the things you&#039;re about to push to the inbound branch&lt;br /&gt;
&lt;br /&gt;
== View incoming changes ==&lt;br /&gt;
Since your unified repo will likely have all changesets from the various branches pulled locally, `hg in &amp;lt;somebranch&amp;gt; -r &amp;lt;somerev&amp;gt;` will likely not help you see what would be pulled into your current branch from &amp;lt;somebranch&amp;gt; up to that &amp;lt;somerev&amp;gt;.&lt;br /&gt;
Instead, you can use the following to print out the equivalent. Say you want to see what would be merged onto mozilla-central from b2g-inbound&#039;s revision ca142ec8ba0f:&lt;br /&gt;
&lt;br /&gt;
Make sure m-c is fully up to date:&lt;br /&gt;
* hg pull central &lt;br /&gt;
* hg up central &lt;br /&gt;
Get all of b2g-inbound&#039;s changesets:&lt;br /&gt;
* hg pull b2ginbound&lt;br /&gt;
Do a preview of the merge without actually performing the merge:&lt;br /&gt;
* hg merge -r ca142ec8ba0f -P&lt;br /&gt;
This will print out everything on b2g-inbound (up to and including revision ca142ec8ba0f) that is not already on mozilla-central.&lt;br /&gt;
&lt;br /&gt;
== See the log for a particular branch ==&lt;br /&gt;
* hg log -fr [branch]&lt;br /&gt;
&lt;br /&gt;
= Extras =&lt;br /&gt;
== hg aliases ==&lt;br /&gt;
=== mergetocentral/mergetointegration ===&lt;br /&gt;
I set up the following aliases in my global .hgrc file to make merging things around trunk a little faster:&lt;br /&gt;
 [alias]&lt;br /&gt;
 # merge tree $1, revision $2 to central, optionally appending $3 (for &amp;quot;CLOSED TREE&amp;quot;, etc)&lt;br /&gt;
 mergetocentral = !$HG pull central ; $HG up central ; $HG pull $1 ; $HG merge $2 ; $HG commit -m &amp;quot;Merge $1 to central, a=merge $3&amp;quot; ; $HG push -r . central&lt;br /&gt;
 # merge central tip to tree $1, optionally appending $2 (for &amp;quot;CLOSED TREE&amp;quot;, etc)&lt;br /&gt;
 mergetointegration = !$HG pull central ; $HG pull $1 ; $HG up $1 ; $HG merge central ; $HG commit -m &amp;quot;Merge m-c to $1, a=merge $2&amp;quot; ; $HG push -r . $1&lt;br /&gt;
&lt;br /&gt;
With these set up, I can merge fx-team&#039;s revision 04a3d9130aa0 over to mozilla-central with the following command:&lt;br /&gt;
 hg mergetocentral fx-team 04a3d9130aa0&lt;br /&gt;
and then I can merge mozilla-central&#039;s tip back to fx-team with the following command:&lt;br /&gt;
 hg mergetointegration fx-team&lt;br /&gt;
This cuts down on a lot of repetitive typing, saving a bit of time.&lt;br /&gt;
&lt;br /&gt;
=== rbimport ===&lt;br /&gt;
For merging from reviewboard patches, there&#039;s this alias&lt;br /&gt;
  rbimport = !hg transplant -e -s https://reviewboard-hg.mozilla.org/gecko -b $1&lt;br /&gt;
&lt;br /&gt;
Then, it&#039;s matter of importing the right hash like the following command:&lt;br /&gt;
  hg rbimport dd1462ba321db983061b94e30cee92b6bd81e908&lt;/div&gt;</summary>
		<author><name>KWierso</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Unified_Repos&amp;diff=1176528</id>
		<title>Sheriffing/How To/Unified Repos</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Unified_Repos&amp;diff=1176528"/>
		<updated>2017-07-26T07:19:17Z</updated>

		<summary type="html">&lt;p&gt;KWierso: Partial cleanup/update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Unified Repos ==&lt;br /&gt;
* http://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/unifiedrepo.html&lt;br /&gt;
* https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/firefoxtree.html&lt;br /&gt;
&lt;br /&gt;
=== Setting up the repo ===&lt;br /&gt;
* Set up your ssh key yourself&lt;br /&gt;
* Install [https://www.mercurial-scm.org/downloads Mercurial 4.2] or higher&lt;br /&gt;
* Make a copy of your .hgrc file for safekeeping and delete the original&lt;br /&gt;
* hg clone https://hg.mozilla.org/mozilla-central&lt;br /&gt;
* cd mozilla-central&lt;br /&gt;
* ./mach mercurial-setup&lt;br /&gt;
&lt;br /&gt;
Configure mercurial as desired. At a minimum, you need the following:&lt;br /&gt;
* Set your username and email.&lt;br /&gt;
* Enable the firefoxtree extension.&lt;br /&gt;
* Enable the histedit extension.&lt;br /&gt;
&lt;br /&gt;
The following will pull all (or at least most) of the branches sheriffs need to have on hand:&lt;br /&gt;
* hg pull inbound &amp;amp;&amp;amp; hg pull autoland &amp;amp;&amp;amp; hg pull beta &amp;amp;&amp;amp; hg pull release &amp;amp;&amp;amp; hg pull esr52&lt;br /&gt;
If you need other branches, you can find their names in the [https://hg.mozilla.org/hgcustom/version-control-tools/file/default/pylib/mozautomation/mozautomation/repository.py firefoxtree extension source].&lt;br /&gt;
&lt;br /&gt;
You should now have everything set up for proper use! &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want, you can rename the mozilla-central folder to something like &amp;quot;unified&amp;quot;, since it is more than just mozilla-central at this point.&lt;br /&gt;
&lt;br /&gt;
The `hg fxheads` command should list references to each of the relevant branch names, and the current revision and commit message for each.&lt;br /&gt;
&lt;br /&gt;
To pull in newly landed changes, you can use one of the following commands:&lt;br /&gt;
* hg pull fxtrees # this will pull from all branches listed with the fxheads command&lt;br /&gt;
* hg pull integration # this will pull from the mozilla-inbound and autoland branches&lt;br /&gt;
* hg pull releases # this will pull from pretty much every release branch (FYI: including old, unused branches)&lt;br /&gt;
&lt;br /&gt;
=== Merges ===&lt;br /&gt;
This assumes you have your unified repo all set up so that `hg fxheads` lists each of central, autoland, and inbound.&lt;br /&gt;
&lt;br /&gt;
To merge a specific non-tip &amp;lt;revision&amp;gt; from mozilla-inbound to mozilla-central:&lt;br /&gt;
# hg pull central&lt;br /&gt;
# hg pull inbound&lt;br /&gt;
# hg up central&lt;br /&gt;
# hg merge -r &amp;lt;revision&amp;gt;&lt;br /&gt;
# hg commit -m &amp;quot;Merge mozilla-inbound to mozilla-central a=merge&amp;quot;&lt;br /&gt;
# hg push -r . central&lt;br /&gt;
&lt;br /&gt;
To merge mozilla-central into mozilla-inbound:&lt;br /&gt;
# hg pull central&lt;br /&gt;
# hg pull inbound&lt;br /&gt;
# hg up inbound&lt;br /&gt;
# hg merge central&lt;br /&gt;
# hg commit -m &amp;quot;Merge mozilla-central to mozilla-inbound a=merge&amp;quot;&lt;br /&gt;
# hg push -r . inbound&lt;br /&gt;
&lt;br /&gt;
* If the `hg merge central` command results in &amp;quot;abort: nothing to merge&amp;quot;, you should instead use `hg update -r &amp;lt;mozilla-central&#039;s tip revision&amp;gt;` to do a non-merging update, then you can do `hg push -r . inbound` to push it as usual.&lt;br /&gt;
&lt;br /&gt;
=== Checkin-neededs ===&lt;br /&gt;
This assumes we&#039;re checking things in to fx-team. Replace fx-team with another branch name as needed.&lt;br /&gt;
&lt;br /&gt;
===== Single repository and single set of patches =====&lt;br /&gt;
Update fx-team and prepare for the patches:&lt;br /&gt;
* hg pull fx-team&lt;br /&gt;
* hg up fx-team&lt;br /&gt;
* hg bookmark fx-team-checkins&lt;br /&gt;
Import the patches:&lt;br /&gt;
* hg import https://link.to/correct/checkin-needed.patch&lt;br /&gt;
* Repeat ^ as needed for all fx-team checkin-needed patches&lt;br /&gt;
Verify your outgoing changes:&lt;br /&gt;
* hg out -r . fx-team&lt;br /&gt;
If you haven&#039;t lost a push race:&lt;br /&gt;
* hg push -r . fx-team&lt;br /&gt;
If you lost a push race:&lt;br /&gt;
* hg pull fx-team&lt;br /&gt;
* hg rebase -d fx-team&lt;br /&gt;
* hg push -r . fx-team&lt;br /&gt;
Delete your no longer needed bookmark:&lt;br /&gt;
* hg bookmark -d fx-team-checkins&lt;br /&gt;
&lt;br /&gt;
===== Multiple repositories with a single set of patches each =====&lt;br /&gt;
You can set up multiple sets of patches at once against multiple repositories:&lt;br /&gt;
Update fx-team&lt;br /&gt;
* hg pull fx-team &amp;amp;&amp;amp; hg up fx-team&lt;br /&gt;
Create a bookmark to base your fx-team checkin-needed patches&lt;br /&gt;
* hg bookmark fxteam-checkins&lt;br /&gt;
Import a bunch of patches against fx-team&lt;br /&gt;
* hg import &amp;lt;patch1&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch2&amp;gt;&lt;br /&gt;
Update inbound and make a bookmark for inbound patches&lt;br /&gt;
* hg pull inbound &amp;amp;&amp;amp; hg up inbound &amp;amp;&amp;amp; hg bookmark inbound-checkins&lt;br /&gt;
Import some patches against inbound&lt;br /&gt;
* hg import &amp;lt;patch3&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch4&amp;gt;&lt;br /&gt;
See what you&#039;d be pushing to inbound and push it&lt;br /&gt;
* hg out -r . inbound # this will only show patch3 and patch4&lt;br /&gt;
* hg push -r . inbound # this only pushes patch3 and patch4&lt;br /&gt;
* hg bookmark -d inbound-checkins # delete inbound&#039;s checkin bookmark as it&#039;s not needed&lt;br /&gt;
Go back to your fx-team checkins and add another patch to the bookmark, then push it&lt;br /&gt;
* hg up fxteam-checkins&lt;br /&gt;
* hg import &amp;lt;patch5&amp;gt;&lt;br /&gt;
* hg out -r . fx-team # this will be patch1, patch2, and patch5&lt;br /&gt;
* hg push -r . fx-team&lt;br /&gt;
* hg bookmark -d fxteam-checkins&lt;br /&gt;
&lt;br /&gt;
===== Single repository with multiple sets of patches =====&lt;br /&gt;
Or have multiple sets of patches against a single repository:&lt;br /&gt;
Update fx-team&lt;br /&gt;
* hg pull fx-team &amp;amp;&amp;amp; hg up fx-team&lt;br /&gt;
Make the first bookmark/set&lt;br /&gt;
* hg bookmark fxteam-checkins-1&lt;br /&gt;
* hg import &amp;lt;patch1&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch2&amp;gt;&lt;br /&gt;
Make the second set&lt;br /&gt;
* hg up fx-team &amp;amp;&amp;amp; hg bookmark fxteam-checkins-2&lt;br /&gt;
* hg import &amp;lt;patch3&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch4&amp;gt;&lt;br /&gt;
See what&#039;s going to be pushed in each&lt;br /&gt;
* hg out -r . fx-team # patch3 and patch4&lt;br /&gt;
* hg up fxteam-checkins-1 &amp;amp;&amp;amp; hg out -r . fx-team # patch1 and patch2&lt;br /&gt;
Push the first set&lt;br /&gt;
* hg push -r . fx-team # pushes patch1 and patch2&lt;br /&gt;
Get ready to push the second set&lt;br /&gt;
* hg up fxteam-checkins-2&lt;br /&gt;
* hg rebase -d fx-team # Rebase the second set onto the now-pushed first set&lt;br /&gt;
And push it&lt;br /&gt;
* hg push -r . fx-team # pushes patch3 and patch4&lt;br /&gt;
Delete the now-unneeded bookmarks&lt;br /&gt;
* hg bookmark -d fxteam-checkins-1&lt;br /&gt;
* hg bookmark -d fxteam-checkins-2&lt;br /&gt;
&lt;br /&gt;
=== Uplifts ===&lt;br /&gt;
If branch-specific patches are posted, follow the checkin-needed instructions above, importing the patches onto the release branch.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re uplifting directly from an m-c checkin to aurora:&lt;br /&gt;
&lt;br /&gt;
Pull and update to prepare for the uplifts:&lt;br /&gt;
* hg pull central&lt;br /&gt;
* hg pull aurora&lt;br /&gt;
* hg up aurora&lt;br /&gt;
Graft the mc commit and bring up the editor to edit the commit message, adding &amp;quot;a=foo&amp;quot; as needed:&lt;br /&gt;
* hg graft --edit -r &amp;lt;revision&amp;gt;&lt;br /&gt;
Repeat the previous step as needed for all uplifts as needed.&lt;br /&gt;
Verify the outgoing changes and push:&lt;br /&gt;
* hg out -r . aurora&lt;br /&gt;
* hg push -r . aurora&lt;br /&gt;
&lt;br /&gt;
You can graft a range of commits at once if that&#039;s easier:&lt;br /&gt;
* hg graft -r &amp;lt;toprevision&amp;gt;::&amp;lt;bottomrevision&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Read the documentation for [https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/unifiedrepo.html#uplifting-backporting-commits graft] for further help.&lt;br /&gt;
&lt;br /&gt;
=== Backouts ===&lt;br /&gt;
Better tools are coming:&lt;br /&gt;
* https://bugzilla.mozilla.org/show_bug.cgi?id=1117632&lt;br /&gt;
* https://bugzilla.mozilla.org/show_bug.cgi?id=1121211&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The standard backout command makes backing out revisions more difficult than it should, as it won&#039;t pre-fill the backout commit message with a bug number:&lt;br /&gt;
* Copy backout &amp;lt;revision&amp;gt; from treeherder, note the bug &amp;lt;number&amp;gt;, and remember the &amp;lt;reason&amp;gt;&lt;br /&gt;
* hg backout -r &amp;lt;revision&amp;gt;&lt;br /&gt;
** This should open up your editor with a completely empty commit message. Type in the backout message like &amp;quot;Backout revision &amp;lt;revision&amp;gt; (bug &amp;lt;number&amp;gt;) for &amp;lt;reason&amp;gt;&amp;quot; (possibly with &amp;quot;CLOSED TREE&amp;quot; in there to get around a closure hook).&lt;br /&gt;
* hg push -r . &amp;lt;tree&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://hg.mozilla.org/hgcustom/version-control-tools/file/4e7ab9638cf0/hgext/qbackout qbackout] can still be used, though you will want to use `hg oops` in place of `hg qbackout` (eg if you use `hg share` to get multiple working directories, qbackout and other uses of mq do not play nice with shared repos):&lt;br /&gt;
* Copy the backout &amp;lt;revision&amp;gt; from treeherder&lt;br /&gt;
* hg oops -e -r &amp;lt;revision&amp;gt;&lt;br /&gt;
** This should open up your editor with a prepopulated commit message like &amp;quot;Backed out &amp;lt;revision&amp;gt; (bug &amp;lt;number&amp;gt;)&amp;quot;. Add in the &amp;lt;reason&amp;gt; and possibly &amp;quot;CLOSED TREE&amp;quot; to get around a closure hook.&lt;br /&gt;
* hg out -r . &amp;lt;tree&amp;gt;&lt;br /&gt;
** to double-check what you will be pushing&lt;br /&gt;
* hg push -r . &amp;lt;tree&amp;gt;&lt;br /&gt;
&lt;br /&gt;
qbackout can also back out a range of commits in a single backout commit:&lt;br /&gt;
* hg oops -e -s -r &amp;lt;toprevision&amp;gt;:&amp;lt;bottomrevision&amp;gt;&lt;br /&gt;
** This will open your editor with a prepopulated commit message like &amp;quot;Backed out &amp;lt;toprevision&amp;gt;,&amp;lt;anymiddlerevisions&amp;gt;,&amp;lt;bottomrevision&amp;gt; (bug &amp;lt;number&amp;gt;,any other bug &amp;lt;numbers&amp;gt;)&amp;quot;. Add in the &amp;lt;reason&amp;gt; and possibly &amp;quot;CLOSED TREE&amp;quot; to get around a closure hook.&lt;br /&gt;
* hg push -r . &amp;lt;tree&amp;gt;&lt;br /&gt;
(Omit oops&#039;s -s flag to back out each individual revision in the range as a separate commit.)&lt;br /&gt;
&lt;br /&gt;
==== Revert a backout ====&lt;br /&gt;
* `hg graft`, see https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/common.html#revive-a-commit-that-was-backed-out&lt;br /&gt;
&lt;br /&gt;
=== Rebasing after losing a push race ===&lt;br /&gt;
This assumes you have commits you&#039;re attempting to push to mozilla-inbound when you lose a push race with someone. Change `inbound` to the correct branch name as needed.&lt;br /&gt;
&lt;br /&gt;
* hg pull inbound &lt;br /&gt;
* hg rebase -d inbound &lt;br /&gt;
* hg push -r . inbound&lt;br /&gt;
&lt;br /&gt;
=== Recovering from mistakes ===&lt;br /&gt;
&amp;lt;big&amp;gt;WARNING:&amp;lt;/big&amp;gt; This will strip out any commits that haven&#039;t been pushed to the remote repositories, regardless of what branch/label/tag those commits are on. (So if you have local changes on inbound and run this command to strip something bad on fx-team, both inbound and fx-team will be stripped.) Only do this if you don&#039;t care about any of those commits!&lt;br /&gt;
* hg strip &#039;not public()&#039;&lt;br /&gt;
&lt;br /&gt;
You may also need to use some combination of the following to get things back to a known-good state:&lt;br /&gt;
* hg purge # http://mercurial.selenic.com/wiki/PurgeExtension&lt;br /&gt;
* hg up -C&lt;br /&gt;
&lt;br /&gt;
=== See what you&#039;re about to push ===&lt;br /&gt;
`hg out` without any flags added will show you a LOT of unrelated commits. To see just what you&#039;ll be pushing to a given branch, use `hg out -r . &amp;lt;branch&amp;gt;`&lt;br /&gt;
* hg out -r . inbound&lt;br /&gt;
** This will only display the things you&#039;re about to push to the inbound branch&lt;br /&gt;
&lt;br /&gt;
=== View incoming changes ===&lt;br /&gt;
Since your unified repo will likely have all changesets from the various branches pulled locally, `hg in &amp;lt;somebranch&amp;gt; -r &amp;lt;somerev&amp;gt;` will likely not help you see what would be pulled into your current branch from &amp;lt;somebranch&amp;gt; up to that &amp;lt;somerev&amp;gt;.&lt;br /&gt;
Instead, you can use the following to print out the equivalent. Say you want to see what would be merged onto mozilla-central from b2g-inbound&#039;s revision ca142ec8ba0f:&lt;br /&gt;
&lt;br /&gt;
Make sure m-c is fully up to date:&lt;br /&gt;
* hg pull central &lt;br /&gt;
* hg up central &lt;br /&gt;
Get all of b2g-inbound&#039;s changesets:&lt;br /&gt;
* hg pull b2ginbound&lt;br /&gt;
Do a preview of the merge without actually performing the merge:&lt;br /&gt;
* hg merge -r ca142ec8ba0f -P&lt;br /&gt;
This will print out everything on b2g-inbound (up to and including revision ca142ec8ba0f) that is not already on mozilla-central.&lt;br /&gt;
&lt;br /&gt;
=== See the log for a particular branch ===&lt;br /&gt;
* hg log -fr [branch]&lt;br /&gt;
&lt;br /&gt;
= Extras =&lt;br /&gt;
== hg aliases ==&lt;br /&gt;
=== mergetocentral/mergetointegration ===&lt;br /&gt;
I set up the following aliases in my global .hgrc file to make merging things around trunk a little faster:&lt;br /&gt;
 [alias]&lt;br /&gt;
 # merge tree $1, revision $2 to central, optionally appending $3 (for &amp;quot;CLOSED TREE&amp;quot;, etc)&lt;br /&gt;
 mergetocentral = !$HG pull central ; $HG up central ; $HG pull $1 ; $HG merge $2 ; $HG commit -m &amp;quot;Merge $1 to central, a=merge $3&amp;quot; ; $HG push -r . central&lt;br /&gt;
 # merge central tip to tree $1, optionally appending $2 (for &amp;quot;CLOSED TREE&amp;quot;, etc)&lt;br /&gt;
 mergetointegration = !$HG pull central ; $HG pull $1 ; $HG up $1 ; $HG merge central ; $HG commit -m &amp;quot;Merge m-c to $1, a=merge $2&amp;quot; ; $HG push -r . $1&lt;br /&gt;
&lt;br /&gt;
With these set up, I can merge fx-team&#039;s revision 04a3d9130aa0 over to mozilla-central with the following command:&lt;br /&gt;
 hg mergetocentral fx-team 04a3d9130aa0&lt;br /&gt;
and then I can merge mozilla-central&#039;s tip back to fx-team with the following command:&lt;br /&gt;
 hg mergetointegration fx-team&lt;br /&gt;
This cuts down on a lot of repetitive typing, saving a bit of time.&lt;br /&gt;
&lt;br /&gt;
=== rbimport ===&lt;br /&gt;
For merging from reviewboard patches, there&#039;s this alias&lt;br /&gt;
  rbimport = !hg transplant -e -s https://reviewboard-hg.mozilla.org/gecko -b $1&lt;br /&gt;
&lt;br /&gt;
Then, it&#039;s matter of importing the right hash like the following command:&lt;br /&gt;
  hg rbimport dd1462ba321db983061b94e30cee92b6bd81e908&lt;/div&gt;</summary>
		<author><name>KWierso</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Trees&amp;diff=1176319</id>
		<title>Sheriffing/How To/Trees</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Trees&amp;diff=1176319"/>
		<updated>2017-07-23T08:19:43Z</updated>

		<summary type="html">&lt;p&gt;KWierso: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;What trees do sheriffs monitor?&lt;br /&gt;
&lt;br /&gt;
= Regularly =&lt;br /&gt;
* [https://treeherder.mozilla.org/#/jobs?repo=autoland autoland]&lt;br /&gt;
* [https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound mozilla-inbound]&lt;br /&gt;
* [https://treeherder.mozilla.org/#/jobs?repo=mozilla-central mozilla-central]&lt;br /&gt;
&lt;br /&gt;
= As required =&lt;br /&gt;
* [https://treeherder.mozilla.org/#/jobs?repo=mozilla-beta mozilla-beta]&lt;br /&gt;
* [https://treeherder.mozilla.org/#/jobs?repo=mozilla-release mozilla-release]&lt;br /&gt;
* [https://treeherder.mozilla.org/#/jobs?repo=mozilla-esr52 mozilla-esr52]&lt;br /&gt;
&lt;br /&gt;
= By request =&lt;br /&gt;
* [https://treeherder.mozilla.org/#/jobs?repo=date date]&lt;br /&gt;
[[Category:Sheriffing:HowTo]]&lt;/div&gt;</summary>
		<author><name>KWierso</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Trees&amp;diff=1176318</id>
		<title>Sheriffing/How To/Trees</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Trees&amp;diff=1176318"/>
		<updated>2017-07-23T08:19:18Z</updated>

		<summary type="html">&lt;p&gt;KWierso: Add category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;What trees do sheriffs monitor?&lt;br /&gt;
&lt;br /&gt;
= Regularly =&lt;br /&gt;
* [https://treeherder.mozilla.org/#/jobs?repo=autoland autoland]&lt;br /&gt;
* [https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound mozilla-inbound]&lt;br /&gt;
* [https://treeherder.mozilla.org/#/jobs?repo=mozilla-central mozilla-central]&lt;br /&gt;
&lt;br /&gt;
= As required =&lt;br /&gt;
* [https://treeherder.mozilla.org/#/jobs?repo=mozilla-beta mozilla-beta]&lt;br /&gt;
* [https://treeherder.mozilla.org/#/jobs?repo=mozilla-release mozilla-release]&lt;br /&gt;
* [https://treeherder.mozilla.org/#/jobs?repo=mozilla-esr52 mozilla-esr52]&lt;br /&gt;
&lt;br /&gt;
= By request =&lt;br /&gt;
* [https://treeherder.mozilla.org/#/jobs?repo=date date]&lt;br /&gt;
[Category:Sheriffing:HowTo]&lt;/div&gt;</summary>
		<author><name>KWierso</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Category:Sheriffing:HowTo&amp;diff=1176317</id>
		<title>Category:Sheriffing:HowTo</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Category:Sheriffing:HowTo&amp;diff=1176317"/>
		<updated>2017-07-23T08:17:32Z</updated>

		<summary type="html">&lt;p&gt;KWierso: Create page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;List of helpful pages for sheriffing.&lt;/div&gt;</summary>
		<author><name>KWierso</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Treeherder&amp;diff=1176316</id>
		<title>Sheriffing/How To/Treeherder</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Treeherder&amp;diff=1176316"/>
		<updated>2017-07-23T08:14:55Z</updated>

		<summary type="html">&lt;p&gt;KWierso: Categorize page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Sheriffing:HowTo]]&lt;br /&gt;
&lt;br /&gt;
Treeherder is the dashboard used by sheriffs and the rest of Mozilla to see build and test results. When you first open [https://treeherder.mozilla.org Treeherder], there will be a lot of information thrown at you all at once. This document should help explain what to do with it all.&lt;br /&gt;
[[File:Treeherder_intermittent.png|thumbnail|right|Treeherder interface showing an intermittent failure]]&lt;br /&gt;
&lt;br /&gt;
= Common Terms =&lt;br /&gt;
There are a lot of terms used within Mozilla that aren&#039;t necessarily common elsewhere.&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Repo&#039;&#039;&#039; - Shorthand for &#039;repository&#039;, this is where developers push their commits to have them become part of an upcoming version of Firefox. An example of this is the &#039;mozilla-inbound&#039; repository.&lt;br /&gt;
# &#039;&#039;&#039;Tree&#039;&#039;&#039; - Another term for a repository, in reference to the branched nature of development under version control. &#039;Treeherder&#039; is based on this, as a tool to &amp;quot;manage the trees&amp;quot;.&lt;br /&gt;
# &#039;&#039;&#039;Job&#039;&#039;&#039; - The smallest unit of work shown in Treeherder&#039;s main UI. This can be a build job or a test job. Each test job can run many tests within it, but they get reported as a group to Treeherder. Examples of these would be the Windows 8 x64 Debug build job, or a mochitest-browser-chrome-1 test job. &lt;br /&gt;
&lt;br /&gt;
Each push to a repository will run a number of build jobs for various platforms (Linux, MacOS, Windows, Android). Most platforms will make multiple builds in various configurations: OPT (optimized builds that strip out information helpful for debugging failures in favor of making things faster), DEBUG (unoptimized builds that don&#039;t strip out the debugging information), and [https://en.m.wikipedia.org/wiki/Profile-guided_optimization PGO] (the build compiler process runs through the code a few times, taking longer to complete, but speeding up some code paths to make the build run faster than Opt builds). Each of those builds will each be used to run some number of test jobs to verify that the compiled code is running as intended. When either a build or test job runs into trouble, the job is reported as a failure to Treeherder, needing to be classified (also called &#039;starred&#039; at Mozilla. Classifying a job marks the job as classified by adding a star next to the job symbol in Treeherder by the current sheriff on duty (that&#039;s you!).&lt;br /&gt;
&lt;br /&gt;
= The Treeherder UI =&lt;br /&gt;
== Header ==&lt;br /&gt;
At the top of the site&#039;s header section are some menus and buttons that can be useful. The &#039;Infra&#039; menu holds links to a few other Mozilla tools/websites. The &#039;Repos&#039; menu provides links to view other Mozilla source code repositories within Treeherder. The &#039;Filters&#039; menu has tools to filter down the jobs shown within Treeherder on various criteria. The &#039;?&#039; menu has various help pages for Treeherder. The &#039;Login/Register&#039; button lets you log in to Treeherder, allowing you to make changes to/with Treeherder&#039;s tools.&lt;br /&gt;
&lt;br /&gt;
The next row in the site header includes a menu showing the currently selected repository, with information about the state of the repository (closed/open/approval-required). The &#039;Tiers&#039; menu lets you select which [[Sheriffing/Job_Visibility_Policy|tiers]] of jobs are displayed. The &#039;Excluded Jobs&#039; button toggles whether jobs that have been intentionally hidden from view are shown. The &#039;+&#039; or &#039;-&#039; button toggles whether groups of non-failing jobs are collapsed or expanded. The various colored circle buttons toggle the visibility of jobs in various states (red toggles failing jobs, green toggles passing jobs, etc). The textbox at the end is a quick-filter box, you can filter jobs by various properties from it without constructing a more exact filter from the &#039;Filters&#039; menu above. Treeherder displays the count of jobs that are currently &amp;quot;unclassified&amp;quot; in the middle of this row. More on this below.&lt;br /&gt;
&lt;br /&gt;
== Main Section ==&lt;br /&gt;
Below the site header is the main part of Treeherder. This shows the recent commits to the currently selected repository grouped by the [http://mozilla-version-control-tools.readthedocs.io/en/latest/hgmo/pushlog.html pushes] they were landed in.&lt;br /&gt;
&lt;br /&gt;
The left side of each push shows the commit data for each commit in the push (eg, the commit hash, the commit author, and the commit message). This can be just a single commit or the push could contain up to hundreds of commits. Treeherder caps the view at 20 commits for performance reasons. Click the &amp;quot;... and more&amp;quot; links to view the entire push&#039;s contents on hg.mozilla.org.&lt;br /&gt;
&lt;br /&gt;
The right side of each push shows the build and test results for all of the jobs running with this push&#039;s commits. This is where most sheriffing work happens, as it is where job failures are reported, and the job failures need to be classified (also referred to as &#039;starred&#039; in various places).&lt;br /&gt;
&lt;br /&gt;
== Bottom Panel ==&lt;br /&gt;
&lt;br /&gt;
If you select one of the job symbols for a push, a panel at the bottom of the page will open. The panel has a few sections with information about the job. &lt;br /&gt;
&lt;br /&gt;
On the left side of the panel, there are a few buttons that can be clicked to open the log file for the job as well as submit a request for the job to be re-run. Below those buttons is a list of information about the job, like the name of the job, when the job was requested by the build system, when the build system actually started working on the job, and when the job finished being run.&lt;br /&gt;
&lt;br /&gt;
On the right side of the panel are a number tabs with more information about the job. Depending on the state of the job you selected, the tab that gets selected by default will vary. (A green/passing job will default to the &#039;Job Details&#039; tab, a failing job will default to either the &#039;Failure Summary&#039; or &#039;Failure Classification&#039; tabs.) &lt;br /&gt;
&lt;br /&gt;
The &#039;Job Details&#039; tab lists more detailed information from the job, including all of the files created and uploaded as part of the job running (eg, log files, screenshots of certain failures, etc). &lt;br /&gt;
&lt;br /&gt;
The &#039;Failure Summary&#039; and &#039;Failure Classification&#039; tabs show information on a job&#039;s reported failures. They both list the same information, but are used slightly differently. &#039;Failure Summary&#039; handles all failures in a job as a whole, &#039;Failure Classification&#039; can handle each individual failure within a job on its own, and is part of the Autoclassify system. These views will list each failure line, as well as any bugs from Bugzilla that match (or are at least similar in some way) the reported failure. If you&#039;re signed in, you&#039;ll also see extra controls for classifying the failures.&lt;br /&gt;
&lt;br /&gt;
The &#039;Annotations&#039; tab shows any classifications that have already been performed for the job. If you&#039;re signed in, you&#039;ll also see UI for removing classifications, in the case that something was classified incorrectly and you need to correct it.&lt;br /&gt;
&lt;br /&gt;
=== Pinboard ===&lt;br /&gt;
&lt;br /&gt;
The pinboard is an area where you can add one or more jobs and pair those with related bugs or comments/reasons, before you submit the classifications to the database. Typically you&#039;d use this on a single job at a time, but if multiple jobs are broken for the same reason, e.g:&lt;br /&gt;
&lt;br /&gt;
* a patch broke a test completely, and you need to classify the failed jobs against the push that broke/fixed it&lt;br /&gt;
* something in the build infrastructure is broken, causing lots of jobs to fail at once&lt;br /&gt;
&lt;br /&gt;
It can save time to pin them all at once and apply a single classification to them all with a single click. &amp;lt;&amp;lt;pinboard image here&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Job Colors ==&lt;br /&gt;
&lt;br /&gt;
Treeherder displays build and test results in different colors, depending on the job status:&lt;br /&gt;
&lt;br /&gt;
* lightgray = pending&lt;br /&gt;
* gray = running&lt;br /&gt;
* green = success&lt;br /&gt;
* orange = tests failed&lt;br /&gt;
* purple = infrastructure exception&lt;br /&gt;
* red = build error&lt;br /&gt;
* blue = build has been restarted&lt;br /&gt;
* pink =build was cancelled&lt;br /&gt;
&lt;br /&gt;
See the &#039;Job Notation&#039; section of the [https://treeherder.mozilla.org/userguide.html Treeherder&#039;s User Guide] for more information.&lt;br /&gt;
&lt;br /&gt;
= Useful Shortcuts =&lt;br /&gt;
&lt;br /&gt;
Treeherder has several useful keyboard shortcuts. As Sheriffs these shortcuts are super helpful:&lt;br /&gt;
&lt;br /&gt;
* u = Toggle showing only unclassified failures&lt;br /&gt;
* n = Highlight next unclassified failure&lt;br /&gt;
* p = Highlight previous unclassified failure&lt;br /&gt;
* spacebar = &#039;Pin&#039; the currently selected job to Treeherder&#039;s Pinboard&lt;br /&gt;
&lt;br /&gt;
A typical workflow would be to load Treeherder, hit &#039;u&#039; to switch to the only-unclassified-failures mode (gets rid of a bunch of passing jobs that we typically have no interest in), then use either &#039;n&#039; or &#039;p&#039; to cycle through each failed job, classifying them as we go until all failures have been classified.&lt;br /&gt;
&lt;br /&gt;
An overlay showing all of Treeherder&#039;s keyboard shortcuts can be shown by pressing the &#039;?&#039; key on your keyboard while Treeherder is open in your browser. (Note: Not the &#039;?&#039; menu in the site header, although the User Guide does list the shortcuts.)&lt;br /&gt;
&lt;br /&gt;
= Classifying/Starring jobs =&lt;br /&gt;
&lt;br /&gt;
== What does it do? ==&lt;br /&gt;
# Submits the failure and classification to [https://brasstacks.mozilla.com/orangefactor/ OrangeFactor]. This dashboard helps track trends in classified failures, so failures that happen frequently (or suddenly start failing frequently) can be prioritized. &lt;br /&gt;
# Stores the classification comment and any associated bugs in Treeherders&#039;s database, so everyone viewing that tree/push can see that the failure has been starred (ie annotated with a comment and the star icon added next to the job symbol), so they know it has been dealt with.&lt;br /&gt;
&lt;br /&gt;
The list of jobs and classifications updates on its own periodically as pushes and job information are reported to Treeherder.&lt;br /&gt;
&lt;br /&gt;
== How are things starred/classified? ==&lt;br /&gt;
You first need to sign in to Treeherder to classify failures and have the classifications recorded. Click the &amp;quot;Login/Register&amp;quot; button in the header and follow the login process.&lt;br /&gt;
&lt;br /&gt;
After you&#039;re signed in, open [https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&amp;amp;revision=67cd1ee26f2661fa5efe3d952485ab3c89af4271&amp;amp;selectedJob=114156916 this page]. It should open up a Treeherder page to a specific push, and will select a specific job. This will open the bottom panel, and one of the Failure tabs will be selected. This example will use the &#039;Failure Summary&#039; tab, as it is easier to explain to a newcomer than the &#039;Failure Classification&#039; tab. Click the &#039;Failure Summary&#039; tab yourself if it isn&#039;t already selected. The tab should look something like &amp;lt;&amp;lt;IMAGE GOES HERE&amp;gt;&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
In this example, the job reports three lines of failures. We&#039;re only interested in the first line, as the other two lines don&#039;t contain any actionable information (&amp;lt;&amp;lt;But why?&amp;gt;&amp;gt;). The first failure consists of the line &#039;&#039;&#039;1536 INFO TEST-UNEXPECTED-FAIL | toolkit/components/places/tests/browser/browser_bug248970.js | Check the total items count - Got 17, expected 16&#039;&#039;&#039;. From this, there are three pieces of information to consider.&lt;br /&gt;
* &amp;quot;TEST-UNEXPECTED-FAIL&amp;quot; is the kind of failure. There can be other failures like &amp;quot;TEST-UNEXPECTED-TIMEOUT&amp;quot; and &amp;quot;PROCESS-CRASH&amp;quot;.&lt;br /&gt;
* &amp;quot;toolkit/components/places/tests/browser/browser_bug248970.js&amp;quot; is the test file that reported the failure.&lt;br /&gt;
* &amp;quot;Check the total items count - Got 17, expected 16&amp;quot; is the error that occurred.&lt;br /&gt;
&lt;br /&gt;
Below the failure line can be one or more bugs from Bugzilla that match up with part or all of the failure line, with the matching portions between the two highlighted in &#039;&#039;&#039;bold&#039;&#039;&#039; text. In this example, the entire bug summary (except for the added word &amp;quot;Intermittent&amp;quot;) is in bold, meaning it matches up exactly with the failure line. Careful, this only matches each individual word from the failure line to each word from the bug summary, so the order of words doesn&#039;t matter for highlighting purposes. You&#039;ll need to check yourself whether the two actually match for real.&lt;br /&gt;
&lt;br /&gt;
Next to the bug summary is a button with a &#039;pin&#039; icon. If you click it, the job is added to the pinboard, and the bug number is added to the &#039;Bugs&#039; section of the pinboard. Once you&#039;re confident that the classification is correct, you can click the pinboard&#039;s &amp;quot;Save&amp;quot; button to submit the classification to Treeherder&#039;s database. If this job isn&#039;t already classified, the job symbol will get a star icon added next to it. &lt;br /&gt;
&lt;br /&gt;
That&#039;s it! You&#039;ve classified/starred a job! You can move on to a different failed job.&lt;br /&gt;
&lt;br /&gt;
= More Treeherder Resources =&lt;br /&gt;
&lt;br /&gt;
More information about the Treeherder project can be found [[Auto-tools/Projects/Treeherder|here]].&lt;/div&gt;</summary>
		<author><name>KWierso</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Platform/Uptime/NightlyCrashAnalysis&amp;diff=1176202</id>
		<title>Platform/Uptime/NightlyCrashAnalysis</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Platform/Uptime/NightlyCrashAnalysis&amp;diff=1176202"/>
		<updated>2017-07-21T01:11:43Z</updated>

		<summary type="html">&lt;p&gt;KWierso: /* What if a Nightly build is super crashy? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a rough guide on how to analyze the crash reports for a particular day&#039;s Nightly build.&lt;br /&gt;
&lt;br /&gt;
== Crash Report Basics ==&lt;br /&gt;
&lt;br /&gt;
The first thing you should do is watch David Baron&#039;s &lt;br /&gt;
[https://air.mozilla.org/a-talk-about-understanding-crash-reports/ talk about crash reports]. Watch it all the way through. It&#039;s full of useful information.&lt;br /&gt;
&lt;br /&gt;
Also, see the [https://developer.mozilla.org/en-US/docs/Understanding_crash_reports documentation about reading individual crash reports] on MDN.&lt;br /&gt;
&lt;br /&gt;
== Nightly Triage ==&lt;br /&gt;
&lt;br /&gt;
The start point is [http://dbaron.org/mozilla/crashes-by-build this page]. You should look at the crashes for all four platforms (Windows, Mac, Linux, Android) for the the build you are analyzing.&lt;br /&gt;
&lt;br /&gt;
We keep notes at [[Platform/Uptime#Notes]]. Please add your notes to the top of that page. You don&#039;t need to write a lot. The logs serves two main purposes:&lt;br /&gt;
* To show which builds have been analyzed (and any that might have been missed).&lt;br /&gt;
* To communicate anything that might be useful to the people coming up in the roster (e.g. if crash reports are currently broken on one platform, or something like that).&lt;br /&gt;
&lt;br /&gt;
Nightly builds are created at 3am California time. It&#039;s generally best to wait at least 24 hours before analyzing a build, because that gives enough time for a decent number of crashes to come in.&lt;br /&gt;
&lt;br /&gt;
Windows crash numbers are much higher than the other and you will likely spend most of your time looking at them. Typical numbers for the #1 crash signature on Windows will be anywhere from 10--50 crash reports, though there is plenty of variation from day to day.&lt;br /&gt;
&lt;br /&gt;
The basic goal of triage is to get a sense of the current crash situation and take steps to improve it.&lt;br /&gt;
* Look closely at most/all of the top crash signatures (e.g. top 10--15 on Windows, top 5 or so on other platforms). (There are certain ones that are hard to act on, e.g. &amp;quot;ShutdownKill&amp;quot;, &amp;quot;OOM | Small&amp;quot;, Flash crashes.)&lt;br /&gt;
* When appropriate, file bugs for signatures that lack them (more details about this are below). If a signature only has an old bug, filing a new one might be appropriate.&lt;br /&gt;
* Check bugs for signatures that have them to see if they need additional information.&lt;br /&gt;
* If a bug has been closed but the crash is still happening, the bug might need to be reopened.&lt;br /&gt;
* If a bug is open but stalled, adding a NEEDINFO request might help, and adding information about crash frequency can be helpful. (Polite nagging can be effective!)&lt;br /&gt;
* Look for distinct crash signatures that might be related, e.g. multiple signatures relating to a11y, or to the JS JITs.&lt;br /&gt;
* The lower-ranked signatures are less important, though filing bugs for signatures that lack them can still be useful.&lt;br /&gt;
&lt;br /&gt;
One caveat is that sometimes multiple crashes (possibly even 10s or 100s) with a particular signature all come from a single installation. Those ones are usually best ignored, because it&#039;s difficult to tell if it&#039;s a real problem or a problem with the user&#039;s machine or installation, and there are enough other crashes to deal with. Likewise, if a crash appears on one Nightly build but none before or after, it&#039;s probably not worth filing.&lt;br /&gt;
&lt;br /&gt;
To determine how many installations a particular crash signature has affected:&lt;br /&gt;
* Look at the &amp;quot;Product*&amp;quot; box, which has an &amp;quot;installations&amp;quot; column. Note that this box gives results for the past 7 days, unlike the other boxes.&lt;br /&gt;
* Add the &amp;quot;install time&amp;quot; field to the search box in a signature report. If the install times are all identical it&#039;s almost certainly a single installation.&lt;br /&gt;
&lt;br /&gt;
JS engine crashes can be difficult to deal with, especially those involving the JITs and the GC, because crashes with different causes can get lumped into the same signature.&lt;br /&gt;
&lt;br /&gt;
== Filing Bug Reports ==&lt;br /&gt;
&lt;br /&gt;
To file a bug report about a particular crash signature, view one crash report and use the relevant &amp;quot;Report this bug in&amp;quot; link. This pre-populates the bug report with the &amp;quot;crash&amp;quot; keyword and a link to the particular crash report.&lt;br /&gt;
&lt;br /&gt;
When you file a bug report, things to mention include the following.&lt;br /&gt;
* The signature and the crash reason (or pattern of crash reasons)&lt;br /&gt;
* The Nightly build id, which looks like &amp;quot;20160506052823&amp;quot;.&lt;br /&gt;
* How many crashes have occurred with this signature.&lt;br /&gt;
* Anything unusual (crash only on specific platforms, only in certain locales or on certain sites, extension or dll correlations of interest, whether it&#039;s a startup crash, etc.) The correlations tab in crash-stats is great for this.&lt;br /&gt;
* The rank (e.g. &amp;quot;this is the #1 top crash for Nightly 20160506052823&amp;quot;).&lt;br /&gt;
* How many installations are involved.&lt;br /&gt;
* If the signature is new, and if so, which Nightly build it started in. One way to determine this is to modify the search parameters (by modifying the URL, or by modifying the search in the crash-stats UI) to broaden the search, e.g. by removing the particular Nightly build identifier and changing the date parameters.&lt;br /&gt;
* If possible, a regression window for that Nightly. You can get regression Windows by using the &amp;quot;Choose regression window&amp;quot; button on the [http://dbaron.org/mozilla/crashes-by-build start page].&lt;br /&gt;
* If possible, an indication of which bug&#039;s patches may have caused the crash.&lt;br /&gt;
&lt;br /&gt;
Don&#039;t worry too much if you can&#039;t get all of these things. Getting the right person to look at a crash report is the most important thing. Therefore, you should always NEEDINFO someone in a bug report. If you look at the top few frames of one or more reports, try to see if there are any lines that changed recently. If so, that&#039;s a good clue as to what change caused the crash and you can NEEDINFO the author. Failing that, NEEDINFO someone appropriate based on your knowledge of the codebase, or by looking at who has modified nearby lines, or by consulting the [[Modules/All|module owners]] or [[Bugmasters/Project/Bug_Handling/Triage_Leads|triage leads]] lists.&lt;br /&gt;
&lt;br /&gt;
Sometimes a single crash cause will result in multiple signatures. It&#039;s useful to link all the relevant signatures to the same bug. {{Bug|1229252}} is a good example, where the &amp;quot;crash signature&amp;quot; field grew steadily over a period of weeks.&lt;br /&gt;
&lt;br /&gt;
A crash that occurs more than 10 times a day, across multiple installations, is probably impactful enough to be worth tracking. Set the appropriate tracking flag to &#039;?&#039; in the bug report, so that release drivers will be aware of it.&lt;br /&gt;
&lt;br /&gt;
When you file a new bug for a crash signature, that bug won&#039;t show up in the &amp;quot;Bugs&amp;quot; columns of crash-stats for a few hours. Which is a shame, because it would be nice to double-check the linking immediately, but it&#039;s understandable that crash-stats doesn&#039;t ping Bugzilla all the time.&lt;br /&gt;
&lt;br /&gt;
== What if a Nightly build is super crashy? ==&lt;br /&gt;
&lt;br /&gt;
Occasionally a Nightly build is super crashy. When this happens, there are a few things to be done:&lt;br /&gt;
* First, tell an appropriate person (ping in #releng or maybe #moc ) so that updates can be stopped as soon as possible. A tracking bug (Release Engineering :: General) should be filed at this point by someone (you or the person stopping updates).&lt;br /&gt;
* Second, if the regressing patch can be identified and backed out, ask an appropriate person to &amp;quot;respin&amp;quot; Nightly, i.e. rebuild and re-release it. This takes a couple of hours, so is only worthwhile if the next day&#039;s Nightly build is still some time off. An &amp;quot;appropriate person&amp;quot;  for this can be found by broadcasting to one of the #sheriffs, #taskcluster or #releng IRC channels, or by emailing the sheriffs [https://mail.mozilla.org/listinfo/sheriffs mailing list].&lt;br /&gt;
* Finally, once the issue has been resolved and new Nightly builds are ready to go out to users, contact the person who froze updates in step 1 so that updates can be unfrozen.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
&lt;br /&gt;
At the end of each development cycle, it&#039;s worth paying attention to which crashes affect both Nightly and Beta, and therefore have fixes that need uplift to Beta.&lt;/div&gt;</summary>
		<author><name>KWierso</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Getting_started_as_a_sheriff&amp;diff=1175791</id>
		<title>Sheriffing/How To/Getting started as a sheriff</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Getting_started_as_a_sheriff&amp;diff=1175791"/>
		<updated>2017-07-14T22:57:37Z</updated>

		<summary type="html">&lt;p&gt;KWierso: /* Sheriffed Repositories */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;So you want to be a Sheriff? Here&#039;s how to start.&lt;br /&gt;
&lt;br /&gt;
= Things You&#039;ll Need =&lt;br /&gt;
&lt;br /&gt;
Not all of these have to be ready on Day One, but eventually you&#039;ll need the following.&lt;br /&gt;
* [[IRC|IRC account]], for communicating with developers, fellow sheriffs, and others.&lt;br /&gt;
* [[Sheriffing/How:To:SheriffingFromUnifiedRepos#Setting_up_the_repo|Clone of the Mercurial repositories]], for committing changes to the repositories.&lt;br /&gt;
* A properly configured mercurial setup. You can use `./mach mercurial-setup` from your clone of the repository to run through a setup wizard. I recommend setting up the qbackout extension to aid in easily backing out patches.&lt;br /&gt;
* LDAP account, for signing in to Treeherder and pushing commits to the source code repositories.&lt;br /&gt;
* [https://www.mozilla.org/en-US/firefox/new/ A modern browser], to access [[Sheriffing/How:To:Treeherder|Treeherder]], [https://bugzilla.mozilla.org Bugzilla], and other Mozilla web tools.&lt;br /&gt;
&lt;br /&gt;
= The Sheriffs How-To =&lt;br /&gt;
&lt;br /&gt;
A lot of knowledge about what sheriffs do is built up by day-to-day experiences on the job. We&#039;ve created a number of wiki pages documenting a lot of this information, indexed [[Sheriffing/How:To|here]].&lt;br /&gt;
&lt;br /&gt;
Some of the more helpful (and up to date) pages:&lt;br /&gt;
* [[Sheriffing/How:To:Treeherder]] - Explains some useful terminology, what each part of Treeherder&#039;s UI means/does, and how to use Treeherder to classify failures&lt;br /&gt;
* [[Sheriffing/How:To:SheriffingFromUnifiedRepos]] - This is useful, though some of the referenced repositories are no longer sheriffed, and it assumes you have knowledge of a lot of Mozilla/mercurial terms.&lt;br /&gt;
&lt;br /&gt;
= Communication =&lt;br /&gt;
&lt;br /&gt;
Sheriffs hang out in the #sheriffs channel on IRC - also it&#039;s useful to be in the following Channels:&lt;br /&gt;
&lt;br /&gt;
* #developers - most of the developers are around here&lt;br /&gt;
* #buildduty - our counterparts of the build system “sheriffs”&lt;br /&gt;
* #releng - general Release Engineering Channel&lt;br /&gt;
* #taskcluster - taskcluster team channel&lt;br /&gt;
&lt;br /&gt;
A more-complete list of channels is listed [[IRC#Commonly_Used_Mozilla_IRC_Channels|here]].&lt;br /&gt;
&lt;br /&gt;
= Sheriffed Repositories =&lt;br /&gt;
&lt;br /&gt;
Mozilla has dozens of different source code repositories for various projects and releases, but sheriffs only need to care about a few of them:&lt;br /&gt;
* [https://treeherder.mozilla.org/#/jobs?repo=mozilla-central mozilla-central], the main development repository.&lt;br /&gt;
* [https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound mozilla-inbound], one of mozilla-central&#039;s integration branches where new commits initially land for testing.&lt;br /&gt;
* [https://treeherder.mozilla.org/#/jobs?repo=autoland autoland], another integration branch for mozilla-central.&lt;br /&gt;
* [https://treeherder.mozilla.org/#/jobs?repo=mozilla-beta mozilla-beta], one of the release stabilization branches for code that has already gone through several weeks of testing.&lt;br /&gt;
* [https://treeherder.mozilla.org/#/jobs?repo=mozilla-release mozilla-release], the official release branch, where Firefox code goes to become part of an official build of Firefox.&lt;br /&gt;
* [https://treeherder.mozilla.org/#/jobs?repo=mozilla-esr52 mozilla-esrXX], one or more branches set up to track patches for the current (and at times when the ESR releases overlap, the previous) version of [https://www.mozilla.org/en-US/firefox/organizations/ Firefox ESR]. (At the moment, this is mozilla-esr52.)&lt;br /&gt;
&lt;br /&gt;
Once you&#039;re up to speed, it&#039;s best to leave a tab open to each of these repositories throughout your work day so you can track failures as they come in.&lt;br /&gt;
&lt;br /&gt;
= Sheriffing Tasks =&lt;br /&gt;
&lt;br /&gt;
Sheriffs do a lot of things throughout the day.&lt;br /&gt;
* Watch the sheriffed repositories via Treeherder for failures.&lt;br /&gt;
** Classify/Star known intermittent failures.&lt;br /&gt;
** File tracking bugs for newly discovered intermittent failures.&lt;br /&gt;
** Resolve issues with code that has landed. This can be done with some of the following:&lt;br /&gt;
*** Backout the bad code.&lt;br /&gt;
*** Ensure that developers land followup patches to fix issues that are discovered.&lt;br /&gt;
** Monitor the repositories and tests for any issues related to infrastructure issues.&lt;br /&gt;
** Mark repositories as being unable to accept commits from developers (also called &amp;quot;close the trees&amp;quot;) via Treestatus, allowing you to fix issues without a bunch of new potentially-bad commits from landing in the interim.&lt;br /&gt;
* Merge known-good commits from the mozilla-inbound and autoland repositories over to mozilla-central, and then back around to mozilla-inbound and autoland.&lt;br /&gt;
** Once the actual merge is performed, you need to run the Bugherder tool against the merge on mozilla-central to get the information properly updated in Bugzilla. There&#039;s a link to Bugherder in the per-push menu item in Treeherder.&lt;br /&gt;
* Landing approved patches that are marked as &amp;quot;checkin-needed&amp;quot; onto mozilla-inbound or autoland.&lt;br /&gt;
* Backporting approved patches (also called &amp;quot;uplifting&amp;quot;) from mozilla-central to one or more of the release stabilization branches (mozilla-beta, mozilla-release, mozilla-esr52, etc) to get the patch into users&#039; hands sooner.&lt;/div&gt;</summary>
		<author><name>KWierso</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Getting_started_as_a_sheriff&amp;diff=1175789</id>
		<title>Sheriffing/How To/Getting started as a sheriff</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Getting_started_as_a_sheriff&amp;diff=1175789"/>
		<updated>2017-07-14T22:21:58Z</updated>

		<summary type="html">&lt;p&gt;KWierso: Initial page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;So you want to be a Sheriff? Here&#039;s how to start.&lt;br /&gt;
&lt;br /&gt;
= Things You&#039;ll Need =&lt;br /&gt;
&lt;br /&gt;
Not all of these have to be ready on Day One, but eventually you&#039;ll need the following.&lt;br /&gt;
* [[IRC|IRC account]], for communicating with developers, fellow sheriffs, and others.&lt;br /&gt;
* [[Sheriffing/How:To:SheriffingFromUnifiedRepos#Setting_up_the_repo|Clone of the Mercurial repositories]], for committing changes to the repositories.&lt;br /&gt;
* A properly configured mercurial setup. You can use `./mach mercurial-setup` from your clone of the repository to run through a setup wizard. I recommend setting up the qbackout extension to aid in easily backing out patches.&lt;br /&gt;
* LDAP account, for signing in to Treeherder and pushing commits to the source code repositories.&lt;br /&gt;
* [https://www.mozilla.org/en-US/firefox/new/ A modern browser], to access [[Sheriffing/How:To:Treeherder|Treeherder]], [https://bugzilla.mozilla.org Bugzilla], and other Mozilla web tools.&lt;br /&gt;
&lt;br /&gt;
= The Sheriffs How-To =&lt;br /&gt;
&lt;br /&gt;
A lot of knowledge about what sheriffs do is built up by day-to-day experiences on the job. We&#039;ve created a number of wiki pages documenting a lot of this information, indexed [[Sheriffing/How:To|here]].&lt;br /&gt;
&lt;br /&gt;
Some of the more helpful (and up to date) pages:&lt;br /&gt;
* [[Sheriffing/How:To:Treeherder]] - Explains some useful terminology, what each part of Treeherder&#039;s UI means/does, and how to use Treeherder to classify failures&lt;br /&gt;
* [[Sheriffing/How:To:SheriffingFromUnifiedRepos]] - This is useful, though some of the referenced repositories are no longer sheriffed, and it assumes you have knowledge of a lot of Mozilla/mercurial terms.&lt;br /&gt;
&lt;br /&gt;
= Communication =&lt;br /&gt;
&lt;br /&gt;
Sheriffs hang out in the #sheriffs channel on IRC - also it&#039;s useful to be in the following Channels:&lt;br /&gt;
&lt;br /&gt;
* #developers - most of the developers are around here&lt;br /&gt;
* #buildduty - our counterparts of the build system “sheriffs”&lt;br /&gt;
* #releng - general Release Engineering Channel&lt;br /&gt;
* #taskcluster - taskcluster team channel&lt;br /&gt;
&lt;br /&gt;
A more-complete list of channels is listed [[IRC#Commonly_Used_Mozilla_IRC_Channels|here]].&lt;br /&gt;
&lt;br /&gt;
= Sheriffed Repositories =&lt;br /&gt;
&lt;br /&gt;
Mozilla has many dozens of different source code repositories for various projects and releases, but sheriffs only need to care about a few of them:&lt;br /&gt;
* [https://treeherder.mozilla.org/#/jobs?repo=mozilla-central mozilla-central], the main development repository.&lt;br /&gt;
* [https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound mozilla-inbound], one of mozilla-central&#039;s integration branches where new commits initially land for testing.&lt;br /&gt;
* [https://treeherder.mozilla.org/#/jobs?repo=autoland autoland], another integration branch for mozilla-central.&lt;br /&gt;
* [https://treeherder.mozilla.org/#/jobs?repo=mozilla-beta mozilla-beta], one of the release stabilization branches for code that has already gone through several weeks of testing.&lt;br /&gt;
* [https://treeherder.mozilla.org/#/jobs?repo=mozilla-release mozilla-release], the official release branch, where Firefox code goes to become part of an official build of Firefox.&lt;br /&gt;
* [https://treeherder.mozilla.org/#/jobs?repo=mozilla-esr52 mozilla-esrXX], one or more branches set up to track patches for the current (and at times when the ESR releases overlap, the previous) version of [https://www.mozilla.org/en-US/firefox/organizations/ Firefox ESR]. (At the moment, this is mozilla-esr52.)&lt;br /&gt;
&lt;br /&gt;
Once you&#039;re up to speed, it&#039;s best to leave a tab open to each of these repositories throughout your work day so you can track failures as they come in.&lt;br /&gt;
&lt;br /&gt;
= Sheriffing Tasks =&lt;br /&gt;
&lt;br /&gt;
Sheriffs do a lot of things throughout the day.&lt;br /&gt;
* Watch the sheriffed repositories via Treeherder for failures.&lt;br /&gt;
** Classify/Star known intermittent failures.&lt;br /&gt;
** File tracking bugs for newly discovered intermittent failures.&lt;br /&gt;
** Resolve issues with code that has landed. This can be done with some of the following:&lt;br /&gt;
*** Backout the bad code.&lt;br /&gt;
*** Ensure that developers land followup patches to fix issues that are discovered.&lt;br /&gt;
** Monitor the repositories and tests for any issues related to infrastructure issues.&lt;br /&gt;
** Mark repositories as being unable to accept commits from developers (also called &amp;quot;close the trees&amp;quot;) via Treestatus, allowing you to fix issues without a bunch of new potentially-bad commits from landing in the interim.&lt;br /&gt;
* Merge known-good commits from the mozilla-inbound and autoland repositories over to mozilla-central, and then back around to mozilla-inbound and autoland.&lt;br /&gt;
** Once the actual merge is performed, you need to run the Bugherder tool against the merge on mozilla-central to get the information properly updated in Bugzilla. There&#039;s a link to Bugherder in the per-push menu item in Treeherder.&lt;br /&gt;
* Landing approved patches that are marked as &amp;quot;checkin-needed&amp;quot; onto mozilla-inbound or autoland.&lt;br /&gt;
* Backporting approved patches (also called &amp;quot;uplifting&amp;quot;) from mozilla-central to one or more of the release stabilization branches (mozilla-beta, mozilla-release, mozilla-esr52, etc) to get the patch into users&#039; hands sooner.&lt;/div&gt;</summary>
		<author><name>KWierso</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Sheriffing/How:To&amp;diff=1175788</id>
		<title>Sheriffing/How:To</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Sheriffing/How:To&amp;diff=1175788"/>
		<updated>2017-07-14T22:19:49Z</updated>

		<summary type="html">&lt;p&gt;KWierso: Add Bootstrap page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Sheriff How-To / Knowledge Share =&lt;br /&gt;
&lt;br /&gt;
== B ==&lt;br /&gt;
*[[Sheriffing/How:To:Backouts|Backouts]]&lt;br /&gt;
*[[Sheriffing/How:To:Bisecting |Bisecting]]&lt;br /&gt;
*[[Sheriffing/How:To:Bootstrap| Sheriffing Bootstrap]]&lt;br /&gt;
&lt;br /&gt;
== C ==&lt;br /&gt;
* [[Sheriffing/How:To:Community_Sheriffs|Community_Sheriffs and you - also current issues]]&lt;br /&gt;
&lt;br /&gt;
== D ==&lt;br /&gt;
* [[Sheriffing/How:To:DayOne|Sheriffing Day - One]]&lt;br /&gt;
* [[Sheriffing/Deciding_To_Close_A_Tree|Deciding to Close A_Tree &amp;amp; Actions]]&lt;br /&gt;
&lt;br /&gt;
== E ==&lt;br /&gt;
* [[Sheriffing/How:To:Escalate|Escalating issues to MOC or Releng]]&lt;br /&gt;
&lt;br /&gt;
== H ==&lt;br /&gt;
* [[Sheriffing/How:To:Hangs|Hangs/Timeout Failures]]&lt;br /&gt;
&lt;br /&gt;
== I ==&lt;br /&gt;
* [[Sheriffing/How:To:Intermittent-bugs| How to file a Intermittent failure]]&lt;br /&gt;
&lt;br /&gt;
== L == &lt;br /&gt;
* [[Sheriffing/How:To:Landing_checkin-needed_patches|Landing checkin-needed patches]]&lt;br /&gt;
&lt;br /&gt;
== M == &lt;br /&gt;
* [[Sheriffing/How:To:Merges|Merges]]&lt;br /&gt;
* [[Sheriffing/How:To:Merge_Conflicts|Merge Conflicts]]&lt;br /&gt;
&lt;br /&gt;
== R ==&lt;br /&gt;
* [[Sheriffing/How:To:Restarts|Retrigger (Restart)]]&lt;br /&gt;
* [[Sheriffing/How:To:Retrigger_PGO_Builds|Retrigger PGO/Nightlies]] &lt;br /&gt;
&lt;br /&gt;
== S ==&lt;br /&gt;
* [[Sheriffing/How:To:Sheriffs-Schedule| Sheriffing Schedule]]&lt;br /&gt;
&lt;br /&gt;
== T == &lt;br /&gt;
* [[Sheriffing/How:To:Treeherder|Treeherder]]&lt;br /&gt;
* [[Sheriffing/How:To:Trees|Trees]]&lt;br /&gt;
&lt;br /&gt;
== U ==&lt;br /&gt;
* [[Sheriffing/How:To:Uplifts|Uplifts]]&lt;br /&gt;
* [[Sheriffing/How:To:SheriffingFromUnifiedRepos|SheriffingFromUnifiedRepos]]&lt;/div&gt;</summary>
		<author><name>KWierso</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Sheriffing/How:To&amp;diff=1175784</id>
		<title>Sheriffing/How:To</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Sheriffing/How:To&amp;diff=1175784"/>
		<updated>2017-07-14T21:57:28Z</updated>

		<summary type="html">&lt;p&gt;KWierso: Switch a TBPL link for a Treeherder link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Sheriff How-To / Knowledge Share =&lt;br /&gt;
&lt;br /&gt;
== B ==&lt;br /&gt;
*[[Sheriffing/How:To:Backouts|Backouts]]&lt;br /&gt;
*[[Sheriffing/How:To:Bisecting |Bisecting]]&lt;br /&gt;
&lt;br /&gt;
== C ==&lt;br /&gt;
* [[Sheriffing/How:To:Community_Sheriffs|Community_Sheriffs and you - also current issues]]&lt;br /&gt;
&lt;br /&gt;
== D ==&lt;br /&gt;
* [[Sheriffing/How:To:DayOne|Sheriffing Day - One]]&lt;br /&gt;
* [[Sheriffing/Deciding_To_Close_A_Tree|Deciding to Close A_Tree &amp;amp; Actions]]&lt;br /&gt;
&lt;br /&gt;
== E ==&lt;br /&gt;
* [[Sheriffing/How:To:Escalate|Escalating issues to MOC or Releng]]&lt;br /&gt;
&lt;br /&gt;
== H ==&lt;br /&gt;
* [[Sheriffing/How:To:Hangs|Hangs/Timeout Failures]]&lt;br /&gt;
&lt;br /&gt;
== I ==&lt;br /&gt;
* [[Sheriffing/How:To:Intermittent-bugs| How to file a Intermittent failure]]&lt;br /&gt;
&lt;br /&gt;
== L == &lt;br /&gt;
* [[Sheriffing/How:To:Landing_checkin-needed_patches|Landing checkin-needed patches]]&lt;br /&gt;
&lt;br /&gt;
== M == &lt;br /&gt;
* [[Sheriffing/How:To:Merges|Merges]]&lt;br /&gt;
* [[Sheriffing/How:To:Merge_Conflicts|Merge Conflicts]]&lt;br /&gt;
&lt;br /&gt;
== R ==&lt;br /&gt;
* [[Sheriffing/How:To:Restarts|Retrigger (Restart)]]&lt;br /&gt;
* [[Sheriffing/How:To:Retrigger_PGO_Builds|Retrigger PGO/Nightlies]] &lt;br /&gt;
&lt;br /&gt;
== S ==&lt;br /&gt;
* [[Sheriffing/How:To:Sheriffs-Schedule| Sheriffing Schedule]]&lt;br /&gt;
&lt;br /&gt;
== T == &lt;br /&gt;
* [[Sheriffing/How:To:Treeherder|Treeherder]]&lt;br /&gt;
* [[Sheriffing/How:To:Trees|Trees]]&lt;br /&gt;
&lt;br /&gt;
== U ==&lt;br /&gt;
* [[Sheriffing/How:To:Uplifts|Uplifts]]&lt;br /&gt;
* [[Sheriffing/How:To:SheriffingFromUnifiedRepos|SheriffingFromUnifiedRepos]]&lt;/div&gt;</summary>
		<author><name>KWierso</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Treeherder&amp;diff=1175745</id>
		<title>Sheriffing/How To/Treeherder</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Treeherder&amp;diff=1175745"/>
		<updated>2017-07-14T07:58:17Z</updated>

		<summary type="html">&lt;p&gt;KWierso: More terms&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;WIP&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Treeherder is the dashboard used by sheriffs and the rest of Mozilla to see build and test results. When you first open [https://treeherder.mozilla.org Treeherder], there will be a lot of information thrown at you all at once. This document should help explain what to do with it all.&lt;br /&gt;
&amp;lt;&amp;lt;TREEHERDER LANDING IMAGE&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Common Terms =&lt;br /&gt;
&lt;br /&gt;
There are a lot of terms used within Mozilla that aren&#039;t necessarily common elsewhere.&lt;br /&gt;
&lt;br /&gt;
# Repo - Shorthand for &#039;repository&#039;, this is where developers push their commits to have them become part of an upcoming version of Firefox. An example of this is the &#039;mozilla-inbound&#039; repository.&lt;br /&gt;
# Tree - Another term for a repository. &#039;Treeherder&#039; is based on this, as a tool to &amp;quot;manage the trees&amp;quot;.&lt;br /&gt;
# Job - The smallest unit of work shown in Treeherder&#039;s main UI. This can be a build job or a test job. Each test job can run many tests within it, but they get reported as a group to Treeherder. Examples of these would be the Windows 8 x64 Debug build job, or a mochitest-browser-chrome-1 test job. &lt;br /&gt;
&lt;br /&gt;
Each push to a repository will run a number of build jobs for various platforms (Linux, MacOS, Windows, Android). Most platforms will make multiple builds in various configurations: OPT (optimized builds that strip out information helpful for debugging failures in favor of making things faster), DEBUG (unoptimized builds that don&#039;t strip out the debugging information), and [https://en.m.wikipedia.org/wiki/Profile-guided_optimization PGO] (the build compiler process runs through the code a few times, taking longer to complete, but speeding up some code paths to make the build run faster than Opt builds). Then those builds will each be used to run a number of test jobs to verify that the compiled code is running as intended. Then either a build or test job runs into trouble, the job is reported as a failure to Treeherder, needing to be classified (also called &#039;starred&#039; at Mozilla, since classifying a job marks the job as classified by adding a star next to the job symbol in Treeherder by the current sheriff on duty (that&#039;s you!).&lt;br /&gt;
&lt;br /&gt;
= Treeherder&#039;s UI =&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
At the top of the site&#039;s header section are some menus and buttons that can be useful. The &#039;Infra&#039; menu holds links to a few other Mozilla tools/websites. The &#039;Repos&#039; menu provides links to view other Mozilla source code repositories within Treeherder. The &#039;Filters&#039; menu has tools to filter down the jobs shown within Treeherder on various criteria. The &#039;?&#039; menu has various help pages for Treeherder. The &#039;Login/Register&#039; button lets you log in to Treeherder, allowing you to make changes to/with Treeherder&#039;s tools.&lt;br /&gt;
&lt;br /&gt;
The next row in the site header includes a menu showing the currently selected repository, with information about the state of the repository (closed/open/approval-required). The &#039;Tiers&#039; menu lets you select which [[Sheriffing/Job_Visibility_Policy|tiers]] of jobs are displayed. The &#039;Excluded Jobs&#039; button toggles whether jobs that have been intentionally hidden from view are shown. The &#039;+&#039; or &#039;-&#039; button toggles whether groups of non-failing jobs are collapsed or expanded. The various colored circle buttons toggle the visibility of jobs in various states (red toggles failing jobs, green toggles passing jobs, etc). The textbox at the end is a quick-filter box, you can filter jobs by various properties from it without constructing a more exact filter from the &#039;Filters&#039; menu above. (Treeherder displays the count of jobs that are currently &amp;quot;unclassified&amp;quot; in the middle of this row. More on this below.)&lt;br /&gt;
&lt;br /&gt;
== Main Section ==&lt;br /&gt;
&lt;br /&gt;
Below the site header is the main part of Treeherder. This shows the recent commits to the currently selected repository grouped by the [http://mozilla-version-control-tools.readthedocs.io/en/latest/hgmo/pushlog.html pushes] they were landed in.&lt;br /&gt;
&lt;br /&gt;
The left side of each push shows the commit data for each commit in the push (eg, the commit hash, the commit author, and the commit message). This can be just a single commit or the push could contain up to hundreds of commits. (Treeherder caps the view at 20 commits for performance reasons. Click the &amp;quot;... and more&amp;quot; links to view the entire push&#039;s contents on hg.mozilla.org.)&lt;br /&gt;
&lt;br /&gt;
The right side of each push shows the build and test results for all of the jobs running with this push&#039;s commits. This is where most sheriffing work happens, as it is where job failures are reported, and the job failures need to be classified (also referred to as &#039;starred&#039; in various places).&lt;br /&gt;
&lt;br /&gt;
== Bottom Panel ==&lt;br /&gt;
&lt;br /&gt;
If you select one of the job symbols for a push, a panel at the bottom of the page will open. &amp;lt;&amp;lt;BOTTOM PANEL IMAGE&amp;gt;&amp;gt; The panel has a few sections with information about the job. &lt;br /&gt;
&lt;br /&gt;
On the left side of the panel, there are a few buttons that can be clicked to open the log file for the job as well as submit a request for the job to be re-run. Below those buttons is a list of information about the job, like the name of the job, when the job was requested by the build system, when the build system actually started working on the job, and when the job finished being run.&lt;br /&gt;
&lt;br /&gt;
On the right side of the panel are a number tabs with more information about the job. Depending on the state of the job you selected, the tab that gets selected by default will vary. (A green/passing job will default to the &#039;Job Details&#039; tab, a failing job will default to either the &#039;Failure Summary&#039; or &#039;Failure Classification&#039; tabs.) &lt;br /&gt;
&lt;br /&gt;
The &#039;Job Details&#039; tab lists more detailed information from the job, including all of the files created and uploaded as part of the job running (eg, log files, screenshots of certain failures, etc). &lt;br /&gt;
&lt;br /&gt;
The &#039;Failure Summary&#039; and &#039;Failure Classification&#039; tabs show information a job&#039;s reported failures. They both list the same information, but are used slightly differently (&#039;Failure Summary&#039; handles all failures in a job as a whole, &#039;Failure Classification&#039; can handle each individual failure within a job on its own, and is part of the Autoclassify system.) These views will list each failure line, as well as any bugs from Bugzilla that match (or are at least similar in some way) the reported failure. If you&#039;re signed in, you&#039;ll also see extra controls for classifying the failures.&lt;br /&gt;
&lt;br /&gt;
The &#039;Annotations&#039; tab shows any classifications that have already been performed for the job. If you&#039;re signed in, you&#039;ll also see UI for removing classifications, in the case that something was classified incorrectly and you need to correct it.&lt;br /&gt;
&lt;br /&gt;
=== Pinboard ===&lt;br /&gt;
&lt;br /&gt;
The pinboard is an area where you can add one or more jobs and pair those with related bugs or comments/reasons, before you submit the classifications to the database. Typically you&#039;d use this on a single job at a time, but if multiple jobs are broken for the same reason (a patch broke a test completely, and you need to classify the failed jobs against the push that broke/fixed it, something in the build infrastructure is broken, causing lots of jobs to fail at once, etc), it can save time to pin them all at once and apply a single classification to them all with a single click. &amp;lt;&amp;lt;pinboard image here&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Job Colors ==&lt;br /&gt;
&lt;br /&gt;
Treeherder displays build and test results in different colors, depending on the job status:&lt;br /&gt;
&lt;br /&gt;
* lightgray = pending&lt;br /&gt;
* gray = running&lt;br /&gt;
* green = success&lt;br /&gt;
* orange = tests failed&lt;br /&gt;
* purple = infrastructure exception&lt;br /&gt;
* red = build error&lt;br /&gt;
* blue = build has been restarted&lt;br /&gt;
* pink =build was cancelled&lt;br /&gt;
&lt;br /&gt;
See the &#039;Job Notation&#039; section of the [https://treeherder.mozilla.org/userguide.html Treeherder&#039;s User Guide] for more information.&lt;br /&gt;
&lt;br /&gt;
= Useful Shortcuts =&lt;br /&gt;
&lt;br /&gt;
Treeherder has several useful keyboard shortcuts. As Sheriffs these shortcuts are super helpful:&lt;br /&gt;
&lt;br /&gt;
* u = Toggle showing only unclassified failures&lt;br /&gt;
* n = Highlight next unclassified failure&lt;br /&gt;
* p = Highlight previous unclassified failure&lt;br /&gt;
* spacebar = &#039;Pin&#039; the currently selected job to Treeherder&#039;s Pinboard&lt;br /&gt;
&lt;br /&gt;
A typical workflow would be to load Treeherder, hit &#039;u&#039; to switch to the only-unclassified-failures mode (gets rid of a bunch of passing jobs that we typically have no interest in), then use either &#039;n&#039; or &#039;p&#039; to cycle through each failed job, classifying them as we go until all failures have been classified.&lt;br /&gt;
&lt;br /&gt;
An overlay showing all of Treeherder&#039;s keyboard shortcuts can be shown by pressing the &#039;?&#039; key on your keyboard while Treeherder is open in your browser. (Note: Not the &#039;?&#039; menu in the site header, although the User Guide does list the shortcuts.)&lt;br /&gt;
&lt;br /&gt;
= Classifying/Starring jobs =&lt;br /&gt;
&lt;br /&gt;
== What does it do? ==&lt;br /&gt;
&lt;br /&gt;
# Submits the failure and classification to [https://brasstacks.mozilla.com/orangefactor/ OrangeFactor]. This dashboard helps track trends in classified failures, so failures that happen frequently (or suddenly start failing frequently) can be prioritized. &lt;br /&gt;
# Stores the classification comment and any associated bugs in Treeherders&#039;s database, so everyone viewing that tree/push can see that the failure has been starred (ie annotated with a comment and the star icon added next to the job symbol), so they know it has been dealt with.&lt;br /&gt;
&lt;br /&gt;
The list of jobs and clasifications updates on its own periodically as pushes and job information are reported to Treeherder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How are things starred/classified? ==&lt;br /&gt;
&lt;br /&gt;
You first need to sign in to Treeherder to classify failures and have the classifications recorded. Click the &amp;quot;Login/Register&amp;quot; button in the header and follow the login process.&lt;br /&gt;
&lt;br /&gt;
After you&#039;re signed in, open [https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&amp;amp;revision=67cd1ee26f2661fa5efe3d952485ab3c89af4271&amp;amp;selectedJob=114156916 this page]. It should open up a Treeherder page to a specific push, and will select a specific job. This will open the bottom panel, and one of the Failure tabs will be selected. This example will use the &#039;Failure Summary&#039; tab, as it is easier to explain to a newcomer than the &#039;Failure Classification&#039; tab. Click the &#039;Failure Summary&#039; tab yourself if it isn&#039;t already selected. The tab should look something like &amp;lt;&amp;lt;IMAGE GOES HERE&amp;gt;&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
In this example, the job reports three lines of failures. We&#039;re only interested in the first line, as the other two lines don&#039;t contain any actionable information (&amp;lt;&amp;lt;But why?&amp;gt;&amp;gt;). The first failure consists of the line &#039;&#039;&#039;1536 INFO TEST-UNEXPECTED-FAIL | toolkit/components/places/tests/browser/browser_bug248970.js | Check the total items count - Got 17, expected 16&#039;&#039;&#039;. From this, there are three pieces of information to consider.&lt;br /&gt;
* &amp;quot;TEST-UNEXPECTED-FAIL&amp;quot; is the kind of failure. There can be other failures like &amp;quot;TEST-UNEXPECTED-TIMEOUT&amp;quot; and &amp;quot;PROCESS-CRASH&amp;quot;.&lt;br /&gt;
* &amp;quot;toolkit/components/places/tests/browser/browser_bug248970.js&amp;quot; is the test file that reported the failure.&lt;br /&gt;
* &amp;quot;Check the total items count - Got 17, expected 16&amp;quot; is the error that occurred.&lt;br /&gt;
&lt;br /&gt;
Below the failure line can be one or more bugs from Bugzilla that match up with part or all of the failure line, with the matching portions between the two highlighted in &#039;&#039;&#039;bold&#039;&#039;&#039; text. In this example, the entire bug summary (except for the added word &amp;quot;Intermittent&amp;quot;) is in bold, meaning it matches up exactly with the failure line. (Careful, this only matches each individual word from the failure line to each word from the bug summary, so the order of words doesn&#039;t matter for highlighting purposes. You&#039;ll need to check yourself whether the two actually match for real.)&lt;br /&gt;
&lt;br /&gt;
Next to the bug summary is a button with a &#039;pin&#039; icon. If you click it, the job is added to the pinboard, and the bug number is added to the &#039;Bugs&#039; section of the pinboard. Once you&#039;re confident that the classification is correct, you can click the pinboard&#039;s &amp;quot;Save&amp;quot; button to submit the classification to Treeherder&#039;s database. If this job isn&#039;t already classified, the job symbol will get a star icon added next to it. &lt;br /&gt;
&lt;br /&gt;
That&#039;s it! You&#039;ve classified/starred a job! You can move on to a different failed job.&lt;br /&gt;
&lt;br /&gt;
= More Treeherder Resources =&lt;br /&gt;
&lt;br /&gt;
More information about the Treeherder project can be found [[Auto-tools/Projects/Treeherder|here]].&lt;/div&gt;</summary>
		<author><name>KWierso</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Treeherder&amp;diff=1175744</id>
		<title>Sheriffing/How To/Treeherder</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Treeherder&amp;diff=1175744"/>
		<updated>2017-07-14T07:49:57Z</updated>

		<summary type="html">&lt;p&gt;KWierso: Add some helpful terms&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;WIP&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Treeherder is the dashboard used by sheriffs and the rest of Mozilla to see build and test results. When you first open [https://treeherder.mozilla.org Treeherder], there will be a lot of information thrown at you all at once. This document should help explain what to do with it all.&lt;br /&gt;
&amp;lt;&amp;lt;TREEHERDER LANDING IMAGE&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Common Terms =&lt;br /&gt;
&lt;br /&gt;
There are a lot of terms used within Mozilla that aren&#039;t necessarily common elsewhere.&lt;br /&gt;
&lt;br /&gt;
# Repo - Shorthand for &#039;repository&#039;, this is where developers push their commits to have them become part of an upcoming version of Firefox. An example of this is the &#039;mozilla-inbound&#039; repository.&lt;br /&gt;
# Tree - Another term for a repository. &#039;Treeherder&#039; is based on this, as a tool to &amp;quot;manage the trees&amp;quot;.&lt;br /&gt;
# Job - The smallest unit of work shown in Treeherder&#039;s main UI. This can be a build job or a test job. Each test job can run many tests within it, but they get reported as a group to Treeherder. Examples of these would be the Windows 8 x64 Debug build job, or a mochitest-browser-chrome-1 test job. Each push to a repository will run a number of build jobs for various platforms (Linux, MacOS, Windows, Android). Most platforms will make builds in various configurations: OPT (optimized builds that strip out information helpful for debugging failures), DEBUG (unoptimized builds that don&#039;t strip out the debugging information), and PGO (the build process runs a few times, taking longer to complete, but speeding up some code paths to make the build run faster) then those builds will each be used to run a number of test jobs in.&lt;br /&gt;
&lt;br /&gt;
= Treeherder&#039;s UI =&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
At the top of the site&#039;s header section are some menus and buttons that can be useful. The &#039;Infra&#039; menu holds links to a few other Mozilla tools/websites. The &#039;Repos&#039; menu provides links to view other Mozilla source code repositories within Treeherder. The &#039;Filters&#039; menu has tools to filter down the jobs shown within Treeherder on various criteria. The &#039;?&#039; menu has various help pages for Treeherder. The &#039;Login/Register&#039; button lets you log in to Treeherder, allowing you to make changes to/with Treeherder&#039;s tools.&lt;br /&gt;
&lt;br /&gt;
The next row in the site header includes a menu showing the currently selected repository, with information about the state of the repository (closed/open/approval-required). The &#039;Tiers&#039; menu lets you select which [[Sheriffing/Job_Visibility_Policy|tiers]] of jobs are displayed. The &#039;Excluded Jobs&#039; button toggles whether jobs that have been intentionally hidden from view are shown. The &#039;+&#039; or &#039;-&#039; button toggles whether groups of non-failing jobs are collapsed or expanded. The various colored circle buttons toggle the visibility of jobs in various states (red toggles failing jobs, green toggles passing jobs, etc). The textbox at the end is a quick-filter box, you can filter jobs by various properties from it without constructing a more exact filter from the &#039;Filters&#039; menu above. (Treeherder displays the count of jobs that are currently &amp;quot;unclassified&amp;quot; in the middle of this row. More on this below.)&lt;br /&gt;
&lt;br /&gt;
== Main Section ==&lt;br /&gt;
&lt;br /&gt;
Below the site header is the main part of Treeherder. This shows the recent commits to the currently selected repository grouped by the [http://mozilla-version-control-tools.readthedocs.io/en/latest/hgmo/pushlog.html pushes] they were landed in.&lt;br /&gt;
&lt;br /&gt;
The left side of each push shows the commit data for each commit in the push (eg, the commit hash, the commit author, and the commit message). This can be just a single commit or the push could contain up to hundreds of commits. (Treeherder caps the view at 20 commits for performance reasons. Click the &amp;quot;... and more&amp;quot; links to view the entire push&#039;s contents on hg.mozilla.org.)&lt;br /&gt;
&lt;br /&gt;
The right side of each push shows the build and test results for all of the jobs running with this push&#039;s commits. This is where most sheriffing work happens, as it is where job failures are reported, and the job failures need to be classified (also referred to as &#039;starred&#039; in various places).&lt;br /&gt;
&lt;br /&gt;
== Bottom Panel ==&lt;br /&gt;
&lt;br /&gt;
If you select one of the job symbols for a push, a panel at the bottom of the page will open. &amp;lt;&amp;lt;BOTTOM PANEL IMAGE&amp;gt;&amp;gt; The panel has a few sections with information about the job. &lt;br /&gt;
&lt;br /&gt;
On the left side of the panel, there are a few buttons that can be clicked to open the log file for the job as well as submit a request for the job to be re-run. Below those buttons is a list of information about the job, like the name of the job, when the job was requested by the build system, when the build system actually started working on the job, and when the job finished being run.&lt;br /&gt;
&lt;br /&gt;
On the right side of the panel are a number tabs with more information about the job. Depending on the state of the job you selected, the tab that gets selected by default will vary. (A green/passing job will default to the &#039;Job Details&#039; tab, a failing job will default to either the &#039;Failure Summary&#039; or &#039;Failure Classification&#039; tabs.) &lt;br /&gt;
&lt;br /&gt;
The &#039;Job Details&#039; tab lists more detailed information from the job, including all of the files created and uploaded as part of the job running (eg, log files, screenshots of certain failures, etc). &lt;br /&gt;
&lt;br /&gt;
The &#039;Failure Summary&#039; and &#039;Failure Classification&#039; tabs show information a job&#039;s reported failures. They both list the same information, but are used slightly differently (&#039;Failure Summary&#039; handles all failures in a job as a whole, &#039;Failure Classification&#039; can handle each individual failure within a job on its own, and is part of the Autoclassify system.) These views will list each failure line, as well as any bugs from Bugzilla that match (or are at least similar in some way) the reported failure. If you&#039;re signed in, you&#039;ll also see extra controls for classifying the failures.&lt;br /&gt;
&lt;br /&gt;
The &#039;Annotations&#039; tab shows any classifications that have already been performed for the job. If you&#039;re signed in, you&#039;ll also see UI for removing classifications, in the case that something was classified incorrectly and you need to correct it.&lt;br /&gt;
&lt;br /&gt;
=== Pinboard ===&lt;br /&gt;
&lt;br /&gt;
The pinboard is an area where you can add one or more jobs and pair those with related bugs or comments/reasons, before you submit the classifications to the database. Typically you&#039;d use this on a single job at a time, but if multiple jobs are broken for the same reason (a patch broke a test completely, and you need to classify the failed jobs against the push that broke/fixed it, something in the build infrastructure is broken, causing lots of jobs to fail at once, etc), it can save time to pin them all at once and apply a single classification to them all with a single click. &amp;lt;&amp;lt;pinboard image here&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Job Colors ==&lt;br /&gt;
&lt;br /&gt;
Treeherder displays build and test results in different colors, depending on the job status:&lt;br /&gt;
&lt;br /&gt;
* lightgray = pending&lt;br /&gt;
* gray = running&lt;br /&gt;
* green = success&lt;br /&gt;
* orange = tests failed&lt;br /&gt;
* purple = infrastructure exception&lt;br /&gt;
* red = build error&lt;br /&gt;
* blue = build has been restarted&lt;br /&gt;
* pink =build was cancelled&lt;br /&gt;
&lt;br /&gt;
See the &#039;Job Notation&#039; section of the [https://treeherder.mozilla.org/userguide.html Treeherder&#039;s User Guide] for more information.&lt;br /&gt;
&lt;br /&gt;
= Useful Shortcuts =&lt;br /&gt;
&lt;br /&gt;
Treeherder has several useful keyboard shortcuts. As Sheriffs these shortcuts are super helpful:&lt;br /&gt;
&lt;br /&gt;
* u = Toggle showing only unclassified failures&lt;br /&gt;
* n = Highlight next unclassified failure&lt;br /&gt;
* p = Highlight previous unclassified failure&lt;br /&gt;
* spacebar = &#039;Pin&#039; the currently selected job to Treeherder&#039;s Pinboard&lt;br /&gt;
&lt;br /&gt;
A typical workflow would be to load Treeherder, hit &#039;u&#039; to switch to the only-unclassified-failures mode (gets rid of a bunch of passing jobs that we typically have no interest in), then use either &#039;n&#039; or &#039;p&#039; to cycle through each failed job, classifying them as we go until all failures have been classified.&lt;br /&gt;
&lt;br /&gt;
An overlay showing all of Treeherder&#039;s keyboard shortcuts can be shown by pressing the &#039;?&#039; key on your keyboard while Treeherder is open in your browser. (Note: Not the &#039;?&#039; menu in the site header, although the User Guide does list the shortcuts.)&lt;br /&gt;
&lt;br /&gt;
= Classifying/Starring jobs =&lt;br /&gt;
&lt;br /&gt;
== What does it do? ==&lt;br /&gt;
&lt;br /&gt;
# Submits the failure and classification to [https://brasstacks.mozilla.com/orangefactor/ OrangeFactor]. This dashboard helps track trends in classified failures, so failures that happen frequently (or suddenly start failing frequently) can be prioritized. &lt;br /&gt;
# Stores the classification comment and any associated bugs in Treeherders&#039;s database, so everyone viewing that tree/push can see that the failure has been starred (ie annotated with a comment and the star icon added next to the job symbol), so they know it has been dealt with.&lt;br /&gt;
&lt;br /&gt;
The list of jobs and clasifications updates on its own periodically as pushes and job information are reported to Treeherder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How are things starred/classified? ==&lt;br /&gt;
&lt;br /&gt;
You first need to sign in to Treeherder to classify failures and have the classifications recorded. Click the &amp;quot;Login/Register&amp;quot; button in the header and follow the login process.&lt;br /&gt;
&lt;br /&gt;
After you&#039;re signed in, open [https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&amp;amp;revision=67cd1ee26f2661fa5efe3d952485ab3c89af4271&amp;amp;selectedJob=114156916 this page]. It should open up a Treeherder page to a specific push, and will select a specific job. This will open the bottom panel, and one of the Failure tabs will be selected. This example will use the &#039;Failure Summary&#039; tab, as it is easier to explain to a newcomer than the &#039;Failure Classification&#039; tab. Click the &#039;Failure Summary&#039; tab yourself if it isn&#039;t already selected. The tab should look something like &amp;lt;&amp;lt;IMAGE GOES HERE&amp;gt;&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
In this example, the job reports three lines of failures. We&#039;re only interested in the first line, as the other two lines don&#039;t contain any actionable information (&amp;lt;&amp;lt;But why?&amp;gt;&amp;gt;). The first failure consists of the line &#039;&#039;&#039;1536 INFO TEST-UNEXPECTED-FAIL | toolkit/components/places/tests/browser/browser_bug248970.js | Check the total items count - Got 17, expected 16&#039;&#039;&#039;. From this, there are three pieces of information to consider.&lt;br /&gt;
* &amp;quot;TEST-UNEXPECTED-FAIL&amp;quot; is the kind of failure. There can be other failures like &amp;quot;TEST-UNEXPECTED-TIMEOUT&amp;quot; and &amp;quot;PROCESS-CRASH&amp;quot;.&lt;br /&gt;
* &amp;quot;toolkit/components/places/tests/browser/browser_bug248970.js&amp;quot; is the test file that reported the failure.&lt;br /&gt;
* &amp;quot;Check the total items count - Got 17, expected 16&amp;quot; is the error that occurred.&lt;br /&gt;
&lt;br /&gt;
Below the failure line can be one or more bugs from Bugzilla that match up with part or all of the failure line, with the matching portions between the two highlighted in &#039;&#039;&#039;bold&#039;&#039;&#039; text. In this example, the entire bug summary (except for the added word &amp;quot;Intermittent&amp;quot;) is in bold, meaning it matches up exactly with the failure line. (Careful, this only matches each individual word from the failure line to each word from the bug summary, so the order of words doesn&#039;t matter for highlighting purposes. You&#039;ll need to check yourself whether the two actually match for real.)&lt;br /&gt;
&lt;br /&gt;
Next to the bug summary is a button with a &#039;pin&#039; icon. If you click it, the job is added to the pinboard, and the bug number is added to the &#039;Bugs&#039; section of the pinboard. Once you&#039;re confident that the classification is correct, you can click the pinboard&#039;s &amp;quot;Save&amp;quot; button to submit the classification to Treeherder&#039;s database. If this job isn&#039;t already classified, the job symbol will get a star icon added next to it. &lt;br /&gt;
&lt;br /&gt;
That&#039;s it! You&#039;ve classified/starred a job! You can move on to a different failed job.&lt;br /&gt;
&lt;br /&gt;
= More Treeherder Resources =&lt;br /&gt;
&lt;br /&gt;
More information about the Treeherder project can be found [[Auto-tools/Projects/Treeherder|here]].&lt;/div&gt;</summary>
		<author><name>KWierso</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Treeherder&amp;diff=1175724</id>
		<title>Sheriffing/How To/Treeherder</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Treeherder&amp;diff=1175724"/>
		<updated>2017-07-14T01:27:22Z</updated>

		<summary type="html">&lt;p&gt;KWierso: Flesh it out&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;WIP&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Treeherder is the dashboard used by sheriffs and the rest of Mozilla to see build and test results. When you first open [https://treeherder.mozilla.org Treeherder], there will be a lot of information thrown at you all at once. This document should help explain what to do with it all.&lt;br /&gt;
&amp;lt;&amp;lt;TREEHERDER LANDING IMAGE&amp;gt;&amp;gt;&lt;br /&gt;
= Treeherder&#039;s UI =&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
At the top of the site&#039;s header section are some menus and buttons that can be useful. The &#039;Infra&#039; menu holds links to a few other Mozilla tools/websites. The &#039;Repos&#039; menu provides links to view other Mozilla source code repositories within Treeherder. The &#039;Filters&#039; menu has tools to filter down the jobs shown within Treeherder on various criteria. The &#039;?&#039; menu has various help pages for Treeherder. The &#039;Login/Register&#039; button lets you log in to Treeherder, allowing you to make changes to/with Treeherder&#039;s tools.&lt;br /&gt;
&lt;br /&gt;
The next row in the site header includes a menu showing the currently selected repository, with information about the state of the repository (closed/open/approval-required). The &#039;Tiers&#039; menu lets you select which [[Sheriffing/Job_Visibility_Policy|tiers]] of jobs are displayed. The &#039;Excluded Jobs&#039; button toggles whether jobs that are intentionally hidden from view are shown. The &#039;+&#039; or &#039;-&#039; button toggles whether groups of non-failing jobs are collapsed or expanded. The various colored circle buttons toggle the visibility of jobs in various states (red toggles failing jobs, green toggles passing jobs, etc). The textbox at the end is a quick-filter box, you can filter jobs by various properties from it without constructing a more exact filter from the &#039;Filters&#039; menu above. (Treeherder displays the count of jobs that are currently &amp;quot;unclassified&amp;quot; in the middle of this row. More on this below.)&lt;br /&gt;
&lt;br /&gt;
== Main Section ==&lt;br /&gt;
&lt;br /&gt;
Below the site header is the main part of Treeherder. This shows the recent commits to the currently selected repository grouped by the [http://mozilla-version-control-tools.readthedocs.io/en/latest/hgmo/pushlog.html pushes] they were landed in.&lt;br /&gt;
&lt;br /&gt;
The left side of each push shows the commit data for each commit in the push (eg, the commit hash, the commit author, and the commit message). This can be just a single commit or the push could contain up to hundreds of commits. (Treeherder caps the view at 20 commits for performance reasons. Click the &amp;quot;... and more&amp;quot; links to view the entire push&#039;s contents on hg.mozilla.org.)&lt;br /&gt;
&lt;br /&gt;
The right side of each push shows the build and test results for all of the jobs running with this push&#039;s commits. This is where most sheriffing work happens, as it is where job failures are reported, and the job failures need to be classified (also referred to as &#039;starred&#039; in various places).&lt;br /&gt;
&lt;br /&gt;
== Bottom Panel ==&lt;br /&gt;
&lt;br /&gt;
If you select one of the job symbols for a push, a panel at the bottom of the page will open. &amp;lt;&amp;lt;BOTTOM PANEL IMAGE&amp;gt;&amp;gt; The panel has a few sections with information about the job. &lt;br /&gt;
&lt;br /&gt;
On the left side of the panel, there are a few buttons that can be clicked to open the log file for the job as well as submit a request for the job to be re-run. Below those buttons is a list of information about the job, like the name of the job, when the job was requested by the build system, when the build system actually started working on the job, and when the job finished being run.&lt;br /&gt;
&lt;br /&gt;
On the right side of the panel are a number tabs with more information about the job. Depending on the state of the job you selected, the tab that gets selected by default will vary. (A green/passing job will default to the &#039;Job Details&#039; tab, a failing job will default to either the &#039;Failure Summary&#039; or &#039;Failure Classification&#039; tabs.) &lt;br /&gt;
&lt;br /&gt;
The &#039;Job Details&#039; tab lists more detailed information from the job, including all of the files created and uploaded as part of the job running (eg, log files, screenshots of certain failures, etc). &lt;br /&gt;
&lt;br /&gt;
The &#039;Failure Summary&#039; and &#039;Failure Classification&#039; tabs show information a job&#039;s reported failures. They both list the same information, but are used slightly differently (&#039;Failure Summary&#039; handles all failures in a job as a whole, &#039;Failure Classification&#039; can handle each individual failure within a job on its own, and is part of the Autoclassify system.) These views will list each failure line, as well as any bugs from Bugzilla that match (or are at least similar in some way) the reported failure. If you&#039;re signed in, you&#039;ll also see extra controls for classifying the failures.&lt;br /&gt;
&lt;br /&gt;
The &#039;Annotations&#039; tab shows any classifications that have already been performed for the job. If you&#039;re signed in, you&#039;ll also see UI for removing classifications, in the case that something was classified incorrectly and you need to correct it.&lt;br /&gt;
&lt;br /&gt;
=== Pinboard ===&lt;br /&gt;
&lt;br /&gt;
The pinboard is an area where you can add one or more jobs and pair those with related bugs or comments/reasons, before you submit the classifications to the database. Typically you&#039;d use this on a single job at a time, but if multiple jobs are broken for the same reason (a patch broke a test completely, and you need to classify the failed jobs against the push that broke/fixed it, something in the build infrastructure is broken, causing lots of jobs to fail at once, etc), it can save time to pin them all at once and apply a single classification to them all with a single click. &amp;lt;&amp;lt;pinboard image here&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Job Colors ==&lt;br /&gt;
&lt;br /&gt;
Treeherder displays build and test results in different colors, depending on the job status:&lt;br /&gt;
&lt;br /&gt;
* lightgray = pending&lt;br /&gt;
* gray = running&lt;br /&gt;
* green = success&lt;br /&gt;
* orange = tests failed&lt;br /&gt;
* purple = infrastructure exception&lt;br /&gt;
* red = build error&lt;br /&gt;
* blue = build has been restarted&lt;br /&gt;
* pink =build was cancelled&lt;br /&gt;
&lt;br /&gt;
See the &#039;Job Notation&#039; section of the [https://treeherder.mozilla.org/userguide.html Treeherder&#039;s User Guide] for more information.&lt;br /&gt;
&lt;br /&gt;
= Useful Shortcuts =&lt;br /&gt;
&lt;br /&gt;
Treeherder has several useful keyboard shortcuts. As Sheriffs these shortcuts are super helpful:&lt;br /&gt;
&lt;br /&gt;
* u = Toggle showing only unclassified failures&lt;br /&gt;
* n = Highlight next unclassified failure&lt;br /&gt;
* p = Highlight previous unclassified failure&lt;br /&gt;
* spacebar = &#039;Pin&#039; the currently selected job to Treeherder&#039;s Pinboard&lt;br /&gt;
&lt;br /&gt;
A typical workflow would be to load Treeherder, hit &#039;u&#039; to switch to the only-unclassified-failures mode (gets rid of a bunch of passing jobs that we typically have no interest in), then use either &#039;n&#039; or &#039;p&#039; to cycle through each failed job, classifying them as we go until all failures have been classified.&lt;br /&gt;
&lt;br /&gt;
An overlay showing all of Treeherder&#039;s keyboard shortcuts can be shown by pressing the &#039;?&#039; key on your keyboard while Treeherder is open in your browser. (Note: Not the &#039;?&#039; menu in the site header, although the User Guide does list the shortcuts.)&lt;br /&gt;
&lt;br /&gt;
= Classifying/Starring jobs =&lt;br /&gt;
&lt;br /&gt;
== What does it do? ==&lt;br /&gt;
&lt;br /&gt;
# Submits the failure and classification to [https://brasstacks.mozilla.com/orangefactor/ OrangeFactor]. This dashboard helps track trends in classified failures, so failures that happen frequently (or suddenly start failing frequently) can be prioritized. &lt;br /&gt;
# Stores the classification comment and any associated bugs in Treeherders&#039;s database, so everyone viewing that tree/push can see that the failure has been starred (ie annotated with a comment and the star icon added next to the job symbol), so they know it has been dealt with.&lt;br /&gt;
&lt;br /&gt;
The list of jobs and clasifications updates on its own periodically as pushes and job information are reported to Treeherder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How are things starred/classified? ==&lt;br /&gt;
&lt;br /&gt;
You first need to sign in to Treeherder to classify failures and have the classifications recorded. Click the &amp;quot;Login/Register&amp;quot; button in the header and follow the login process.&lt;br /&gt;
&lt;br /&gt;
After you&#039;re signed in, open [https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&amp;amp;revision=67cd1ee26f2661fa5efe3d952485ab3c89af4271&amp;amp;selectedJob=114156916 this page]. It should open up a Treeherder page to a specific push, and will select a specific job. This will open the bottom panel, and one of the Failure tabs will be selected. This example will use the &#039;Failure Summary&#039; tab, as it is easier to explain to a newcomer than the &#039;Failure Classification&#039; tab. Click the &#039;Failure Summary&#039; tab yourself if it isn&#039;t already selected. The tab should look something like &amp;lt;&amp;lt;IMAGE GOES HERE&amp;gt;&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
In this example, the job reports three lines of failures. We&#039;re only interested in the first line, as the other two lines don&#039;t contain any actionable information (&amp;lt;&amp;lt;But why?&amp;gt;&amp;gt;). The first failure consists of the line &#039;&#039;&#039;1536 INFO TEST-UNEXPECTED-FAIL | toolkit/components/places/tests/browser/browser_bug248970.js | Check the total items count - Got 17, expected 16&#039;&#039;&#039;. From this, there are three pieces of information to consider.&lt;br /&gt;
* &amp;quot;TEST-UNEXPECTED-FAIL&amp;quot; is the kind of failure. There can be other failures like &amp;quot;TEST-UNEXPECTED-TIMEOUT&amp;quot; and &amp;quot;PROCESS-CRASH&amp;quot;.&lt;br /&gt;
* &amp;quot;toolkit/components/places/tests/browser/browser_bug248970.js&amp;quot; is the test file that reported the failure.&lt;br /&gt;
* &amp;quot;Check the total items count - Got 17, expected 16&amp;quot; is the error that occurred.&lt;br /&gt;
&lt;br /&gt;
Below the failure line can be one or more bugs from Bugzilla that match up with part or all of the failure line, with the matching portions between the two highlighted in &#039;&#039;&#039;bold&#039;&#039;&#039; text. In this example, the entire bug summary (except for the added word &amp;quot;Intermittent&amp;quot;) is in bold, meaning it matches up exactly with the failure line. (Careful, this only matches each individual word from the failure line to each word from the bug summary, so the order of words doesn&#039;t matter for highlighting purposes. You&#039;ll need to check yourself whether the two actually match for real.)&lt;br /&gt;
&lt;br /&gt;
Next to the bug summary is a button with a &#039;pin&#039; icon. If you click it, the job is added to the pinboard, and the bug number is added to the &#039;Bugs&#039; section of the pinboard. Once you&#039;re confident that the classification is correct, you can click the pinboard&#039;s &amp;quot;Save&amp;quot; button to submit the classification to Treeherder&#039;s database. If this job isn&#039;t already classified, the job symbol will get a star icon added next to it. &lt;br /&gt;
&lt;br /&gt;
That&#039;s it! You&#039;ve classified/starred a job! You can move on to a different failed job.&lt;br /&gt;
&lt;br /&gt;
= More Treeherder Resources =&lt;br /&gt;
&lt;br /&gt;
More information about the Treeherder project can be found [[Auto-tools/Projects/Treeherder|here]].&lt;/div&gt;</summary>
		<author><name>KWierso</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Treeherder&amp;diff=1175715</id>
		<title>Sheriffing/How To/Treeherder</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Treeherder&amp;diff=1175715"/>
		<updated>2017-07-13T23:29:13Z</updated>

		<summary type="html">&lt;p&gt;KWierso: Initial WIP page copied from Sheriffing/How:To:TBPL with a few modifications&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;WIP&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Treeherder is the dashboard used by sheriffs and the rest of Mozilla to see build and test results. When you first open [https://treeherder.mozilla.org Treeherder], there will be a lot of information thrown at you all at once. This page should help explain what to do with it.&lt;br /&gt;
&amp;lt;&amp;lt;TREEHERDER LANDING IMAGE&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Starring jobs =&lt;br /&gt;
&lt;br /&gt;
== Starring does a few things ==&lt;br /&gt;
&lt;br /&gt;
# Submits the failure to OrangeFactor (think crashstats, but for intermittent failures)&lt;br /&gt;
# Stores the comment in Treeherders&#039;s database, so everyone viewing that tree/push can see that the failure has been starred (ie annotated with a comment and the asterisk next to the job), so they know it has been dealt with&lt;br /&gt;
&lt;br /&gt;
The list of jobs and annotations updates on its own periodically.&lt;br /&gt;
&lt;br /&gt;
Treeherder also displays an &amp;quot;unclassified&amp;quot; count in the top right of the UI and in the tab title.&lt;br /&gt;
&lt;br /&gt;
== Job Colors ==&lt;br /&gt;
&lt;br /&gt;
Treeherder displays build and test results in different colors, depending on the job status:&lt;br /&gt;
&lt;br /&gt;
* lightgray = pending&lt;br /&gt;
* gray = running&lt;br /&gt;
* green = success&lt;br /&gt;
* orange = tests failed&lt;br /&gt;
* purple = infrastructure exception&lt;br /&gt;
* red = build error&lt;br /&gt;
* blue = build has been restarted&lt;br /&gt;
* pink =build was cancelled&lt;br /&gt;
* black = unknown error&lt;br /&gt;
&lt;br /&gt;
== How are things starred? ==&lt;br /&gt;
&lt;br /&gt;
If you click on a non-green job symbol on Treeherder the box will appear bottom right of the ui, with the summary of the failure.&lt;br /&gt;
&lt;br /&gt;
It will will show log lines that match a set of hardcoded regexp.&lt;br /&gt;
&lt;br /&gt;
If bugzilla searches for keywords from those lines matched any bugs (bugs with the keyword &amp;quot;intermittent-failure&amp;quot;) then they will be displayed in the blue box to select a bug, you click the star next to that row.&lt;br /&gt;
&lt;br /&gt;
= Useful Shortcuts =&lt;br /&gt;
&lt;br /&gt;
Treeherder supports a series of useful Shortcuts. As Sheriffs these shortcuts are super helpful:&lt;br /&gt;
&lt;br /&gt;
* u = Toggle showing only unstarred failures&lt;br /&gt;
* n = Highlight next unstarred failure&lt;br /&gt;
* p = Highlight previous unstarred failure&lt;br /&gt;
&lt;br /&gt;
= More Technical Source =&lt;br /&gt;
&lt;br /&gt;
can be found here [[Auto-tools/Projects/Treeherder]]&lt;/div&gt;</summary>
		<author><name>KWierso</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=MozWeek/SanFrancisco2018&amp;diff=1166276</id>
		<title>MozWeek/SanFrancisco2018</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=MozWeek/SanFrancisco2018&amp;diff=1166276"/>
		<updated>2017-03-21T06:35:34Z</updated>

		<summary type="html">&lt;p&gt;KWierso: /* Dates, Location and Weather */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;What is it?&#039;&#039;&#039; -- Multiple team meetings, happening in the same city, at the same time + some opportunity to get together as one big group as well as with other teams as it makes sense. Then, on the last day, we have a fun social event for all, Mozilla-style! &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;The information on this wiki primarily applies to Full time and contractor staff. If you are a volunteer contributor or intern, please inquire to your coordinator. &#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;Dates, Location and Weather&#039;&#039;&#039;==&lt;br /&gt;
Monday, June 11 - Friday, June 16, 2018 (travel days are Monday the 11th &amp;amp; Saturday the 16th) in San Francisco, CA.&lt;br /&gt;
&lt;br /&gt;
We are staying at [http://www.marriott.com/hotels/travel/sfodt-san-francisco-marriott-marquis/ San Francisco Marriott Marquis].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;*For those countries where rest time is required on weekends (vs. work travel), Mozilla will cover a return on the next available work day, if you choose. This needs to be pre-approved and pre-arranged.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;Registration&#039;&#039;&#039;==&lt;br /&gt;
This is an invite-only event.&lt;/div&gt;</summary>
		<author><name>KWierso</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Unified_Repos&amp;diff=1139725</id>
		<title>Sheriffing/How To/Unified Repos</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Unified_Repos&amp;diff=1139725"/>
		<updated>2016-07-14T06:50:01Z</updated>

		<summary type="html">&lt;p&gt;KWierso: /* hg aliases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Unified Repos ==&lt;br /&gt;
* http://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/unifiedrepo.html&lt;br /&gt;
* https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/firefoxtree.html&lt;br /&gt;
&lt;br /&gt;
=== Setting up the repo ===&lt;br /&gt;
* Set up your ssh key yourself&lt;br /&gt;
* Install Mercurial 3.2 or higher&lt;br /&gt;
* Make a copy of your .hgrc file for safekeeping and delete the original&lt;br /&gt;
* hg clone https://hg.mozilla.org/mozilla-central&lt;br /&gt;
* cd mozilla-central&lt;br /&gt;
* ./mach mercurial-setup&lt;br /&gt;
Configure mercurial as desired &amp;lt;br /&amp;gt;&lt;br /&gt;
The following will pull all (or at least most) of the branches sheriffs need to have on hand:&lt;br /&gt;
* hg pull inbound &amp;amp;&amp;amp; hg pull fx-team &amp;amp;&amp;amp; hg pull aurora &amp;amp;&amp;amp; hg pull beta &amp;amp;&amp;amp; hg pull esr38&lt;br /&gt;
If you need other branches, you can find their names in the [https://hg.mozilla.org/hgcustom/version-control-tools/file/default/pylib/mozautomation/mozautomation/repository.py firefoxtree extension source].&lt;br /&gt;
&lt;br /&gt;
You should now have everything set up for proper use! &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Maybe rename the folder from &amp;quot;mozilla-central&amp;quot; to &amp;quot;unifiedrepo&amp;quot; or something to make it clear it&#039;s more than just mozilla-central?&lt;br /&gt;
&lt;br /&gt;
The `hg fxheads` command should list references to each of the relevant branch names, and the current revision and commit message for each.&lt;br /&gt;
&lt;br /&gt;
With [https://bugzilla.mozilla.org/show_bug.cgi?id=1116861 bug 1116861] landed in version-control-tools, you can now use the following commands to pull from groups of repositories with a single command:&lt;br /&gt;
* hg pull fxtrees # this will pull from all branches listed with the fxheads command&lt;br /&gt;
* hg pull integration # this will pull from the mozilla-inbound, b2g-inbound, and fx-team branches&lt;br /&gt;
* hg pull releases # this will pull from pretty much every release branch (FYI: including old, unused branches)&lt;br /&gt;
&lt;br /&gt;
=== Merges ===&lt;br /&gt;
This assumes you have your unified repo all set up so that `hg fxheads` lists each of central, b2ginbound, fx-team, and inbound.&lt;br /&gt;
&lt;br /&gt;
To merge a specific non-tip &amp;lt;revision&amp;gt; from mozilla-inbound to mozilla-central:&lt;br /&gt;
# hg pull central&lt;br /&gt;
# hg pull inbound&lt;br /&gt;
# hg up central&lt;br /&gt;
# hg merge -r &amp;lt;revision&amp;gt;&lt;br /&gt;
# hg commit -m &amp;quot;Merge mozilla-inbound to mozilla-central a=merge&amp;quot;&lt;br /&gt;
# hg push -r . central&lt;br /&gt;
&lt;br /&gt;
To merge mozilla-central into mozilla-inbound:&lt;br /&gt;
# hg pull central&lt;br /&gt;
# hg pull inbound&lt;br /&gt;
# hg up inbound&lt;br /&gt;
# hg merge central&lt;br /&gt;
# hg commit -m &amp;quot;Merge mozilla-central to mozilla-inbound a=merge&amp;quot;&lt;br /&gt;
# hg push -r . inbound&lt;br /&gt;
&lt;br /&gt;
* If the `hg merge central` command results in &amp;quot;abort: nothing to merge&amp;quot;, you should instead use `hg update -r &amp;lt;mozilla-central&#039;s tip revision&amp;gt;` to do a non-merging update, then you can do `hg push -r . inbound` to push it as usual.&lt;br /&gt;
&lt;br /&gt;
=== Checkin-neededs ===&lt;br /&gt;
This assumes we&#039;re checking things in to fx-team. Replace fx-team with another branch name as needed.&lt;br /&gt;
&lt;br /&gt;
===== Single repository and single set of patches =====&lt;br /&gt;
Update fx-team and prepare for the patches:&lt;br /&gt;
* hg pull fx-team&lt;br /&gt;
* hg up fx-team&lt;br /&gt;
* hg bookmark fx-team-checkins&lt;br /&gt;
Import the patches:&lt;br /&gt;
* hg import https://link.to/correct/checkin-needed.patch&lt;br /&gt;
* Repeat ^ as needed for all fx-team checkin-needed patches&lt;br /&gt;
Verify your outgoing changes:&lt;br /&gt;
* hg out -r . fx-team&lt;br /&gt;
If you haven&#039;t lost a push race:&lt;br /&gt;
* hg push -r . fx-team&lt;br /&gt;
If you lost a push race:&lt;br /&gt;
* hg pull fx-team&lt;br /&gt;
* hg rebase -d fx-team&lt;br /&gt;
* hg push -r . fx-team&lt;br /&gt;
Delete your no longer needed bookmark:&lt;br /&gt;
* hg bookmark -d fx-team-checkins&lt;br /&gt;
&lt;br /&gt;
===== Multiple repositories with a single set of patches each =====&lt;br /&gt;
You can set up multiple sets of patches at once against multiple repositories:&lt;br /&gt;
Update fx-team&lt;br /&gt;
* hg pull fx-team &amp;amp;&amp;amp; hg up fx-team&lt;br /&gt;
Create a bookmark to base your fx-team checkin-needed patches&lt;br /&gt;
* hg bookmark fxteam-checkins&lt;br /&gt;
Import a bunch of patches against fx-team&lt;br /&gt;
* hg import &amp;lt;patch1&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch2&amp;gt;&lt;br /&gt;
Update inbound and make a bookmark for inbound patches&lt;br /&gt;
* hg pull inbound &amp;amp;&amp;amp; hg up inbound &amp;amp;&amp;amp; hg bookmark inbound-checkins&lt;br /&gt;
Import some patches against inbound&lt;br /&gt;
* hg import &amp;lt;patch3&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch4&amp;gt;&lt;br /&gt;
See what you&#039;d be pushing to inbound and push it&lt;br /&gt;
* hg out -r . inbound # this will only show patch3 and patch4&lt;br /&gt;
* hg push -r . inbound # this only pushes patch3 and patch4&lt;br /&gt;
* hg bookmark -d inbound-checkins # delete inbound&#039;s checkin bookmark as it&#039;s not needed&lt;br /&gt;
Go back to your fx-team checkins and add another patch to the bookmark, then push it&lt;br /&gt;
* hg up fxteam-checkins&lt;br /&gt;
* hg import &amp;lt;patch5&amp;gt;&lt;br /&gt;
* hg out -r . fx-team # this will be patch1, patch2, and patch5&lt;br /&gt;
* hg push -r . fx-team&lt;br /&gt;
* hg bookmark -d fxteam-checkins&lt;br /&gt;
&lt;br /&gt;
===== Single repository with multiple sets of patches =====&lt;br /&gt;
Or have multiple sets of patches against a single repository:&lt;br /&gt;
Update fx-team&lt;br /&gt;
* hg pull fx-team &amp;amp;&amp;amp; hg up fx-team&lt;br /&gt;
Make the first bookmark/set&lt;br /&gt;
* hg bookmark fxteam-checkins-1&lt;br /&gt;
* hg import &amp;lt;patch1&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch2&amp;gt;&lt;br /&gt;
Make the second set&lt;br /&gt;
* hg up fx-team &amp;amp;&amp;amp; hg bookmark fxteam-checkins-2&lt;br /&gt;
* hg import &amp;lt;patch3&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch4&amp;gt;&lt;br /&gt;
See what&#039;s going to be pushed in each&lt;br /&gt;
* hg out -r . fx-team # patch3 and patch4&lt;br /&gt;
* hg up fxteam-checkins-1 &amp;amp;&amp;amp; hg out -r . fx-team # patch1 and patch2&lt;br /&gt;
Push the first set&lt;br /&gt;
* hg push -r . fx-team # pushes patch1 and patch2&lt;br /&gt;
Get ready to push the second set&lt;br /&gt;
* hg up fxteam-checkins-2&lt;br /&gt;
* hg rebase -d fx-team # Rebase the second set onto the now-pushed first set&lt;br /&gt;
And push it&lt;br /&gt;
* hg push -r . fx-team # pushes patch3 and patch4&lt;br /&gt;
Delete the now-unneeded bookmarks&lt;br /&gt;
* hg bookmark -d fxteam-checkins-1&lt;br /&gt;
* hg bookmark -d fxteam-checkins-2&lt;br /&gt;
&lt;br /&gt;
=== Uplifts ===&lt;br /&gt;
If branch-specific patches are posted, follow the checkin-needed instructions above, importing the patches onto the release branch.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re uplifting directly from an m-c checkin to aurora:&lt;br /&gt;
&lt;br /&gt;
Pull and update to prepare for the uplifts:&lt;br /&gt;
* hg pull central&lt;br /&gt;
* hg pull aurora&lt;br /&gt;
* hg up aurora&lt;br /&gt;
Graft the mc commit and bring up the editor to edit the commit message, adding &amp;quot;a=foo&amp;quot; as needed:&lt;br /&gt;
* hg graft --edit -r &amp;lt;revision&amp;gt;&lt;br /&gt;
Repeat the previous step as needed for all uplifts as needed.&lt;br /&gt;
Verify the outgoing changes and push:&lt;br /&gt;
* hg out -r . aurora&lt;br /&gt;
* hg push -r . aurora&lt;br /&gt;
&lt;br /&gt;
You can graft a range of commits at once if that&#039;s easier:&lt;br /&gt;
* hg graft -r &amp;lt;toprevision&amp;gt;::&amp;lt;bottomrevision&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Read the documentation for [https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/unifiedrepo.html#uplifting-backporting-commits graft] for further help.&lt;br /&gt;
&lt;br /&gt;
=== Backouts ===&lt;br /&gt;
Better tools are coming:&lt;br /&gt;
* https://bugzilla.mozilla.org/show_bug.cgi?id=1117632&lt;br /&gt;
* https://bugzilla.mozilla.org/show_bug.cgi?id=1121211&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The standard backout command makes backing out revisions more difficult than it should, as it won&#039;t pre-fill the backout commit message with a bug number:&lt;br /&gt;
* Copy backout &amp;lt;revision&amp;gt; from treeherder, note the bug &amp;lt;number&amp;gt;, and remember the &amp;lt;reason&amp;gt;&lt;br /&gt;
* hg backout -r &amp;lt;revision&amp;gt;&lt;br /&gt;
** This should open up your editor with a completely empty commit message. Type in the backout message like &amp;quot;Backout revision &amp;lt;revision&amp;gt; (bug &amp;lt;number&amp;gt;) for &amp;lt;reason&amp;gt;&amp;quot; (possibly with &amp;quot;CLOSED TREE&amp;quot; in there to get around a closure hook).&lt;br /&gt;
* hg push -r . &amp;lt;tree&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://hg.mozilla.org/hgcustom/version-control-tools/file/4e7ab9638cf0/hgext/qbackout qbackout] can still be used, though you will want to use `hg oops` in place of `hg qbackout` (eg if you use `hg share` to get multiple working directories, qbackout and other uses of mq do not play nice with shared repos):&lt;br /&gt;
* Copy the backout &amp;lt;revision&amp;gt; from treeherder&lt;br /&gt;
* hg oops -e -r &amp;lt;revision&amp;gt;&lt;br /&gt;
** This should open up your editor with a prepopulated commit message like &amp;quot;Backed out &amp;lt;revision&amp;gt; (bug &amp;lt;number&amp;gt;)&amp;quot;. Add in the &amp;lt;reason&amp;gt; and possibly &amp;quot;CLOSED TREE&amp;quot; to get around a closure hook.&lt;br /&gt;
* hg out -r . &amp;lt;tree&amp;gt;&lt;br /&gt;
** to double-check what you will be pushing&lt;br /&gt;
* hg push -r . &amp;lt;tree&amp;gt;&lt;br /&gt;
&lt;br /&gt;
qbackout can also back out a range of commits in a single backout commit:&lt;br /&gt;
* hg oops -e -s -r &amp;lt;toprevision&amp;gt;:&amp;lt;bottomrevision&amp;gt;&lt;br /&gt;
** This will open your editor with a prepopulated commit message like &amp;quot;Backed out &amp;lt;toprevision&amp;gt;,&amp;lt;anymiddlerevisions&amp;gt;,&amp;lt;bottomrevision&amp;gt; (bug &amp;lt;number&amp;gt;,any other bug &amp;lt;numbers&amp;gt;)&amp;quot;. Add in the &amp;lt;reason&amp;gt; and possibly &amp;quot;CLOSED TREE&amp;quot; to get around a closure hook.&lt;br /&gt;
* hg push -r . &amp;lt;tree&amp;gt;&lt;br /&gt;
(Omit oops&#039;s -s flag to back out each individual revision in the range as a separate commit.)&lt;br /&gt;
&lt;br /&gt;
==== Revert a backout ====&lt;br /&gt;
* `hg graft`, see https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/common.html#revive-a-commit-that-was-backed-out&lt;br /&gt;
&lt;br /&gt;
=== Rebasing after losing a push race ===&lt;br /&gt;
This assumes you have commits you&#039;re attempting to push to mozilla-inbound when you lose a push race with someone. Change `inbound` to the correct branch name as needed.&lt;br /&gt;
&lt;br /&gt;
* hg pull inbound &lt;br /&gt;
* hg rebase -d inbound &lt;br /&gt;
* hg push -r . inbound&lt;br /&gt;
&lt;br /&gt;
=== Recovering from mistakes ===&lt;br /&gt;
&amp;lt;big&amp;gt;WARNING:&amp;lt;/big&amp;gt; This will strip out any commits that haven&#039;t been pushed to the remote repositories, regardless of what branch/label/tag those commits are on. (So if you have local changes on inbound and run this command to strip something bad on fx-team, both inbound and fx-team will be stripped.) Only do this if you don&#039;t care about any of those commits!&lt;br /&gt;
* hg strip &#039;not public()&#039;&lt;br /&gt;
&lt;br /&gt;
You may also need to use some combination of the following to get things back to a known-good state:&lt;br /&gt;
* hg purge # http://mercurial.selenic.com/wiki/PurgeExtension&lt;br /&gt;
* hg up -C&lt;br /&gt;
&lt;br /&gt;
=== See what you&#039;re about to push ===&lt;br /&gt;
`hg out` without any flags added will show you a LOT of unrelated commits. To see just what you&#039;ll be pushing to a given branch, use `hg out -r . &amp;lt;branch&amp;gt;`&lt;br /&gt;
* hg out -r . inbound&lt;br /&gt;
** This will only display the things you&#039;re about to push to the inbound branch&lt;br /&gt;
&lt;br /&gt;
=== View incoming changes ===&lt;br /&gt;
Since your unified repo will likely have all changesets from the various branches pulled locally, `hg in &amp;lt;somebranch&amp;gt; -r &amp;lt;somerev&amp;gt;` will likely not help you see what would be pulled into your current branch from &amp;lt;somebranch&amp;gt; up to that &amp;lt;somerev&amp;gt;.&lt;br /&gt;
Instead, you can use the following to print out the equivalent. Say you want to see what would be merged onto mozilla-central from b2g-inbound&#039;s revision ca142ec8ba0f:&lt;br /&gt;
&lt;br /&gt;
Make sure m-c is fully up to date:&lt;br /&gt;
* hg pull central &lt;br /&gt;
* hg up central &lt;br /&gt;
Get all of b2g-inbound&#039;s changesets:&lt;br /&gt;
* hg pull b2ginbound&lt;br /&gt;
Do a preview of the merge without actually performing the merge:&lt;br /&gt;
* hg merge -r ca142ec8ba0f -P&lt;br /&gt;
This will print out everything on b2g-inbound (up to and including revision ca142ec8ba0f) that is not already on mozilla-central.&lt;br /&gt;
&lt;br /&gt;
=== See the log for a particular branch ===&lt;br /&gt;
* hg log -fr [branch]&lt;br /&gt;
&lt;br /&gt;
= Extras =&lt;br /&gt;
== hg aliases ==&lt;br /&gt;
=== mergetocentral/mergetointegration ===&lt;br /&gt;
I set up the following aliases in my global .hgrc file to make merging things around trunk a little faster:&lt;br /&gt;
 [alias]&lt;br /&gt;
 # merge tree $1, revision $2 to central, optionally appending $3 (for &amp;quot;CLOSED TREE&amp;quot;, etc)&lt;br /&gt;
 mergetocentral = !$HG pull central ; $HG up central ; $HG pull $1 ; $HG merge $2 ; $HG commit -m &amp;quot;Merge $1 to central, a=merge $3&amp;quot; ; $HG push -r . central&lt;br /&gt;
 # merge central tip to tree $1, optionally appending $2 (for &amp;quot;CLOSED TREE&amp;quot;, etc)&lt;br /&gt;
 mergetointegration = !$HG pull central ; $HG pull $1 ; $HG up $1 ; $HG merge central ; $HG commit -m &amp;quot;Merge m-c to $1, a=merge $2&amp;quot; ; $HG push -r . $1&lt;br /&gt;
&lt;br /&gt;
With these set up, I can merge fx-team&#039;s revision 04a3d9130aa0 over to mozilla-central with the following command:&lt;br /&gt;
 hg mergetocentral fx-team 04a3d9130aa0&lt;br /&gt;
and then I can merge mozilla-central&#039;s tip back to fx-team with the following command:&lt;br /&gt;
 hg mergetointegration fx-team&lt;br /&gt;
This cuts down on a lot of repetitive typing, saving a bit of time.&lt;br /&gt;
&lt;br /&gt;
=== rbimport ===&lt;br /&gt;
For merging from reviewboard patches, there&#039;s this alias&lt;br /&gt;
  rbimport = !hg transplant -e -s https://reviewboard-hg.mozilla.org/gecko -b $1&lt;br /&gt;
&lt;br /&gt;
Then, it&#039;s matter of importing the right hash like the following command:&lt;br /&gt;
  hg rbimport dd1462ba321db983061b94e30cee92b6bd81e908&lt;/div&gt;</summary>
		<author><name>KWierso</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Unified_Repos&amp;diff=1139724</id>
		<title>Sheriffing/How To/Unified Repos</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Unified_Repos&amp;diff=1139724"/>
		<updated>2016-07-14T06:49:20Z</updated>

		<summary type="html">&lt;p&gt;KWierso: /* hg aliases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Unified Repos ==&lt;br /&gt;
* http://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/unifiedrepo.html&lt;br /&gt;
* https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/firefoxtree.html&lt;br /&gt;
&lt;br /&gt;
=== Setting up the repo ===&lt;br /&gt;
* Set up your ssh key yourself&lt;br /&gt;
* Install Mercurial 3.2 or higher&lt;br /&gt;
* Make a copy of your .hgrc file for safekeeping and delete the original&lt;br /&gt;
* hg clone https://hg.mozilla.org/mozilla-central&lt;br /&gt;
* cd mozilla-central&lt;br /&gt;
* ./mach mercurial-setup&lt;br /&gt;
Configure mercurial as desired &amp;lt;br /&amp;gt;&lt;br /&gt;
The following will pull all (or at least most) of the branches sheriffs need to have on hand:&lt;br /&gt;
* hg pull inbound &amp;amp;&amp;amp; hg pull fx-team &amp;amp;&amp;amp; hg pull aurora &amp;amp;&amp;amp; hg pull beta &amp;amp;&amp;amp; hg pull esr38&lt;br /&gt;
If you need other branches, you can find their names in the [https://hg.mozilla.org/hgcustom/version-control-tools/file/default/pylib/mozautomation/mozautomation/repository.py firefoxtree extension source].&lt;br /&gt;
&lt;br /&gt;
You should now have everything set up for proper use! &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Maybe rename the folder from &amp;quot;mozilla-central&amp;quot; to &amp;quot;unifiedrepo&amp;quot; or something to make it clear it&#039;s more than just mozilla-central?&lt;br /&gt;
&lt;br /&gt;
The `hg fxheads` command should list references to each of the relevant branch names, and the current revision and commit message for each.&lt;br /&gt;
&lt;br /&gt;
With [https://bugzilla.mozilla.org/show_bug.cgi?id=1116861 bug 1116861] landed in version-control-tools, you can now use the following commands to pull from groups of repositories with a single command:&lt;br /&gt;
* hg pull fxtrees # this will pull from all branches listed with the fxheads command&lt;br /&gt;
* hg pull integration # this will pull from the mozilla-inbound, b2g-inbound, and fx-team branches&lt;br /&gt;
* hg pull releases # this will pull from pretty much every release branch (FYI: including old, unused branches)&lt;br /&gt;
&lt;br /&gt;
=== Merges ===&lt;br /&gt;
This assumes you have your unified repo all set up so that `hg fxheads` lists each of central, b2ginbound, fx-team, and inbound.&lt;br /&gt;
&lt;br /&gt;
To merge a specific non-tip &amp;lt;revision&amp;gt; from mozilla-inbound to mozilla-central:&lt;br /&gt;
# hg pull central&lt;br /&gt;
# hg pull inbound&lt;br /&gt;
# hg up central&lt;br /&gt;
# hg merge -r &amp;lt;revision&amp;gt;&lt;br /&gt;
# hg commit -m &amp;quot;Merge mozilla-inbound to mozilla-central a=merge&amp;quot;&lt;br /&gt;
# hg push -r . central&lt;br /&gt;
&lt;br /&gt;
To merge mozilla-central into mozilla-inbound:&lt;br /&gt;
# hg pull central&lt;br /&gt;
# hg pull inbound&lt;br /&gt;
# hg up inbound&lt;br /&gt;
# hg merge central&lt;br /&gt;
# hg commit -m &amp;quot;Merge mozilla-central to mozilla-inbound a=merge&amp;quot;&lt;br /&gt;
# hg push -r . inbound&lt;br /&gt;
&lt;br /&gt;
* If the `hg merge central` command results in &amp;quot;abort: nothing to merge&amp;quot;, you should instead use `hg update -r &amp;lt;mozilla-central&#039;s tip revision&amp;gt;` to do a non-merging update, then you can do `hg push -r . inbound` to push it as usual.&lt;br /&gt;
&lt;br /&gt;
=== Checkin-neededs ===&lt;br /&gt;
This assumes we&#039;re checking things in to fx-team. Replace fx-team with another branch name as needed.&lt;br /&gt;
&lt;br /&gt;
===== Single repository and single set of patches =====&lt;br /&gt;
Update fx-team and prepare for the patches:&lt;br /&gt;
* hg pull fx-team&lt;br /&gt;
* hg up fx-team&lt;br /&gt;
* hg bookmark fx-team-checkins&lt;br /&gt;
Import the patches:&lt;br /&gt;
* hg import https://link.to/correct/checkin-needed.patch&lt;br /&gt;
* Repeat ^ as needed for all fx-team checkin-needed patches&lt;br /&gt;
Verify your outgoing changes:&lt;br /&gt;
* hg out -r . fx-team&lt;br /&gt;
If you haven&#039;t lost a push race:&lt;br /&gt;
* hg push -r . fx-team&lt;br /&gt;
If you lost a push race:&lt;br /&gt;
* hg pull fx-team&lt;br /&gt;
* hg rebase -d fx-team&lt;br /&gt;
* hg push -r . fx-team&lt;br /&gt;
Delete your no longer needed bookmark:&lt;br /&gt;
* hg bookmark -d fx-team-checkins&lt;br /&gt;
&lt;br /&gt;
===== Multiple repositories with a single set of patches each =====&lt;br /&gt;
You can set up multiple sets of patches at once against multiple repositories:&lt;br /&gt;
Update fx-team&lt;br /&gt;
* hg pull fx-team &amp;amp;&amp;amp; hg up fx-team&lt;br /&gt;
Create a bookmark to base your fx-team checkin-needed patches&lt;br /&gt;
* hg bookmark fxteam-checkins&lt;br /&gt;
Import a bunch of patches against fx-team&lt;br /&gt;
* hg import &amp;lt;patch1&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch2&amp;gt;&lt;br /&gt;
Update inbound and make a bookmark for inbound patches&lt;br /&gt;
* hg pull inbound &amp;amp;&amp;amp; hg up inbound &amp;amp;&amp;amp; hg bookmark inbound-checkins&lt;br /&gt;
Import some patches against inbound&lt;br /&gt;
* hg import &amp;lt;patch3&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch4&amp;gt;&lt;br /&gt;
See what you&#039;d be pushing to inbound and push it&lt;br /&gt;
* hg out -r . inbound # this will only show patch3 and patch4&lt;br /&gt;
* hg push -r . inbound # this only pushes patch3 and patch4&lt;br /&gt;
* hg bookmark -d inbound-checkins # delete inbound&#039;s checkin bookmark as it&#039;s not needed&lt;br /&gt;
Go back to your fx-team checkins and add another patch to the bookmark, then push it&lt;br /&gt;
* hg up fxteam-checkins&lt;br /&gt;
* hg import &amp;lt;patch5&amp;gt;&lt;br /&gt;
* hg out -r . fx-team # this will be patch1, patch2, and patch5&lt;br /&gt;
* hg push -r . fx-team&lt;br /&gt;
* hg bookmark -d fxteam-checkins&lt;br /&gt;
&lt;br /&gt;
===== Single repository with multiple sets of patches =====&lt;br /&gt;
Or have multiple sets of patches against a single repository:&lt;br /&gt;
Update fx-team&lt;br /&gt;
* hg pull fx-team &amp;amp;&amp;amp; hg up fx-team&lt;br /&gt;
Make the first bookmark/set&lt;br /&gt;
* hg bookmark fxteam-checkins-1&lt;br /&gt;
* hg import &amp;lt;patch1&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch2&amp;gt;&lt;br /&gt;
Make the second set&lt;br /&gt;
* hg up fx-team &amp;amp;&amp;amp; hg bookmark fxteam-checkins-2&lt;br /&gt;
* hg import &amp;lt;patch3&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch4&amp;gt;&lt;br /&gt;
See what&#039;s going to be pushed in each&lt;br /&gt;
* hg out -r . fx-team # patch3 and patch4&lt;br /&gt;
* hg up fxteam-checkins-1 &amp;amp;&amp;amp; hg out -r . fx-team # patch1 and patch2&lt;br /&gt;
Push the first set&lt;br /&gt;
* hg push -r . fx-team # pushes patch1 and patch2&lt;br /&gt;
Get ready to push the second set&lt;br /&gt;
* hg up fxteam-checkins-2&lt;br /&gt;
* hg rebase -d fx-team # Rebase the second set onto the now-pushed first set&lt;br /&gt;
And push it&lt;br /&gt;
* hg push -r . fx-team # pushes patch3 and patch4&lt;br /&gt;
Delete the now-unneeded bookmarks&lt;br /&gt;
* hg bookmark -d fxteam-checkins-1&lt;br /&gt;
* hg bookmark -d fxteam-checkins-2&lt;br /&gt;
&lt;br /&gt;
=== Uplifts ===&lt;br /&gt;
If branch-specific patches are posted, follow the checkin-needed instructions above, importing the patches onto the release branch.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re uplifting directly from an m-c checkin to aurora:&lt;br /&gt;
&lt;br /&gt;
Pull and update to prepare for the uplifts:&lt;br /&gt;
* hg pull central&lt;br /&gt;
* hg pull aurora&lt;br /&gt;
* hg up aurora&lt;br /&gt;
Graft the mc commit and bring up the editor to edit the commit message, adding &amp;quot;a=foo&amp;quot; as needed:&lt;br /&gt;
* hg graft --edit -r &amp;lt;revision&amp;gt;&lt;br /&gt;
Repeat the previous step as needed for all uplifts as needed.&lt;br /&gt;
Verify the outgoing changes and push:&lt;br /&gt;
* hg out -r . aurora&lt;br /&gt;
* hg push -r . aurora&lt;br /&gt;
&lt;br /&gt;
You can graft a range of commits at once if that&#039;s easier:&lt;br /&gt;
* hg graft -r &amp;lt;toprevision&amp;gt;::&amp;lt;bottomrevision&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Read the documentation for [https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/unifiedrepo.html#uplifting-backporting-commits graft] for further help.&lt;br /&gt;
&lt;br /&gt;
=== Backouts ===&lt;br /&gt;
Better tools are coming:&lt;br /&gt;
* https://bugzilla.mozilla.org/show_bug.cgi?id=1117632&lt;br /&gt;
* https://bugzilla.mozilla.org/show_bug.cgi?id=1121211&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The standard backout command makes backing out revisions more difficult than it should, as it won&#039;t pre-fill the backout commit message with a bug number:&lt;br /&gt;
* Copy backout &amp;lt;revision&amp;gt; from treeherder, note the bug &amp;lt;number&amp;gt;, and remember the &amp;lt;reason&amp;gt;&lt;br /&gt;
* hg backout -r &amp;lt;revision&amp;gt;&lt;br /&gt;
** This should open up your editor with a completely empty commit message. Type in the backout message like &amp;quot;Backout revision &amp;lt;revision&amp;gt; (bug &amp;lt;number&amp;gt;) for &amp;lt;reason&amp;gt;&amp;quot; (possibly with &amp;quot;CLOSED TREE&amp;quot; in there to get around a closure hook).&lt;br /&gt;
* hg push -r . &amp;lt;tree&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://hg.mozilla.org/hgcustom/version-control-tools/file/4e7ab9638cf0/hgext/qbackout qbackout] can still be used, though you will want to use `hg oops` in place of `hg qbackout` (eg if you use `hg share` to get multiple working directories, qbackout and other uses of mq do not play nice with shared repos):&lt;br /&gt;
* Copy the backout &amp;lt;revision&amp;gt; from treeherder&lt;br /&gt;
* hg oops -e -r &amp;lt;revision&amp;gt;&lt;br /&gt;
** This should open up your editor with a prepopulated commit message like &amp;quot;Backed out &amp;lt;revision&amp;gt; (bug &amp;lt;number&amp;gt;)&amp;quot;. Add in the &amp;lt;reason&amp;gt; and possibly &amp;quot;CLOSED TREE&amp;quot; to get around a closure hook.&lt;br /&gt;
* hg out -r . &amp;lt;tree&amp;gt;&lt;br /&gt;
** to double-check what you will be pushing&lt;br /&gt;
* hg push -r . &amp;lt;tree&amp;gt;&lt;br /&gt;
&lt;br /&gt;
qbackout can also back out a range of commits in a single backout commit:&lt;br /&gt;
* hg oops -e -s -r &amp;lt;toprevision&amp;gt;:&amp;lt;bottomrevision&amp;gt;&lt;br /&gt;
** This will open your editor with a prepopulated commit message like &amp;quot;Backed out &amp;lt;toprevision&amp;gt;,&amp;lt;anymiddlerevisions&amp;gt;,&amp;lt;bottomrevision&amp;gt; (bug &amp;lt;number&amp;gt;,any other bug &amp;lt;numbers&amp;gt;)&amp;quot;. Add in the &amp;lt;reason&amp;gt; and possibly &amp;quot;CLOSED TREE&amp;quot; to get around a closure hook.&lt;br /&gt;
* hg push -r . &amp;lt;tree&amp;gt;&lt;br /&gt;
(Omit oops&#039;s -s flag to back out each individual revision in the range as a separate commit.)&lt;br /&gt;
&lt;br /&gt;
==== Revert a backout ====&lt;br /&gt;
* `hg graft`, see https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/common.html#revive-a-commit-that-was-backed-out&lt;br /&gt;
&lt;br /&gt;
=== Rebasing after losing a push race ===&lt;br /&gt;
This assumes you have commits you&#039;re attempting to push to mozilla-inbound when you lose a push race with someone. Change `inbound` to the correct branch name as needed.&lt;br /&gt;
&lt;br /&gt;
* hg pull inbound &lt;br /&gt;
* hg rebase -d inbound &lt;br /&gt;
* hg push -r . inbound&lt;br /&gt;
&lt;br /&gt;
=== Recovering from mistakes ===&lt;br /&gt;
&amp;lt;big&amp;gt;WARNING:&amp;lt;/big&amp;gt; This will strip out any commits that haven&#039;t been pushed to the remote repositories, regardless of what branch/label/tag those commits are on. (So if you have local changes on inbound and run this command to strip something bad on fx-team, both inbound and fx-team will be stripped.) Only do this if you don&#039;t care about any of those commits!&lt;br /&gt;
* hg strip &#039;not public()&#039;&lt;br /&gt;
&lt;br /&gt;
You may also need to use some combination of the following to get things back to a known-good state:&lt;br /&gt;
* hg purge # http://mercurial.selenic.com/wiki/PurgeExtension&lt;br /&gt;
* hg up -C&lt;br /&gt;
&lt;br /&gt;
=== See what you&#039;re about to push ===&lt;br /&gt;
`hg out` without any flags added will show you a LOT of unrelated commits. To see just what you&#039;ll be pushing to a given branch, use `hg out -r . &amp;lt;branch&amp;gt;`&lt;br /&gt;
* hg out -r . inbound&lt;br /&gt;
** This will only display the things you&#039;re about to push to the inbound branch&lt;br /&gt;
&lt;br /&gt;
=== View incoming changes ===&lt;br /&gt;
Since your unified repo will likely have all changesets from the various branches pulled locally, `hg in &amp;lt;somebranch&amp;gt; -r &amp;lt;somerev&amp;gt;` will likely not help you see what would be pulled into your current branch from &amp;lt;somebranch&amp;gt; up to that &amp;lt;somerev&amp;gt;.&lt;br /&gt;
Instead, you can use the following to print out the equivalent. Say you want to see what would be merged onto mozilla-central from b2g-inbound&#039;s revision ca142ec8ba0f:&lt;br /&gt;
&lt;br /&gt;
Make sure m-c is fully up to date:&lt;br /&gt;
* hg pull central &lt;br /&gt;
* hg up central &lt;br /&gt;
Get all of b2g-inbound&#039;s changesets:&lt;br /&gt;
* hg pull b2ginbound&lt;br /&gt;
Do a preview of the merge without actually performing the merge:&lt;br /&gt;
* hg merge -r ca142ec8ba0f -P&lt;br /&gt;
This will print out everything on b2g-inbound (up to and including revision ca142ec8ba0f) that is not already on mozilla-central.&lt;br /&gt;
&lt;br /&gt;
=== See the log for a particular branch ===&lt;br /&gt;
* hg log -fr [branch]&lt;br /&gt;
&lt;br /&gt;
= Extras =&lt;br /&gt;
== hg aliases ==&lt;br /&gt;
=== mergetocentral/mergetointegration ===&lt;br /&gt;
I set up the following aliases in my global .hgrc file to make merging things around trunk a little faster:&lt;br /&gt;
 [alias]&lt;br /&gt;
 # merge tree $1, revision $2 to central, optionally appending $3 (for &amp;quot;CLOSED TREE&amp;quot;, etc)&lt;br /&gt;
 mergetocentral = !$HG pull central ; $HG up central ; $HG pull $1 ; $HG merge $2 ; $HG commit -m &amp;quot;Merge $1 to central, a=merge $3&amp;quot; ; $HG push -r . central&lt;br /&gt;
 # merge central tip to tree $1, optionally appending $2 (for &amp;quot;CLOSED TREE&amp;quot;, etc)&lt;br /&gt;
 mergetointegration = !$HG pull central ; $HG pull $1 ; $HG up $1 ; $HG merge central ; $HG commit -m &amp;quot;Merge m-c to $1, a=merge $2&amp;quot; ; $HG push -r . $1&lt;br /&gt;
&lt;br /&gt;
With these set up, I can merge fx-team&#039;s revision 04a3d9130aa0 over to mozilla-central with the following command:&lt;br /&gt;
 hg mergetocentral fx-team 04a3d9130aa0&lt;br /&gt;
and then I can merge mozilla-central&#039;s tip back to fx-team with the following command:&lt;br /&gt;
 hg mergetointegration fx-team&lt;br /&gt;
This cuts down on a lot of repetitive typing, saving a bit of time.&lt;br /&gt;
&lt;br /&gt;
For merging from reviewboard patches, there&#039;s this alias&lt;br /&gt;
  rbimport = !hg transplant -e -s https://reviewboard-hg.mozilla.org/gecko -b $1&lt;br /&gt;
&lt;br /&gt;
Then, it&#039;s matter of importing the right hash like the following command:&lt;br /&gt;
  hg rbimport dd1462ba321db983061b94e30cee92b6bd81e908&lt;/div&gt;</summary>
		<author><name>KWierso</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Uplifts&amp;diff=1138738</id>
		<title>Sheriffing/How To/Uplifts</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Uplifts&amp;diff=1138738"/>
		<updated>2016-07-05T19:12:58Z</updated>

		<summary type="html">&lt;p&gt;KWierso: Remove esr38 as it&amp;#039;s reached end of life&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Standard practice is that bug fixes that affect the release branches must first land on trunk/master. Unless there is a branch-specific patch attached to the bug, the patch that landed must then be transplanted to the appropriate branches. This page documents the procedure for performing those uplifts for both Gecko and Gaia.&lt;br /&gt;
&lt;br /&gt;
= Prerequisites =&lt;br /&gt;
To perform uplifts with Mercurial, either the native [http://www.selenic.com/hg/help/graft graft] command or the [http://mercurial.selenic.com/wiki/TransplantExtension transplant] extension needs to be enabled, depending on how the different branches are cloned. Git has native [http://www.git-scm.com/docs/git-cherry-pick cherry-pick] functionality that can be used for all Gaia uplifts (or Gecko if using the Git mirror).&lt;br /&gt;
&lt;br /&gt;
== Gecko Uplifts ==&lt;br /&gt;
=== Using Separate Repositories ===&lt;br /&gt;
By default, the different Gecko branches live in different repositories. With multiple repos, the transplant extension is the preferred method. Creating an [http://www.selenic.com/mercurial/hgrc.5.html#alias alias] simplifies the process for transplanting a given revision &amp;lt;b&amp;gt;(or revset)&amp;lt;/b&amp;gt;.&lt;br /&gt;
 # Transplant a cset from the specified branch to the current branch and edit the commit message.&lt;br /&gt;
 # *** This assumes that local clones are named mozilla-XXX (aurora, beta, etc). ***&lt;br /&gt;
 #   Usage:   hg uplift &amp;amp;#60;source&amp;amp;#62; &amp;amp;#60;rev&amp;amp;#62;&lt;br /&gt;
 #   Example: hg uplift aurora abc123abc123&lt;br /&gt;
 uplift = transplant -e -s ../mozilla-$1 $2&lt;br /&gt;
&lt;br /&gt;
Optionally, an mq-based alias can also be created, which exports a specified revision from the current clone and imports it into another.&lt;br /&gt;
 # Export a cset from the current branch to the specified branch, add it to the queue, attempt to apply it, and edit the commit message.&lt;br /&gt;
 # *** This assumes that local clones are named mozilla-XXX (aurora, beta, etc). ***&lt;br /&gt;
 #   Usage:   hg uplift-mq &amp;amp;#60;branch&amp;amp;#62; &amp;amp;#60;bug#&amp;amp;#62; &amp;amp;#60;rev&amp;amp;#62;&lt;br /&gt;
 #   Example: hg uplift-mq aurora 123456 abc123abc123&lt;br /&gt;
 uplift-mq = !hg export -r $3 &amp;gt; ../mozilla-$1/.hg/patches/$2 &amp;amp;&amp;amp; cd ../mozilla-$1 &amp;amp;&amp;amp; hg qimport -e -P $2 &amp;amp;&amp;amp; hg qref -e&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;NOTE: The above aliases work in opposite directions!&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using A Unified Repository ===&lt;br /&gt;
When using the [http://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/firefoxtree.html Firefoxtree] extension, all the Gecko releases live in the same repository. The native graft function can be used.&lt;br /&gt;
 hg graft -er &amp;amp;#60;rev&amp;amp;#62;&lt;br /&gt;
&lt;br /&gt;
== Gaia Uplifts ==&lt;br /&gt;
Git has built-in tools for performing transplants, via the cherry-pick function. Since all Gaia branches live in the same repository, we can use that.&lt;br /&gt;
 git cherry-pick &amp;amp;#60;rev&amp;amp;#62;&lt;br /&gt;
If cherry-picking a pull request merge commit, the -m 1 option must be included. For blame purposes, it is preferable to avoid these commits where possible, however.&lt;br /&gt;
 git cherry-pick -m 1 &amp;amp;#60;rev&amp;amp;#62;&lt;br /&gt;
If the pull request only merged one commit, the parent commit can be cherry-picked. If there were multiple commits contained in the pull request, the merge commit can be used instead. Verify that the commit information such as author is set correctly and adjust using |git commit --amend| if necessary.&lt;br /&gt;
&lt;br /&gt;
= Uplift Procedure =&lt;br /&gt;
* Unless specifically cleared by Release Management, patches should land on mozilla-central prior to being uplifted elsewhere.&lt;br /&gt;
* Patches should be uplifted from the most-recent version to the oldest (i.e. Aurora -&amp;gt; Beta -&amp;gt; etc or v2.2 -&amp;gt; v2.1 -&amp;gt; etc). This will help minimize rebasing pain.&lt;br /&gt;
* To avoid conflicts, patches should be transplanted from oldest to newest. The search queries below default to sorting in the order the bugs were resolved.&lt;br /&gt;
** Until bug 1154728 is resolved, note that Bugherder marks bugs in the *opposite* order of which they landed!&lt;br /&gt;
* If there is a branch-specific patch attached to the bug, use that. Otherwise, transplant it using the methods shown in the section above.&lt;br /&gt;
* Add a=&amp;lt;whoever approved&amp;gt; to the commit message.&lt;br /&gt;
* After pushing, mark the bugs and set the appropriate status flags. The Bugherder tool available from the dropdown on the right side of each push on Treeherder can automate this process.&lt;br /&gt;
&lt;br /&gt;
= Bug Queries =&lt;br /&gt;
The [https://bugzilla.mozilla.org/page.cgi?id=release_tracking_report.html Release Tracking Report] has some useful bug queries. However, it has limitations in that it only sees bugs that have a status of &amp;quot;affected&amp;quot;, &amp;quot;fixed&amp;quot;, or &amp;quot;verified&amp;quot; set. As a result, it will miss approved bugs if no status is set (&amp;quot;---&amp;quot;) and will show bugs as still needing uplift if their status is an unexpected value (like &amp;quot;disabled&amp;quot;). As a result, a combination of this report and the queries below is recommended to avoid missing bugs.&lt;br /&gt;
&lt;br /&gt;
== B2G ==&lt;br /&gt;
Bug queries are on the [https://wiki.mozilla.org/Release_Management/B2G_Landing#Automatic_Branch_Uplifts B2G Landing] page.&lt;br /&gt;
&lt;br /&gt;
== ESR ==&lt;br /&gt;
The ESR intermittent queries are *very* useful for looking at recently-fixed intermittent failure bugs and ensuring that status flags are set for all applicable releases. The [https://wiki.mozilla.org/RapidRelease/Calendar Release Calendar] can help determine in which release an intermittent first appeared (in addition to looking at Treeherderbot comments in the bug).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;ESR45&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://bugzilla.mozilla.org/buglist.cgi?order=cf_last_resolved;field0-0-0=flagtypes.name;type0-0-0=equals;value0-0-0=approval-mozilla-esr45%2B;field0-1-0=cf_status_firefox_esr45;type0-1-0=nowordssubstr;value0-1-0=fixed%20verified%20wontfix%20unaffected%20disabled All esr45 approvals not yet uplifted]&lt;br /&gt;
&lt;br /&gt;
[https://bugzilla.mozilla.org/buglist.cgi?order=cf_last_resolved&amp;amp;resolution=FIXED&amp;amp;keywords=intermittent-failure&amp;amp;keywords_type=allwords&amp;amp;field0-0-0=cf_last_resolved&amp;amp;type0-0-0=greaterthaneq&amp;amp;value0-0-0=2015-08-30&amp;amp;field0-1-0=product&amp;amp;type0-1-0=nowordssubstr&amp;amp;value0-1-0=Calendar%20Chat%20MailNews%20QA%20Thunderbird%20Release&amp;amp;field0-2-0=component&amp;amp;type0-2-0=nowordssubstr&amp;amp;value0-2-0=Gaia&amp;amp;field0-3-0=cf_status_firefox_esr45&amp;amp;type0-3-0=nowordssubstr&amp;amp;value0-3-0=fixed%20verified%20wontfix%20unaffected%20disabled Fixed intermittents w/o esr45 {fixed|verified|wontfix|unaffected|disabled}]&lt;br /&gt;
&lt;br /&gt;
=== For Crosschecks only ! Aurora ===&lt;br /&gt;
&amp;lt;b&amp;gt;** NOTE **&amp;lt;/b&amp;gt; These queries use date/milestone specific information that changes with every release!&lt;br /&gt;
&lt;br /&gt;
[https://bugzilla.mozilla.org/buglist.cgi?order=cf_last_resolved;resolution=FIXED;field0-0-0=target_milestone;type0-0-0=anywordssubstr;value0-0-0={{NIGHTLY_VERSION}}%20{{AURORA_VERSION}};field0-1-0=flagtypes.name;type0-1-0=equals;value0-1-0=approval-mozilla-aurora%2B;field0-2-0=cf_status_firefox{{AURORA_VERSION}};type0-2-0=nowordssubstr;value0-2-0=fixed%20verified%20wontfix%20unaffected%20disabled; Fixed bugs with mozilla-aurora approval]&lt;br /&gt;
&lt;br /&gt;
[https://bugzilla.mozilla.org/buglist.cgi?order=cf_last_resolved;resolution=FIXED;keywords=intermittent-failure;keywords_type=allwords;field0-0-0=target_milestone;type0-0-0=anywordssubstr;value0-0-0={{NIGHTLY_VERSION}}%20{{AURORA_VERSION}};field0-1-0=product;type0-1-0=nowordssubstr;value0-1-0=MailNews%20QA%20Thunderbird;field0-2-0=cf_status_firefox{{AURORA_VERSION}};type0-2-0=nowordssubstr;value0-2-0=fixed%20verified%20wontfix%20unaffected%20disabled; Fixed intermittents that affect Fx{{AURORA_VERSION}}]&lt;br /&gt;
&lt;br /&gt;
=== For Crosschecks only ! Beta ===&lt;br /&gt;
&amp;lt;b&amp;gt;** NOTE **&amp;lt;/b&amp;gt; These queries use date/milestone specific information that changes with every release!&lt;br /&gt;
&lt;br /&gt;
[https://bugzilla.mozilla.org/buglist.cgi?order=cf_last_resolved;resolution=FIXED;field0-0-0=target_milestone;type0-0-0=anywordssubstr;value0-0-0={{NIGHTLY_VERSION}}%20{{AURORA_VERSION}};field0-1-0=flagtypes.name;type0-1-0=equals;value0-1-0=approval-mozilla-beta%2B;field0-2-0=cf_status_firefox{{BETA_VERSION}};type0-2-0=nowordssubstr;value0-2-0=fixed%20verified%20wontfix%20unaffected%20disabled; Fixed bugs with mozilla-beta approval] (Test link with handy templates)&lt;br /&gt;
&lt;br /&gt;
[https://bugzilla.mozilla.org/buglist.cgi?order=cf_last_resolved;resolution=FIXED;keywords=intermittent-failure;keywords_type=allwords;field0-0-0=target_milestone;type0-0-0=anywordssubstr;value0-0-0={{AURORA_VERSION}}%20{{NIGHTLY_VERSION}};field0-1-0=product;type0-1-0=nowordssubstr;value0-1-0=MailNews%20QA%20Thunderbird;field0-2-0=cf_status_firefox{{BETA_VERSION}};type0-2-0=nowordssubstr;value0-2-0=fixed%20verified%20wontfix%20unaffected%20disabled; Fixed intermittents that affect Fx{{BETA_VERSION}}]&lt;/div&gt;</summary>
		<author><name>KWierso</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=EngineeringProductivity/Meetings/2016-04-18&amp;diff=1128145</id>
		<title>EngineeringProductivity/Meetings/2016-04-18</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=EngineeringProductivity/Meetings/2016-04-18&amp;diff=1128145"/>
		<updated>2016-04-18T16:29:35Z</updated>

		<summary type="html">&lt;p&gt;KWierso: VS2013&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Notices, Highlights, Roundtable =&lt;br /&gt;
* Significant Contributions&lt;br /&gt;
* Q2 deliverables and priorities&lt;br /&gt;
** Build system&lt;br /&gt;
** MozReview and Autoland&lt;br /&gt;
** TaskCluster&lt;br /&gt;
** Release process&lt;br /&gt;
* Open positions!&lt;br /&gt;
** https://careers.mozilla.org/position/ougZ2fwv&lt;br /&gt;
* London meetings&lt;br /&gt;
** Build system planning&lt;br /&gt;
** VCS workflows&lt;br /&gt;
** Automation data and metrics&lt;br /&gt;
** Developer productivity hacks&lt;br /&gt;
** MozReview design and planning&lt;br /&gt;
** MozReview hacking&lt;br /&gt;
** For others, please contact jgriffin by This Friday&lt;br /&gt;
* VS 2013 support?&lt;br /&gt;
** Bug 1186060 switched CI to using VS 2015. Bug 1232686 was backed out after we found out it broke VS 2013 builds. Email thread over the weekend suggested we officially unsupport VS 2013... can we make that official so that bug 1186060 can re-land?&lt;br /&gt;
&lt;br /&gt;
= Newsgroup and Blog Posts =&lt;br /&gt;
* [armenzg] [http://armenzg.blogspot.ca/2016/04/improving-how-i-write-python-tests.html Improving how I write Python tests]&lt;br /&gt;
** pointers to other good blog posts and tips for people getting into Python tests&lt;br /&gt;
* [armenzg] [http://armenzg.blogspot.ca/2016/04/mozci-trigger-now-installs-with-pip.html mozci-trigger (command line script) nows installs with mozci-scripts (a new python package)]&lt;br /&gt;
&lt;br /&gt;
= Goal Updates =&lt;br /&gt;
&lt;br /&gt;
Please update Q2 deliverables: https://docs.google.com/spreadsheets/d/1WYhwdxMAgfU-YlfjTMXaf8EWTUMZi8KheMaaamK75Is/edit#gid=0&lt;br /&gt;
&lt;br /&gt;
= Other Project Updates =&lt;br /&gt;
&lt;br /&gt;
= Holidays and Trips =&lt;br /&gt;
&lt;br /&gt;
* [ato] Away Friday 15 April and most of next week, except Thursday 21 April when I’m working from London&lt;br /&gt;
&lt;br /&gt;
= Misc =&lt;/div&gt;</summary>
		<author><name>KWierso</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Uplifts&amp;diff=1121910</id>
		<title>Sheriffing/How To/Uplifts</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Uplifts&amp;diff=1121910"/>
		<updated>2016-03-14T19:08:49Z</updated>

		<summary type="html">&lt;p&gt;KWierso: ESR45 queries&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Standard practice is that bug fixes that affect the release branches must first land on trunk/master. Unless there is a branch-specific patch attached to the bug, the patch that landed must then be transplanted to the appropriate branches. This page documents the procedure for performing those uplifts for both Gecko and Gaia.&lt;br /&gt;
&lt;br /&gt;
= Prerequisites =&lt;br /&gt;
To perform uplifts with Mercurial, either the native [http://www.selenic.com/hg/help/graft graft] command or the [http://mercurial.selenic.com/wiki/TransplantExtension transplant] extension needs to be enabled, depending on how the different branches are cloned. Git has native [http://www.git-scm.com/docs/git-cherry-pick cherry-pick] functionality that can be used for all Gaia uplifts (or Gecko if using the Git mirror).&lt;br /&gt;
&lt;br /&gt;
== Gecko Uplifts ==&lt;br /&gt;
=== Using Separate Repositories ===&lt;br /&gt;
By default, the different Gecko branches live in different repositories. With multiple repos, the transplant extension is the preferred method. Creating an [http://www.selenic.com/mercurial/hgrc.5.html#alias alias] simplifies the process for transplanting a given revision &amp;lt;b&amp;gt;(or revset)&amp;lt;/b&amp;gt;.&lt;br /&gt;
 # Transplant a cset from the specified branch to the current branch and edit the commit message.&lt;br /&gt;
 # *** This assumes that local clones are named mozilla-XXX (aurora, beta, etc). ***&lt;br /&gt;
 #   Usage:   hg uplift &amp;amp;#60;source&amp;amp;#62; &amp;amp;#60;rev&amp;amp;#62;&lt;br /&gt;
 #   Example: hg uplift aurora abc123abc123&lt;br /&gt;
 uplift = transplant -e -s ../mozilla-$1 $2&lt;br /&gt;
&lt;br /&gt;
Optionally, an mq-based alias can also be created, which exports a specified revision from the current clone and imports it into another.&lt;br /&gt;
 # Export a cset from the current branch to the specified branch, add it to the queue, attempt to apply it, and edit the commit message.&lt;br /&gt;
 # *** This assumes that local clones are named mozilla-XXX (aurora, beta, etc). ***&lt;br /&gt;
 #   Usage:   hg uplift-mq &amp;amp;#60;branch&amp;amp;#62; &amp;amp;#60;bug#&amp;amp;#62; &amp;amp;#60;rev&amp;amp;#62;&lt;br /&gt;
 #   Example: hg uplift-mq aurora 123456 abc123abc123&lt;br /&gt;
 uplift-mq = !hg export -r $3 &amp;gt; ../mozilla-$1/.hg/patches/$2 &amp;amp;&amp;amp; cd ../mozilla-$1 &amp;amp;&amp;amp; hg qimport -e -P $2 &amp;amp;&amp;amp; hg qref -e&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;NOTE: The above aliases work in opposite directions!&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using A Unified Repository ===&lt;br /&gt;
When using the [http://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/firefoxtree.html Firefoxtree] extension, all the Gecko releases live in the same repository. The native graft function can be used.&lt;br /&gt;
 hg graft -er &amp;amp;#60;rev&amp;amp;#62;&lt;br /&gt;
&lt;br /&gt;
== Gaia Uplifts ==&lt;br /&gt;
Git has built-in tools for performing transplants, via the cherry-pick function. Since all Gaia branches live in the same repository, we can use that.&lt;br /&gt;
 git cherry-pick &amp;amp;#60;rev&amp;amp;#62;&lt;br /&gt;
If cherry-picking a pull request merge commit, the -m 1 option must be included. For blame purposes, it is preferable to avoid these commits where possible, however.&lt;br /&gt;
 git cherry-pick -m 1 &amp;amp;#60;rev&amp;amp;#62;&lt;br /&gt;
If the pull request only merged one commit, the parent commit can be cherry-picked. If there were multiple commits contained in the pull request, the merge commit can be used instead. Verify that the commit information such as author is set correctly and adjust using |git commit --amend| if necessary.&lt;br /&gt;
&lt;br /&gt;
= Uplift Procedure =&lt;br /&gt;
* Unless specifically cleared by Release Management, patches should land on mozilla-central prior to being uplifted elsewhere.&lt;br /&gt;
* Patches should be uplifted from the most-recent version to the oldest (i.e. Aurora -&amp;gt; Beta -&amp;gt; etc or v2.2 -&amp;gt; v2.1 -&amp;gt; etc). This will help minimize rebasing pain.&lt;br /&gt;
* To avoid conflicts, patches should be transplanted from oldest to newest. The search queries below default to sorting in the order the bugs were resolved.&lt;br /&gt;
** Until bug 1154728 is resolved, note that Bugherder marks bugs in the *opposite* order of which they landed!&lt;br /&gt;
* If there is a branch-specific patch attached to the bug, use that. Otherwise, transplant it using the methods shown in the section above.&lt;br /&gt;
* Add a=&amp;lt;whoever approved&amp;gt; to the commit message.&lt;br /&gt;
* After pushing, mark the bugs and set the appropriate status flags. The Bugherder tool available from the dropdown on the right side of each push on Treeherder can automate this process.&lt;br /&gt;
&lt;br /&gt;
= Bug Queries =&lt;br /&gt;
The [https://bugzilla.mozilla.org/page.cgi?id=release_tracking_report.html Release Tracking Report] has some useful bug queries. However, it has limitations in that it only sees bugs that have a status of &amp;quot;affected&amp;quot;, &amp;quot;fixed&amp;quot;, or &amp;quot;verified&amp;quot; set. As a result, it will miss approved bugs if no status is set (&amp;quot;---&amp;quot;) and will show bugs as still needing uplift if their status is an unexpected value (like &amp;quot;disabled&amp;quot;). As a result, a combination of this report and the queries below is recommended to avoid missing bugs.&lt;br /&gt;
&lt;br /&gt;
== B2G ==&lt;br /&gt;
Bug queries are on the [https://wiki.mozilla.org/Release_Management/B2G_Landing#Automatic_Branch_Uplifts B2G Landing] page.&lt;br /&gt;
&lt;br /&gt;
== ESR ==&lt;br /&gt;
The ESR intermittent queries are *very* useful for looking at recently-fixed intermittent failure bugs and ensuring that status flags are set for all applicable releases. The [https://wiki.mozilla.org/RapidRelease/Calendar Release Calendar] can help determine in which release an intermittent first appeared (in addition to looking at Treeherderbot comments in the bug).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;ESR45&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://bugzilla.mozilla.org/buglist.cgi?order=cf_last_resolved;field0-0-0=flagtypes.name;type0-0-0=equals;value0-0-0=approval-mozilla-esr45%2B;field0-1-0=cf_status_firefox_esr45;type0-1-0=nowordssubstr;value0-1-0=fixed%20verified%20wontfix%20unaffected%20disabled All esr45 approvals not yet uplifted]&lt;br /&gt;
&lt;br /&gt;
[https://bugzilla.mozilla.org/buglist.cgi?order=cf_last_resolved&amp;amp;resolution=FIXED&amp;amp;keywords=intermittent-failure&amp;amp;keywords_type=allwords&amp;amp;field0-0-0=cf_last_resolved&amp;amp;type0-0-0=greaterthaneq&amp;amp;value0-0-0=2015-08-30&amp;amp;field0-1-0=product&amp;amp;type0-1-0=nowordssubstr&amp;amp;value0-1-0=Calendar%20Chat%20MailNews%20QA%20Thunderbird%20Release&amp;amp;field0-2-0=component&amp;amp;type0-2-0=nowordssubstr&amp;amp;value0-2-0=Gaia&amp;amp;field0-3-0=cf_status_firefox_esr45&amp;amp;type0-3-0=nowordssubstr&amp;amp;value0-3-0=fixed%20verified%20wontfix%20unaffected%20disabled Fixed intermittents w/o esr45 {fixed|verified|wontfix|unaffected|disabled}]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;ESR38&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://bugzilla.mozilla.org/buglist.cgi?order=cf_last_resolved;field0-0-0=flagtypes.name;type0-0-0=equals;value0-0-0=approval-mozilla-esr38%2B;field0-1-0=cf_status_firefox_esr38;type0-1-0=nowordssubstr;value0-1-0=fixed%20verified%20wontfix%20unaffected%20disabled All esr38 approvals not yet uplifted]&lt;br /&gt;
&lt;br /&gt;
[https://bugzilla.mozilla.org/buglist.cgi?order=cf_last_resolved&amp;amp;resolution=FIXED&amp;amp;keywords=intermittent-failure&amp;amp;keywords_type=allwords&amp;amp;field0-0-0=cf_last_resolved&amp;amp;type0-0-0=greaterthaneq&amp;amp;value0-0-0=2015-08-30&amp;amp;field0-1-0=product&amp;amp;type0-1-0=nowordssubstr&amp;amp;value0-1-0=Calendar%20Chat%20MailNews%20QA%20Thunderbird%20Release&amp;amp;field0-2-0=component&amp;amp;type0-2-0=nowordssubstr&amp;amp;value0-2-0=Gaia&amp;amp;field0-3-0=cf_status_firefox_esr38&amp;amp;type0-3-0=nowordssubstr&amp;amp;value0-3-0=fixed%20verified%20wontfix%20unaffected%20disabled Fixed intermittents w/o esr38 {fixed|verified|wontfix|unaffected|disabled}]&lt;br /&gt;
&lt;br /&gt;
=== For Crosschecks only ! Aurora ===&lt;br /&gt;
&amp;lt;b&amp;gt;** NOTE **&amp;lt;/b&amp;gt; These queries use date/milestone specific information that changes with every release!&lt;br /&gt;
&lt;br /&gt;
[https://bugzilla.mozilla.org/buglist.cgi?order=cf_last_resolved;resolution=FIXED;field0-0-0=target_milestone;type0-0-0=anywordssubstr;value0-0-0={{NIGHTLY_VERSION}}%20{{AURORA_VERSION}};field0-1-0=flagtypes.name;type0-1-0=equals;value0-1-0=approval-mozilla-aurora%2B;field0-2-0=cf_status_firefox{{AURORA_VERSION}};type0-2-0=nowordssubstr;value0-2-0=fixed%20verified%20wontfix%20unaffected%20disabled; Fixed bugs with mozilla-aurora approval]&lt;br /&gt;
&lt;br /&gt;
[https://bugzilla.mozilla.org/buglist.cgi?order=cf_last_resolved;resolution=FIXED;keywords=intermittent-failure;keywords_type=allwords;field0-0-0=target_milestone;type0-0-0=anywordssubstr;value0-0-0={{NIGHTLY_VERSION}}%20{{AURORA_VERSION}};field0-1-0=product;type0-1-0=nowordssubstr;value0-1-0=MailNews%20QA%20Thunderbird;field0-2-0=cf_status_firefox{{AURORA_VERSION}};type0-2-0=nowordssubstr;value0-2-0=fixed%20verified%20wontfix%20unaffected%20disabled; Fixed intermittents that affect Fx{{AURORA_VERSION}}]&lt;br /&gt;
&lt;br /&gt;
=== For Crosschecks only ! Beta ===&lt;br /&gt;
&amp;lt;b&amp;gt;** NOTE **&amp;lt;/b&amp;gt; These queries use date/milestone specific information that changes with every release!&lt;br /&gt;
&lt;br /&gt;
[https://bugzilla.mozilla.org/buglist.cgi?order=cf_last_resolved;resolution=FIXED;field0-0-0=target_milestone;type0-0-0=anywordssubstr;value0-0-0={{NIGHTLY_VERSION}}%20{{AURORA_VERSION}};field0-1-0=flagtypes.name;type0-1-0=equals;value0-1-0=approval-mozilla-beta%2B;field0-2-0=cf_status_firefox{{BETA_VERSION}};type0-2-0=nowordssubstr;value0-2-0=fixed%20verified%20wontfix%20unaffected%20disabled; Fixed bugs with mozilla-beta approval] (Test link with handy templates)&lt;br /&gt;
&lt;br /&gt;
[https://bugzilla.mozilla.org/buglist.cgi?order=cf_last_resolved;resolution=FIXED;keywords=intermittent-failure;keywords_type=allwords;field0-0-0=target_milestone;type0-0-0=anywordssubstr;value0-0-0={{AURORA_VERSION}}%20{{NIGHTLY_VERSION}};field0-1-0=product;type0-1-0=nowordssubstr;value0-1-0=MailNews%20QA%20Thunderbird;field0-2-0=cf_status_firefox{{BETA_VERSION}};type0-2-0=nowordssubstr;value0-2-0=fixed%20verified%20wontfix%20unaffected%20disabled; Fixed intermittents that affect Fx{{BETA_VERSION}}]&lt;/div&gt;</summary>
		<author><name>KWierso</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Uplifts&amp;diff=1110436</id>
		<title>Sheriffing/How To/Uplifts</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Uplifts&amp;diff=1110436"/>
		<updated>2015-12-22T23:54:36Z</updated>

		<summary type="html">&lt;p&gt;KWierso: Fix beta intermittent fix text&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Standard practice is that bug fixes that affect the release branches must first land on trunk/master. Unless there is a branch-specific patch attached to the bug, the patch that landed must then be transplanted to the appropriate branches. This page documents the procedure for performing those uplifts for both Gecko and Gaia.&lt;br /&gt;
&lt;br /&gt;
= Prerequisites =&lt;br /&gt;
To perform uplifts with Mercurial, either the native [http://www.selenic.com/hg/help/graft graft] command or the [http://mercurial.selenic.com/wiki/TransplantExtension transplant] extension needs to be enabled, depending on how the different branches are cloned. Git has native [http://www.git-scm.com/docs/git-cherry-pick cherry-pick] functionality that can be used for all Gaia uplifts (or Gecko if using the Git mirror).&lt;br /&gt;
&lt;br /&gt;
== Gecko Uplifts ==&lt;br /&gt;
=== Using Separate Repositories ===&lt;br /&gt;
By default, the different Gecko branches live in different repositories. With multiple repos, the transplant extension is the preferred method. Creating an [http://www.selenic.com/mercurial/hgrc.5.html#alias alias] simplifies the process for transplanting a given revision &amp;lt;b&amp;gt;(or revset)&amp;lt;/b&amp;gt;.&lt;br /&gt;
 # Transplant a cset from the specified branch to the current branch and edit the commit message.&lt;br /&gt;
 # *** This assumes that local clones are named mozilla-XXX (aurora, beta, etc). ***&lt;br /&gt;
 #   Usage:   hg uplift &amp;amp;#60;source&amp;amp;#62; &amp;amp;#60;rev&amp;amp;#62;&lt;br /&gt;
 #   Example: hg uplift aurora abc123abc123&lt;br /&gt;
 uplift = transplant -e -s ../mozilla-$1 $2&lt;br /&gt;
&lt;br /&gt;
Optionally, an mq-based alias can also be created, which exports a specified revision from the current clone and imports it into another.&lt;br /&gt;
 # Export a cset from the current branch to the specified branch, add it to the queue, attempt to apply it, and edit the commit message.&lt;br /&gt;
 # *** This assumes that local clones are named mozilla-XXX (aurora, beta, etc). ***&lt;br /&gt;
 #   Usage:   hg uplift-mq &amp;amp;#60;branch&amp;amp;#62; &amp;amp;#60;bug#&amp;amp;#62; &amp;amp;#60;rev&amp;amp;#62;&lt;br /&gt;
 #   Example: hg uplift-mq aurora 123456 abc123abc123&lt;br /&gt;
 uplift-mq = !hg export -r $3 &amp;gt; ../mozilla-$1/.hg/patches/$2 &amp;amp;&amp;amp; cd ../mozilla-$1 &amp;amp;&amp;amp; hg qimport -e -P $2 &amp;amp;&amp;amp; hg qref -e&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;NOTE: The above aliases work in opposite directions!&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using A Unified Repository ===&lt;br /&gt;
When using the [http://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/firefoxtree.html Firefoxtree] extension, all the Gecko releases live in the same repository. The native graft function can be used.&lt;br /&gt;
 hg graft -er &amp;amp;#60;rev&amp;amp;#62;&lt;br /&gt;
&lt;br /&gt;
== Gaia Uplifts ==&lt;br /&gt;
Git has built-in tools for performing transplants, via the cherry-pick function. Since all Gaia branches live in the same repository, we can use that.&lt;br /&gt;
 git cherry-pick &amp;amp;#60;rev&amp;amp;#62;&lt;br /&gt;
If cherry-picking a pull request merge commit, the -m 1 option must be included. For blame purposes, it is preferable to avoid these commits where possible, however.&lt;br /&gt;
 git cherry-pick -m 1 &amp;amp;#60;rev&amp;amp;#62;&lt;br /&gt;
If the pull request only merged one commit, the parent commit can be cherry-picked. If there were multiple commits contained in the pull request, the merge commit can be used instead. Verify that the commit information such as author is set correctly and adjust using |git commit --amend| if necessary.&lt;br /&gt;
&lt;br /&gt;
= Uplift Procedure =&lt;br /&gt;
* Unless specifically cleared by Release Management, patches should land on mozilla-central prior to being uplifted elsewhere.&lt;br /&gt;
* Patches should be uplifted from the most-recent version to the oldest (i.e. Aurora -&amp;gt; Beta -&amp;gt; etc or v2.2 -&amp;gt; v2.1 -&amp;gt; etc). This will help minimize rebasing pain.&lt;br /&gt;
* To avoid conflicts, patches should be transplanted from oldest to newest. The search queries below default to sorting in the order the bugs were resolved.&lt;br /&gt;
** Until bug 1154728 is resolved, note that Bugherder marks bugs in the *opposite* order of which they landed!&lt;br /&gt;
* If there is a branch-specific patch attached to the bug, use that. Otherwise, transplant it using the methods shown in the section above.&lt;br /&gt;
* Add a=&amp;lt;whoever approved&amp;gt; to the commit message.&lt;br /&gt;
* After pushing, mark the bugs and set the appropriate status flags. The Bugherder tool available from the dropdown on the right side of each push on Treeherder can automate this process.&lt;br /&gt;
&lt;br /&gt;
= Bug Queries =&lt;br /&gt;
The [https://bugzilla.mozilla.org/page.cgi?id=release_tracking_report.html Release Tracking Report] has some useful bug queries. However, it has limitations in that it only sees bugs that have a status of &amp;quot;affected&amp;quot;, &amp;quot;fixed&amp;quot;, or &amp;quot;verified&amp;quot; set. As a result, it will miss approved bugs if no status is set (&amp;quot;---&amp;quot;) and will show bugs as still needing uplift if their status is an unexpected value (like &amp;quot;disabled&amp;quot;). As a result, a combination of this report and the queries below is recommended to avoid missing bugs.&lt;br /&gt;
&lt;br /&gt;
== B2G ==&lt;br /&gt;
Bug queries are on the [https://wiki.mozilla.org/Release_Management/B2G_Landing#Automatic_Branch_Uplifts B2G Landing] page.&lt;br /&gt;
&lt;br /&gt;
== ESR ==&lt;br /&gt;
The ESR intermittent queries are *very* useful for looking at recently-fixed intermittent failure bugs and ensuring that status flags are set for all applicable releases. The [https://wiki.mozilla.org/RapidRelease/Calendar Release Calendar] can help determine in which release an intermittent first appeared (in addition to looking at Treeherderbot comments in the bug).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;ESR38&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://bugzilla.mozilla.org/buglist.cgi?order=cf_last_resolved;field0-0-0=flagtypes.name;type0-0-0=equals;value0-0-0=approval-mozilla-esr38%2B;field0-1-0=cf_status_firefox_esr38;type0-1-0=nowordssubstr;value0-1-0=fixed%20verified%20wontfix%20unaffected%20disabled All esr38 approvals not yet uplifted]&lt;br /&gt;
&lt;br /&gt;
[https://bugzilla.mozilla.org/buglist.cgi?order=cf_last_resolved&amp;amp;resolution=FIXED&amp;amp;keywords=intermittent-failure&amp;amp;keywords_type=allwords&amp;amp;field0-0-0=cf_last_resolved&amp;amp;type0-0-0=greaterthaneq&amp;amp;value0-0-0=2015-08-30&amp;amp;field0-1-0=product&amp;amp;type0-1-0=nowordssubstr&amp;amp;value0-1-0=Calendar%20Chat%20MailNews%20QA%20Thunderbird%20Release&amp;amp;field0-2-0=component&amp;amp;type0-2-0=nowordssubstr&amp;amp;value0-2-0=Gaia&amp;amp;field0-3-0=cf_status_firefox_esr38&amp;amp;type0-3-0=nowordssubstr&amp;amp;value0-3-0=fixed%20verified%20wontfix%20unaffected%20disabled Fixed intermittents w/o esr38 {fixed|verified|wontfix|unaffected|disabled}]&lt;br /&gt;
&lt;br /&gt;
== Aurora ==&lt;br /&gt;
&amp;lt;b&amp;gt;** NOTE **&amp;lt;/b&amp;gt; These queries use date/milestone specific information that changes with every release!&lt;br /&gt;
&lt;br /&gt;
[https://bugzilla.mozilla.org/buglist.cgi?order=cf_last_resolved;resolution=FIXED;field0-0-0=target_milestone;type0-0-0=anywordssubstr;value0-0-0={{NIGHTLY_VERSION}}%20{{AURORA_VERSION}};field0-1-0=flagtypes.name;type0-1-0=equals;value0-1-0=approval-mozilla-aurora%2B;field0-2-0=cf_status_firefox{{AURORA_VERSION}};type0-2-0=nowordssubstr;value0-2-0=fixed%20verified%20wontfix%20unaffected%20disabled; Fixed bugs with mozilla-aurora approval]&lt;br /&gt;
&lt;br /&gt;
[https://bugzilla.mozilla.org/buglist.cgi?order=cf_last_resolved;resolution=FIXED;keywords=intermittent-failure;keywords_type=allwords;field0-0-0=target_milestone;type0-0-0=anywordssubstr;value0-0-0={{NIGHTLY_VERSION}}%20{{AURORA_VERSION}};field0-1-0=product;type0-1-0=nowordssubstr;value0-1-0=MailNews%20QA%20Thunderbird;field0-2-0=cf_status_firefox{{AURORA_VERSION}};type0-2-0=nowordssubstr;value0-2-0=fixed%20verified%20wontfix%20unaffected%20disabled; Fixed intermittents that affect Fx{{AURORA_VERSION}}]&lt;br /&gt;
&lt;br /&gt;
== Beta ==&lt;br /&gt;
&amp;lt;b&amp;gt;** NOTE **&amp;lt;/b&amp;gt; These queries use date/milestone specific information that changes with every release!&lt;br /&gt;
&lt;br /&gt;
[https://bugzilla.mozilla.org/buglist.cgi?order=cf_last_resolved;resolution=FIXED;field0-0-0=target_milestone;type0-0-0=anywordssubstr;value0-0-0={{NIGHTLY_VERSION}}%20{{AURORA_VERSION}};field0-1-0=flagtypes.name;type0-1-0=equals;value0-1-0=approval-mozilla-beta%2B;field0-2-0=cf_status_firefox{{BETA_VERSION}};type0-2-0=nowordssubstr;value0-2-0=fixed%20verified%20wontfix%20unaffected%20disabled; Fixed bugs with mozilla-beta approval] (Test link with handy templates)&lt;br /&gt;
&lt;br /&gt;
[https://bugzilla.mozilla.org/buglist.cgi?order=cf_last_resolved;resolution=FIXED;keywords=intermittent-failure;keywords_type=allwords;field0-0-0=target_milestone;type0-0-0=anywordssubstr;value0-0-0={{AURORA_VERSION}}%20{{NIGHTLY_VERSION}};field0-1-0=product;type0-1-0=nowordssubstr;value0-1-0=MailNews%20QA%20Thunderbird;field0-2-0=cf_status_firefox{{BETA_VERSION}};type0-2-0=nowordssubstr;value0-2-0=fixed%20verified%20wontfix%20unaffected%20disabled; Fixed intermittents that affect Fx44]&lt;/div&gt;</summary>
		<author><name>KWierso</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Unified_Repos&amp;diff=1101017</id>
		<title>Sheriffing/How To/Unified Repos</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Unified_Repos&amp;diff=1101017"/>
		<updated>2015-10-16T17:16:10Z</updated>

		<summary type="html">&lt;p&gt;KWierso: hg log -fr [branch]&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Unified Repos ==&lt;br /&gt;
* http://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/unifiedrepo.html&lt;br /&gt;
* https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/firefoxtree.html&lt;br /&gt;
&lt;br /&gt;
=== Setting up the repo ===&lt;br /&gt;
* Set up your ssh key yourself&lt;br /&gt;
* Install Mercurial 3.2 or higher&lt;br /&gt;
* Make a copy of your .hgrc file for safekeeping and delete the original&lt;br /&gt;
* hg clone https://hg.mozilla.org/mozilla-central&lt;br /&gt;
* cd mozilla-central&lt;br /&gt;
* ./mach mercurial-setup&lt;br /&gt;
Configure mercurial as desired &amp;lt;br /&amp;gt;&lt;br /&gt;
The following will pull all (or at least most) of the branches sheriffs need to have on hand:&lt;br /&gt;
* hg pull inbound &amp;amp;&amp;amp; hg pull b2ginbound &amp;amp;&amp;amp; hg pull fx-team &amp;amp;&amp;amp; hg pull aurora &amp;amp;&amp;amp; hg pull beta &amp;amp;&amp;amp; hg pull esr31 &amp;amp;&amp;amp; hg pull b2g34 &amp;amp;&amp;amp; hg pull b2g32 &amp;amp;&amp;amp; hg pull b2g30 &lt;br /&gt;
If you need other branches, you can find their names in the [https://hg.mozilla.org/hgcustom/version-control-tools/file/default/pylib/mozautomation/mozautomation/repository.py firefoxtree extension source].&lt;br /&gt;
&lt;br /&gt;
You should now have everything set up for proper use! &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Maybe rename the folder from &amp;quot;mozilla-central&amp;quot; to &amp;quot;unifiedrepo&amp;quot; or something to make it clear it&#039;s more than just mozilla-central?&lt;br /&gt;
&lt;br /&gt;
The `hg fxheads` command should list references to each of the relevant branch names, and the current revision and commit message for each.&lt;br /&gt;
&lt;br /&gt;
With [https://bugzilla.mozilla.org/show_bug.cgi?id=1116861 bug 1116861] landed in version-control-tools, you can now use the following commands to pull from groups of repositories with a single command:&lt;br /&gt;
* hg pull fxtrees # this will pull from all branches listed with the fxheads command&lt;br /&gt;
* hg pull integration # this will pull from the mozilla-inbound, b2g-inbound, and fx-team branches&lt;br /&gt;
* hg pull releases # this will pull from pretty much every release branch (FYI: including old, unused branches)&lt;br /&gt;
&lt;br /&gt;
=== Merges ===&lt;br /&gt;
This assumes you have your unified repo all set up so that `hg fxheads` lists each of central, b2ginbound, fx-team, and inbound.&lt;br /&gt;
&lt;br /&gt;
To merge a specific non-tip &amp;lt;revision&amp;gt; from mozilla-inbound to mozilla-central:&lt;br /&gt;
# hg pull central&lt;br /&gt;
# hg pull inbound&lt;br /&gt;
# hg up central&lt;br /&gt;
# hg merge -r &amp;lt;revision&amp;gt;&lt;br /&gt;
# hg commit -m &amp;quot;Merge mozilla-inbound to mozilla-central a=merge&amp;quot;&lt;br /&gt;
# hg push -r . central&lt;br /&gt;
&lt;br /&gt;
To merge mozilla-central into mozilla-inbound:&lt;br /&gt;
# hg pull central&lt;br /&gt;
# hg pull inbound&lt;br /&gt;
# hg up inbound&lt;br /&gt;
# hg merge central&lt;br /&gt;
# hg commit -m &amp;quot;Merge mozilla-central to mozilla-inbound a=merge&amp;quot;&lt;br /&gt;
# hg push -r . inbound&lt;br /&gt;
&lt;br /&gt;
* If the `hg merge central` command results in &amp;quot;abort: nothing to merge&amp;quot;, you should instead use `hg update -r &amp;lt;mozilla-central&#039;s tip revision&amp;gt;` to do a non-merging update, then you can do `hg push -r . inbound` to push it as usual.&lt;br /&gt;
&lt;br /&gt;
=== Checkin-neededs ===&lt;br /&gt;
This assumes we&#039;re checking things in to fx-team. Replace fx-team with another branch name as needed.&lt;br /&gt;
&lt;br /&gt;
===== Single repository and single set of patches =====&lt;br /&gt;
Update fx-team and prepare for the patches:&lt;br /&gt;
* hg pull fx-team&lt;br /&gt;
* hg up fx-team&lt;br /&gt;
* hg bookmark fx-team-checkins&lt;br /&gt;
Import the patches:&lt;br /&gt;
* hg import https://link.to/correct/checkin-needed.patch&lt;br /&gt;
* Repeat ^ as needed for all fx-team checkin-needed patches&lt;br /&gt;
Verify your outgoing changes:&lt;br /&gt;
* hg out -r . fx-team&lt;br /&gt;
If you haven&#039;t lost a push race:&lt;br /&gt;
* hg push -r . fx-team&lt;br /&gt;
If you lost a push race:&lt;br /&gt;
* hg pull fx-team&lt;br /&gt;
* hg rebase -d fx-team&lt;br /&gt;
* hg push -r . fx-team&lt;br /&gt;
Delete your no longer needed bookmark:&lt;br /&gt;
* hg bookmark -d fx-team-checkins&lt;br /&gt;
&lt;br /&gt;
===== Multiple repositories with a single set of patches each =====&lt;br /&gt;
You can set up multiple sets of patches at once against multiple repositories:&lt;br /&gt;
Update fx-team&lt;br /&gt;
* hg pull fx-team &amp;amp;&amp;amp; hg up fx-team&lt;br /&gt;
Create a bookmark to base your fx-team checkin-needed patches&lt;br /&gt;
* hg bookmark fxteam-checkins&lt;br /&gt;
Import a bunch of patches against fx-team&lt;br /&gt;
* hg import &amp;lt;patch1&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch2&amp;gt;&lt;br /&gt;
Update inbound and make a bookmark for inbound patches&lt;br /&gt;
* hg pull inbound &amp;amp;&amp;amp; hg up inbound &amp;amp;&amp;amp; hg bookmark inbound-checkins&lt;br /&gt;
Import some patches against inbound&lt;br /&gt;
* hg import &amp;lt;patch3&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch4&amp;gt;&lt;br /&gt;
See what you&#039;d be pushing to inbound and push it&lt;br /&gt;
* hg out -r . inbound # this will only show patch3 and patch4&lt;br /&gt;
* hg push -r . inbound # this only pushes patch3 and patch4&lt;br /&gt;
* hg bookmark -d inbound-checkins # delete inbound&#039;s checkin bookmark as it&#039;s not needed&lt;br /&gt;
Go back to your fx-team checkins and add another patch to the bookmark, then push it&lt;br /&gt;
* hg up fxteam-checkins&lt;br /&gt;
* hg import &amp;lt;patch5&amp;gt;&lt;br /&gt;
* hg out -r . fx-team # this will be patch1, patch2, and patch5&lt;br /&gt;
* hg push -r . fx-team&lt;br /&gt;
* hg bookmark -d fxteam-checkins&lt;br /&gt;
&lt;br /&gt;
===== Single repository with multiple sets of patches =====&lt;br /&gt;
Or have multiple sets of patches against a single repository:&lt;br /&gt;
Update fx-team&lt;br /&gt;
* hg pull fx-team &amp;amp;&amp;amp; hg up fx-team&lt;br /&gt;
Make the first bookmark/set&lt;br /&gt;
* hg bookmark fxteam-checkins-1&lt;br /&gt;
* hg import &amp;lt;patch1&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch2&amp;gt;&lt;br /&gt;
Make the second set&lt;br /&gt;
* hg up fx-team &amp;amp;&amp;amp; hg bookmark fxteam-checkins-2&lt;br /&gt;
* hg import &amp;lt;patch3&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch4&amp;gt;&lt;br /&gt;
See what&#039;s going to be pushed in each&lt;br /&gt;
* hg out -r . fx-team # patch3 and patch4&lt;br /&gt;
* hg up fxteam-checkins-1 &amp;amp;&amp;amp; hg out -r . fx-team # patch1 and patch2&lt;br /&gt;
Push the first set&lt;br /&gt;
* hg push -r . fx-team # pushes patch1 and patch2&lt;br /&gt;
Get ready to push the second set&lt;br /&gt;
* hg up fxteam-checkins-2&lt;br /&gt;
* hg rebase -d fx-team # Rebase the second set onto the now-pushed first set&lt;br /&gt;
And push it&lt;br /&gt;
* hg push -r . fx-team # pushes patch3 and patch4&lt;br /&gt;
Delete the now-unneeded bookmarks&lt;br /&gt;
* hg bookmark -d fxteam-checkins-1&lt;br /&gt;
* hg bookmark -d fxteam-checkins-2&lt;br /&gt;
&lt;br /&gt;
=== Uplifts ===&lt;br /&gt;
If branch-specific patches are posted, follow the checkin-needed instructions above, importing the patches onto the release branch.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re uplifting directly from an m-c checkin to aurora:&lt;br /&gt;
&lt;br /&gt;
Pull and update to prepare for the uplifts:&lt;br /&gt;
* hg pull central&lt;br /&gt;
* hg pull aurora&lt;br /&gt;
* hg up aurora&lt;br /&gt;
Graft the mc commit and bring up the editor to edit the commit message, adding &amp;quot;a=foo&amp;quot; as needed:&lt;br /&gt;
* hg graft --edit -r &amp;lt;revision&amp;gt;&lt;br /&gt;
Repeat the previous step as needed for all uplifts as needed.&lt;br /&gt;
Verify the outgoing changes and push:&lt;br /&gt;
* hg out -r . aurora&lt;br /&gt;
* hg push -r . aurora&lt;br /&gt;
&lt;br /&gt;
You can graft a range of commits at once if that&#039;s easier:&lt;br /&gt;
* hg graft -r &amp;lt;toprevision&amp;gt;::&amp;lt;bottomrevision&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Read the documentation for [https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/unifiedrepo.html#uplifting-backporting-commits graft] for further help.&lt;br /&gt;
&lt;br /&gt;
=== Backouts ===&lt;br /&gt;
Better tools are coming:&lt;br /&gt;
* https://bugzilla.mozilla.org/show_bug.cgi?id=1117632&lt;br /&gt;
* https://bugzilla.mozilla.org/show_bug.cgi?id=1121211&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The standard backout command makes backing out revisions more difficult than it should, as it won&#039;t pre-fill the backout commit message with a bug number:&lt;br /&gt;
* Copy backout &amp;lt;revision&amp;gt; from treeherder, note the bug &amp;lt;number&amp;gt;, and remember the &amp;lt;reason&amp;gt;&lt;br /&gt;
* `hg backout -r &amp;lt;revision&amp;gt;`&lt;br /&gt;
** This should open up your editor with a completely empty commit message. Type in the backout message like &amp;quot;Backout revision &amp;lt;revision&amp;gt; (bug &amp;lt;number&amp;gt;) for &amp;lt;reason&amp;gt;&amp;quot; (possibly with &amp;quot;CLOSED TREE&amp;quot; in there to get around a closure hook).&lt;br /&gt;
* `hg push -r . &amp;lt;tree&amp;gt;`&lt;br /&gt;
&lt;br /&gt;
[https://hg.mozilla.org/hgcustom/version-control-tools/file/4e7ab9638cf0/hgext/qbackout qbackout] can probably still be used (assuming you don&#039;t use `hg share` to get multiple working directories, as mq doesn&#039;t play nice with shared repos):&lt;br /&gt;
* Copy the backout &amp;lt;revision&amp;gt; from treeherder&lt;br /&gt;
* `hg qbackout -e -r &amp;lt;revision&amp;gt;`&lt;br /&gt;
** This should open up your editor with a pre-formed commit message like &amp;quot;Backed out &amp;lt;revision&amp;gt; (bug &amp;lt;number&amp;gt;)&amp;quot;. Add in the &amp;lt;reason&amp;gt; and possibly &amp;quot;CLOSED TREE&amp;quot; to get around a closure hook.&lt;br /&gt;
* `hg qfin -a &amp;amp;&amp;amp; hg push -r . &amp;lt;tree&amp;gt;`&lt;br /&gt;
&lt;br /&gt;
qbackout can also back out a range of commits in a single backout commit:&lt;br /&gt;
* `hg qbackout -e -s -r &amp;lt;toprevision&amp;gt;:&amp;lt;bottomrevision&amp;gt;`&lt;br /&gt;
** This will open your editor with a pre-formed commit message like &amp;quot;Backed out &amp;lt;toprevision&amp;gt;,&amp;lt;anymiddlerevisions&amp;gt;,&amp;lt;bottomrevision&amp;gt; (bug &amp;lt;number&amp;gt;,any other bug &amp;lt;numbers&amp;gt;)&amp;quot;. Add in the &amp;lt;reason&amp;gt; and possibly &amp;quot;CLOSED TREE&amp;quot; to get around a closure hook.&lt;br /&gt;
* `hg qfin -a ** hg push -r . &amp;lt;tree&amp;gt;`&lt;br /&gt;
(Omit qbackout&#039;s -s flag to back out each individual revision in the range as a separate commit.)&lt;br /&gt;
&lt;br /&gt;
==== Revert a backout ====&lt;br /&gt;
* https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/common.html#revive-a-commit-that-was-backed-out&lt;br /&gt;
&lt;br /&gt;
=== Rebasing after losing a push race ===&lt;br /&gt;
This assumes you have commits you&#039;re attempting to push to mozilla-inbound when you lose a push race with someone. Change `inbound` to the correct branch name as needed.&lt;br /&gt;
&lt;br /&gt;
* hg pull inbound &lt;br /&gt;
* hg rebase -d inbound &lt;br /&gt;
* hg push -r . inbound&lt;br /&gt;
&lt;br /&gt;
=== Recovering from mistakes ===&lt;br /&gt;
&amp;lt;big&amp;gt;WARNING:&amp;lt;/big&amp;gt; This will strip out any commits that haven&#039;t been pushed to the remote repositories, regardless of what branch/label/tag those commits are on. (So if you have local changes on inbound and run this command to strip something bad on fx-team, both inbound and fx-team will be stripped.) Only do this if you don&#039;t care about any of those commits!&lt;br /&gt;
* hg strip &#039;not public()&#039;&lt;br /&gt;
&lt;br /&gt;
You may also need to use some combination of the following to get things back to a known-good state:&lt;br /&gt;
* hg purge # http://mercurial.selenic.com/wiki/PurgeExtension&lt;br /&gt;
* hg up -C&lt;br /&gt;
&lt;br /&gt;
=== See what you&#039;re about to push ===&lt;br /&gt;
`hg out` without any flags added will show you a LOT of unrelated commits. To see just what you&#039;ll be pushing to a given branch, use `hg out -r . &amp;lt;branch&amp;gt;`&lt;br /&gt;
* hg out -r . inbound&lt;br /&gt;
** This will only display the things you&#039;re about to push to the inbound branch&lt;br /&gt;
&lt;br /&gt;
=== View incoming changes ===&lt;br /&gt;
Since your unified repo will likely have all changesets from the various branches pulled locally, `hg in &amp;lt;somebranch&amp;gt; -r &amp;lt;somerev&amp;gt;` will likely not help you see what would be pulled into your current branch from &amp;lt;somebranch&amp;gt; up to that &amp;lt;somerev&amp;gt;.&lt;br /&gt;
Instead, you can use the following to print out the equivalent. Say you want to see what would be merged onto mozilla-central from b2g-inbound&#039;s revision ca142ec8ba0f:&lt;br /&gt;
&lt;br /&gt;
Make sure m-c is fully up to date:&lt;br /&gt;
* hg pull central &lt;br /&gt;
* hg up central &lt;br /&gt;
Get all of b2g-inbound&#039;s changesets:&lt;br /&gt;
* hg pull b2ginbound&lt;br /&gt;
Do a preview of the merge without actually performing the merge:&lt;br /&gt;
* hg merge -r ca142ec8ba0f -P&lt;br /&gt;
This will print out everything on b2g-inbound (up to and including revision ca142ec8ba0f) that is not already on mozilla-central.&lt;br /&gt;
&lt;br /&gt;
=== See the log for a particular log ===&lt;br /&gt;
* hg log -fr [branch]&lt;br /&gt;
&lt;br /&gt;
= Extras =&lt;br /&gt;
== hg aliases ==&lt;br /&gt;
I set up the following aliases in my global .hgrc file to make merging things around trunk a little faster:&lt;br /&gt;
 [alias]&lt;br /&gt;
 # merge tree $1, revision $2 to central, optionally appending $3 (for &amp;quot;CLOSED TREE&amp;quot;, etc)&lt;br /&gt;
 mergetocentral = !$HG pull central ; $HG up central ; $HG pull $1 ; $HG merge $2 ; $HG commit -m &amp;quot;Merge $1 to central, a=merge $3&amp;quot; ; $HG push -r . central&lt;br /&gt;
 # merge central tip to tree $1, optionally appending $2 (for &amp;quot;CLOSED TREE&amp;quot;, etc)&lt;br /&gt;
 mergetointegration = !$HG pull central ; $HG pull $1 ; $HG up $1 ; $HG merge central ; $HG commit -m &amp;quot;Merge m-c to $1, a=merge $2&amp;quot; ; $HG push -r . $1&lt;br /&gt;
&lt;br /&gt;
With these set up, I can merge fx-team&#039;s revision 04a3d9130aa0 over to mozilla-central with the following command:&lt;br /&gt;
 hg mergetocentral fx-team 04a3d9130aa0&lt;br /&gt;
and then I can merge mozilla-central&#039;s tip back to fx-team with the following command:&lt;br /&gt;
 hg mergetointegration fx-team&lt;br /&gt;
This cuts down on a lot of repetitive typing, saving a bit of time.&lt;br /&gt;
&lt;br /&gt;
For merging from reviewboard patches, there&#039;s this alias&lt;br /&gt;
  rbimport = !hg transplant -e -s https://reviewboard-hg.mozilla.org/gecko -b $1&lt;br /&gt;
&lt;br /&gt;
Then, it&#039;s matter of importing the right hash like the following command:&lt;br /&gt;
  hg rbimport dd1462ba321db983061b94e30cee92b6bd81e908&lt;/div&gt;</summary>
		<author><name>KWierso</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Unified_Repos&amp;diff=1078083</id>
		<title>Sheriffing/How To/Unified Repos</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Unified_Repos&amp;diff=1078083"/>
		<updated>2015-06-03T01:53:28Z</updated>

		<summary type="html">&lt;p&gt;KWierso: /* Extras */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Unified Repos ==&lt;br /&gt;
* http://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/unifiedrepo.html&lt;br /&gt;
* https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/firefoxtree.html&lt;br /&gt;
&lt;br /&gt;
=== Setting up the repo ===&lt;br /&gt;
* Set up your ssh key yourself&lt;br /&gt;
* Install Mercurial 3.2 or higher&lt;br /&gt;
* Make a copy of your .hgrc file for safekeeping and delete the original&lt;br /&gt;
* hg clone https://hg.mozilla.org/mozilla-central&lt;br /&gt;
* cd mozilla-central&lt;br /&gt;
* ./mach mercurial-setup&lt;br /&gt;
Configure mercurial as desired &amp;lt;br /&amp;gt;&lt;br /&gt;
The following will pull all (or at least most) of the branches sheriffs need to have on hand:&lt;br /&gt;
* hg pull inbound &amp;amp;&amp;amp; hg pull b2ginbound &amp;amp;&amp;amp; hg pull fx-team &amp;amp;&amp;amp; hg pull aurora &amp;amp;&amp;amp; hg pull beta &amp;amp;&amp;amp; hg pull esr31 &amp;amp;&amp;amp; hg pull b2g34 &amp;amp;&amp;amp; hg pull b2g32 &amp;amp;&amp;amp; hg pull b2g30 &lt;br /&gt;
If you need other branches, you can find their names in the [https://hg.mozilla.org/hgcustom/version-control-tools/file/default/pylib/mozautomation/mozautomation/repository.py firefoxtree extension source].&lt;br /&gt;
&lt;br /&gt;
You should now have everything set up for proper use! &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Maybe rename the folder from &amp;quot;mozilla-central&amp;quot; to &amp;quot;unifiedrepo&amp;quot; or something to make it clear it&#039;s more than just mozilla-central?&lt;br /&gt;
&lt;br /&gt;
The `hg fxheads` command should list references to each of the relevant branch names, and the current revision and commit message for each.&lt;br /&gt;
&lt;br /&gt;
With [https://bugzilla.mozilla.org/show_bug.cgi?id=1116861 bug 1116861] landed in version-control-tools, you can now use the following commands to pull from groups of repositories with a single command:&lt;br /&gt;
* hg pull fxtrees # this will pull from all branches listed with the fxheads command&lt;br /&gt;
* hg pull integration # this will pull from the mozilla-inbound, b2g-inbound, and fx-team branches&lt;br /&gt;
* hg pull releases # this will pull from pretty much every release branch (FYI: including old, unused branches)&lt;br /&gt;
&lt;br /&gt;
=== Merges ===&lt;br /&gt;
This assumes you have your unified repo all set up so that `hg fxheads` lists each of central, b2ginbound, fx-team, and inbound.&lt;br /&gt;
&lt;br /&gt;
To merge a specific non-tip &amp;lt;revision&amp;gt; from mozilla-inbound to mozilla-central:&lt;br /&gt;
# hg pull central&lt;br /&gt;
# hg pull inbound&lt;br /&gt;
# hg up central&lt;br /&gt;
# hg merge -r &amp;lt;revision&amp;gt;&lt;br /&gt;
# hg commit -m &amp;quot;Merge mozilla-inbound to mozilla-central a=merge&amp;quot;&lt;br /&gt;
# hg push -r . central&lt;br /&gt;
&lt;br /&gt;
To merge mozilla-central into mozilla-inbound:&lt;br /&gt;
# hg pull central&lt;br /&gt;
# hg pull inbound&lt;br /&gt;
# hg up inbound&lt;br /&gt;
# hg merge central&lt;br /&gt;
# hg commit -m &amp;quot;Merge mozilla-central to mozilla-inbound a=merge&amp;quot;&lt;br /&gt;
# hg push -r . inbound&lt;br /&gt;
&lt;br /&gt;
* If the `hg merge central` command results in &amp;quot;abort: nothing to merge&amp;quot;, you should instead use `hg update -r &amp;lt;mozilla-central&#039;s tip revision&amp;gt;` to do a non-merging update, then you can do `hg push -r . inbound` to push it as usual.&lt;br /&gt;
&lt;br /&gt;
=== Checkin-neededs ===&lt;br /&gt;
This assumes we&#039;re checking things in to fx-team. Replace fx-team with another branch name as needed.&lt;br /&gt;
&lt;br /&gt;
===== Single repository and single set of patches =====&lt;br /&gt;
Update fx-team and prepare for the patches:&lt;br /&gt;
* hg pull fx-team&lt;br /&gt;
* hg up fx-team&lt;br /&gt;
* hg bookmark fx-team-checkins&lt;br /&gt;
Import the patches:&lt;br /&gt;
* hg import https://link.to/correct/checkin-needed.patch&lt;br /&gt;
* Repeat ^ as needed for all fx-team checkin-needed patches&lt;br /&gt;
Verify your outgoing changes:&lt;br /&gt;
* hg out -r . fx-team&lt;br /&gt;
If you haven&#039;t lost a push race:&lt;br /&gt;
* hg push -r . fx-team&lt;br /&gt;
If you lost a push race:&lt;br /&gt;
* hg pull fx-team&lt;br /&gt;
* hg rebase -d fx-team&lt;br /&gt;
* hg push -r . fx-team&lt;br /&gt;
Delete your no longer needed bookmark:&lt;br /&gt;
* hg bookmark -d fx-team-checkins&lt;br /&gt;
&lt;br /&gt;
===== Multiple repositories with a single set of patches each =====&lt;br /&gt;
You can set up multiple sets of patches at once against multiple repositories:&lt;br /&gt;
Update fx-team&lt;br /&gt;
* hg pull fx-team &amp;amp;&amp;amp; hg up fx-team&lt;br /&gt;
Create a bookmark to base your fx-team checkin-needed patches&lt;br /&gt;
* hg bookmark fxteam-checkins&lt;br /&gt;
Import a bunch of patches against fx-team&lt;br /&gt;
* hg import &amp;lt;patch1&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch2&amp;gt;&lt;br /&gt;
Update inbound and make a bookmark for inbound patches&lt;br /&gt;
* hg pull inbound &amp;amp;&amp;amp; hg up inbound &amp;amp;&amp;amp; hg bookmark inbound-checkins&lt;br /&gt;
Import some patches against inbound&lt;br /&gt;
* hg import &amp;lt;patch3&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch4&amp;gt;&lt;br /&gt;
See what you&#039;d be pushing to inbound and push it&lt;br /&gt;
* hg out -r . inbound # this will only show patch3 and patch4&lt;br /&gt;
* hg push -r . inbound # this only pushes patch3 and patch4&lt;br /&gt;
* hg bookmark -d inbound-checkins # delete inbound&#039;s checkin bookmark as it&#039;s not needed&lt;br /&gt;
Go back to your fx-team checkins and add another patch to the bookmark, then push it&lt;br /&gt;
* hg up fxteam-checkins&lt;br /&gt;
* hg import &amp;lt;patch5&amp;gt;&lt;br /&gt;
* hg out -r . fx-team # this will be patch1, patch2, and patch5&lt;br /&gt;
* hg push -r . fx-team&lt;br /&gt;
* hg bookmark -d fxteam-checkins&lt;br /&gt;
&lt;br /&gt;
===== Single repository with multiple sets of patches =====&lt;br /&gt;
Or have multiple sets of patches against a single repository:&lt;br /&gt;
Update fx-team&lt;br /&gt;
* hg pull fx-team &amp;amp;&amp;amp; hg up fx-team&lt;br /&gt;
Make the first bookmark/set&lt;br /&gt;
* hg bookmark fxteam-checkins-1&lt;br /&gt;
* hg import &amp;lt;patch1&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch2&amp;gt;&lt;br /&gt;
Make the second set&lt;br /&gt;
* hg up fx-team &amp;amp;&amp;amp; hg bookmark fxteam-checkins-2&lt;br /&gt;
* hg import &amp;lt;patch3&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch4&amp;gt;&lt;br /&gt;
See what&#039;s going to be pushed in each&lt;br /&gt;
* hg out -r . fx-team # patch3 and patch4&lt;br /&gt;
* hg up fxteam-checkins-1 &amp;amp;&amp;amp; hg out -r . fx-team # patch1 and patch2&lt;br /&gt;
Push the first set&lt;br /&gt;
* hg push -r . fx-team # pushes patch1 and patch2&lt;br /&gt;
Get ready to push the second set&lt;br /&gt;
* hg up fxteam-checkins-2&lt;br /&gt;
* hg rebase -d fx-team # Rebase the second set onto the now-pushed first set&lt;br /&gt;
And push it&lt;br /&gt;
* hg push -r . fx-team # pushes patch3 and patch4&lt;br /&gt;
Delete the now-unneeded bookmarks&lt;br /&gt;
* hg bookmark -d fxteam-checkins-1&lt;br /&gt;
* hg bookmark -d fxteam-checkins-2&lt;br /&gt;
&lt;br /&gt;
=== Uplifts ===&lt;br /&gt;
If branch-specific patches are posted, follow the checkin-needed instructions above, importing the patches onto the release branch.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re uplifting directly from an m-c checkin to aurora:&lt;br /&gt;
&lt;br /&gt;
Pull and update to prepare for the uplifts:&lt;br /&gt;
* hg pull central&lt;br /&gt;
* hg pull aurora&lt;br /&gt;
* hg up aurora&lt;br /&gt;
Graft the mc commit and bring up the editor to edit the commit message, adding &amp;quot;a=foo&amp;quot; as needed:&lt;br /&gt;
* hg graft --edit -r &amp;lt;revision&amp;gt;&lt;br /&gt;
Repeat the previous step as needed for all uplifts as needed.&lt;br /&gt;
Verify the outgoing changes and push:&lt;br /&gt;
* hg out -r . aurora&lt;br /&gt;
* hg push -r . aurora&lt;br /&gt;
&lt;br /&gt;
You can graft a range of commits at once if that&#039;s easier:&lt;br /&gt;
* hg graft -r &amp;lt;toprevision&amp;gt;::&amp;lt;bottomrevision&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Read the documentation for [https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/unifiedrepo.html#uplifting-backporting-commits graft] for further help.&lt;br /&gt;
&lt;br /&gt;
=== Backouts ===&lt;br /&gt;
Better tools are coming:&lt;br /&gt;
* https://bugzilla.mozilla.org/show_bug.cgi?id=1117632&lt;br /&gt;
* https://bugzilla.mozilla.org/show_bug.cgi?id=1121211&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The standard backout command makes backing out revisions more difficult than it should, as it won&#039;t pre-fill the backout commit message with a bug number:&lt;br /&gt;
* Copy backout &amp;lt;revision&amp;gt; from treeherder, note the bug &amp;lt;number&amp;gt;, and remember the &amp;lt;reason&amp;gt;&lt;br /&gt;
* `hg backout -r &amp;lt;revision&amp;gt;`&lt;br /&gt;
** This should open up your editor with a completely empty commit message. Type in the backout message like &amp;quot;Backout revision &amp;lt;revision&amp;gt; (bug &amp;lt;number&amp;gt;) for &amp;lt;reason&amp;gt;&amp;quot; (possibly with &amp;quot;CLOSED TREE&amp;quot; in there to get around a closure hook).&lt;br /&gt;
* `hg push -r . &amp;lt;tree&amp;gt;`&lt;br /&gt;
&lt;br /&gt;
[https://hg.mozilla.org/hgcustom/version-control-tools/file/4e7ab9638cf0/hgext/qbackout qbackout] can probably still be used (assuming you don&#039;t use `hg share` to get multiple working directories, as mq doesn&#039;t play nice with shared repos):&lt;br /&gt;
* Copy the backout &amp;lt;revision&amp;gt; from treeherder&lt;br /&gt;
* `hg qbackout -e -r &amp;lt;revision&amp;gt;`&lt;br /&gt;
** This should open up your editor with a pre-formed commit message like &amp;quot;Backed out &amp;lt;revision&amp;gt; (bug &amp;lt;number&amp;gt;)&amp;quot;. Add in the &amp;lt;reason&amp;gt; and possibly &amp;quot;CLOSED TREE&amp;quot; to get around a closure hook.&lt;br /&gt;
* `hg qfin -a &amp;amp;&amp;amp; hg push -r . &amp;lt;tree&amp;gt;`&lt;br /&gt;
&lt;br /&gt;
qbackout can also back out a range of commits in a single backout commit:&lt;br /&gt;
* `hg qbackout -e -s -r &amp;lt;toprevision&amp;gt;:&amp;lt;bottomrevision&amp;gt;`&lt;br /&gt;
** This will open your editor with a pre-formed commit message like &amp;quot;Backed out &amp;lt;toprevision&amp;gt;,&amp;lt;anymiddlerevisions&amp;gt;,&amp;lt;bottomrevision&amp;gt; (bug &amp;lt;number&amp;gt;,any other bug &amp;lt;numbers&amp;gt;)&amp;quot;. Add in the &amp;lt;reason&amp;gt; and possibly &amp;quot;CLOSED TREE&amp;quot; to get around a closure hook.&lt;br /&gt;
* `hg qfin -a ** hg push -r . &amp;lt;tree&amp;gt;`&lt;br /&gt;
(Omit qbackout&#039;s -s flag to back out each individual revision in the range as a separate commit.)&lt;br /&gt;
&lt;br /&gt;
==== Revert a backout ====&lt;br /&gt;
* https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/common.html#revive-a-commit-that-was-backed-out&lt;br /&gt;
&lt;br /&gt;
=== Rebasing after losing a push race ===&lt;br /&gt;
This assumes you have commits you&#039;re attempting to push to mozilla-inbound when you lose a push race with someone. Change `inbound` to the correct branch name as needed.&lt;br /&gt;
&lt;br /&gt;
* hg pull inbound &lt;br /&gt;
* hg rebase -d inbound &lt;br /&gt;
* hg push -r . inbound&lt;br /&gt;
&lt;br /&gt;
=== Recovering from mistakes ===&lt;br /&gt;
&amp;lt;big&amp;gt;WARNING:&amp;lt;/big&amp;gt; This will strip out any commits that haven&#039;t been pushed to the remote repositories, regardless of what branch/label/tag those commits are on. (So if you have local changes on inbound and run this command to strip something bad on fx-team, both inbound and fx-team will be stripped.) Only do this if you don&#039;t care about any of those commits!&lt;br /&gt;
* hg strip &#039;not public()&#039;&lt;br /&gt;
&lt;br /&gt;
You may also need to use some combination of the following to get things back to a known-good state:&lt;br /&gt;
* hg purge # http://mercurial.selenic.com/wiki/PurgeExtension&lt;br /&gt;
* hg up -C&lt;br /&gt;
&lt;br /&gt;
=== See what you&#039;re about to push ===&lt;br /&gt;
`hg out` without any flags added will show you a LOT of unrelated commits. To see just what you&#039;ll be pushing to a given branch, use `hg out -r . &amp;lt;branch&amp;gt;`&lt;br /&gt;
* hg out -r . inbound&lt;br /&gt;
** This will only display the things you&#039;re about to push to the inbound branch&lt;br /&gt;
&lt;br /&gt;
=== View incoming changes ===&lt;br /&gt;
Since your unified repo will likely have all changesets from the various branches pulled locally, `hg in &amp;lt;somebranch&amp;gt; -r &amp;lt;somerev&amp;gt;` will likely not help you see what would be pulled into your current branch from &amp;lt;somebranch&amp;gt; up to that &amp;lt;somerev&amp;gt;.&lt;br /&gt;
Instead, you can use the following to print out the equivalent. Say you want to see what would be merged onto mozilla-central from b2g-inbound&#039;s revision ca142ec8ba0f:&lt;br /&gt;
&lt;br /&gt;
Make sure m-c is fully up to date:&lt;br /&gt;
* hg pull central &lt;br /&gt;
* hg up central &lt;br /&gt;
Get all of b2g-inbound&#039;s changesets:&lt;br /&gt;
* hg pull b2ginbound&lt;br /&gt;
Do a preview of the merge without actually performing the merge:&lt;br /&gt;
* hg merge -r ca142ec8ba0f -P&lt;br /&gt;
This will print out everything on b2g-inbound (up to and including revision ca142ec8ba0f) that is not already on mozilla-central.&lt;br /&gt;
&lt;br /&gt;
= Extras =&lt;br /&gt;
== hg aliases ==&lt;br /&gt;
I set up the following aliases in my global .hgrc file to make merging things around trunk a little faster:&lt;br /&gt;
 [alias]&lt;br /&gt;
 # merge tree $1, revision $2 to central, optionally appending $3 (for &amp;quot;CLOSED TREE&amp;quot;, etc)&lt;br /&gt;
 mergetocentral = !$HG pull central ; $HG up central ; $HG pull $1 ; $HG merge $2 ; $HG commit -m &amp;quot;Merge $1 to central, a=merge $3&amp;quot; ; $HG push -r . central&lt;br /&gt;
 # merge central tip to tree $1, optionally appending $2 (for &amp;quot;CLOSED TREE&amp;quot;, etc)&lt;br /&gt;
 mergetointegration = !$HG pull central ; $HG pull $1 ; $HG up $1 ; $HG merge central ; $HG commit -m &amp;quot;Merge m-c to $1, a=merge $2&amp;quot; ; $HG push -r . $1&lt;br /&gt;
&lt;br /&gt;
With these set up, I can merge fx-team&#039;s revision 04a3d9130aa0 over to mozilla-central with the following command:&lt;br /&gt;
 hg mergetocentral fx-team 04a3d9130aa0&lt;br /&gt;
and then I can merge mozilla-central&#039;s tip back to fx-team with the following command:&lt;br /&gt;
 hg mergetointegration fx-team&lt;br /&gt;
This cuts down on a lot of repetitive typing, saving a bit of time.&lt;/div&gt;</summary>
		<author><name>KWierso</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Unified_Repos&amp;diff=1078082</id>
		<title>Sheriffing/How To/Unified Repos</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Unified_Repos&amp;diff=1078082"/>
		<updated>2015-06-03T01:52:45Z</updated>

		<summary type="html">&lt;p&gt;KWierso: Added some useful hg aliases.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Unified Repos ==&lt;br /&gt;
* http://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/unifiedrepo.html&lt;br /&gt;
* https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/firefoxtree.html&lt;br /&gt;
&lt;br /&gt;
=== Setting up the repo ===&lt;br /&gt;
* Set up your ssh key yourself&lt;br /&gt;
* Install Mercurial 3.2 or higher&lt;br /&gt;
* Make a copy of your .hgrc file for safekeeping and delete the original&lt;br /&gt;
* hg clone https://hg.mozilla.org/mozilla-central&lt;br /&gt;
* cd mozilla-central&lt;br /&gt;
* ./mach mercurial-setup&lt;br /&gt;
Configure mercurial as desired &amp;lt;br /&amp;gt;&lt;br /&gt;
The following will pull all (or at least most) of the branches sheriffs need to have on hand:&lt;br /&gt;
* hg pull inbound &amp;amp;&amp;amp; hg pull b2ginbound &amp;amp;&amp;amp; hg pull fx-team &amp;amp;&amp;amp; hg pull aurora &amp;amp;&amp;amp; hg pull beta &amp;amp;&amp;amp; hg pull esr31 &amp;amp;&amp;amp; hg pull b2g34 &amp;amp;&amp;amp; hg pull b2g32 &amp;amp;&amp;amp; hg pull b2g30 &lt;br /&gt;
If you need other branches, you can find their names in the [https://hg.mozilla.org/hgcustom/version-control-tools/file/default/pylib/mozautomation/mozautomation/repository.py firefoxtree extension source].&lt;br /&gt;
&lt;br /&gt;
You should now have everything set up for proper use! &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Maybe rename the folder from &amp;quot;mozilla-central&amp;quot; to &amp;quot;unifiedrepo&amp;quot; or something to make it clear it&#039;s more than just mozilla-central?&lt;br /&gt;
&lt;br /&gt;
The `hg fxheads` command should list references to each of the relevant branch names, and the current revision and commit message for each.&lt;br /&gt;
&lt;br /&gt;
With [https://bugzilla.mozilla.org/show_bug.cgi?id=1116861 bug 1116861] landed in version-control-tools, you can now use the following commands to pull from groups of repositories with a single command:&lt;br /&gt;
* hg pull fxtrees # this will pull from all branches listed with the fxheads command&lt;br /&gt;
* hg pull integration # this will pull from the mozilla-inbound, b2g-inbound, and fx-team branches&lt;br /&gt;
* hg pull releases # this will pull from pretty much every release branch (FYI: including old, unused branches)&lt;br /&gt;
&lt;br /&gt;
=== Merges ===&lt;br /&gt;
This assumes you have your unified repo all set up so that `hg fxheads` lists each of central, b2ginbound, fx-team, and inbound.&lt;br /&gt;
&lt;br /&gt;
To merge a specific non-tip &amp;lt;revision&amp;gt; from mozilla-inbound to mozilla-central:&lt;br /&gt;
# hg pull central&lt;br /&gt;
# hg pull inbound&lt;br /&gt;
# hg up central&lt;br /&gt;
# hg merge -r &amp;lt;revision&amp;gt;&lt;br /&gt;
# hg commit -m &amp;quot;Merge mozilla-inbound to mozilla-central a=merge&amp;quot;&lt;br /&gt;
# hg push -r . central&lt;br /&gt;
&lt;br /&gt;
To merge mozilla-central into mozilla-inbound:&lt;br /&gt;
# hg pull central&lt;br /&gt;
# hg pull inbound&lt;br /&gt;
# hg up inbound&lt;br /&gt;
# hg merge central&lt;br /&gt;
# hg commit -m &amp;quot;Merge mozilla-central to mozilla-inbound a=merge&amp;quot;&lt;br /&gt;
# hg push -r . inbound&lt;br /&gt;
&lt;br /&gt;
* If the `hg merge central` command results in &amp;quot;abort: nothing to merge&amp;quot;, you should instead use `hg update -r &amp;lt;mozilla-central&#039;s tip revision&amp;gt;` to do a non-merging update, then you can do `hg push -r . inbound` to push it as usual.&lt;br /&gt;
&lt;br /&gt;
=== Checkin-neededs ===&lt;br /&gt;
This assumes we&#039;re checking things in to fx-team. Replace fx-team with another branch name as needed.&lt;br /&gt;
&lt;br /&gt;
===== Single repository and single set of patches =====&lt;br /&gt;
Update fx-team and prepare for the patches:&lt;br /&gt;
* hg pull fx-team&lt;br /&gt;
* hg up fx-team&lt;br /&gt;
* hg bookmark fx-team-checkins&lt;br /&gt;
Import the patches:&lt;br /&gt;
* hg import https://link.to/correct/checkin-needed.patch&lt;br /&gt;
* Repeat ^ as needed for all fx-team checkin-needed patches&lt;br /&gt;
Verify your outgoing changes:&lt;br /&gt;
* hg out -r . fx-team&lt;br /&gt;
If you haven&#039;t lost a push race:&lt;br /&gt;
* hg push -r . fx-team&lt;br /&gt;
If you lost a push race:&lt;br /&gt;
* hg pull fx-team&lt;br /&gt;
* hg rebase -d fx-team&lt;br /&gt;
* hg push -r . fx-team&lt;br /&gt;
Delete your no longer needed bookmark:&lt;br /&gt;
* hg bookmark -d fx-team-checkins&lt;br /&gt;
&lt;br /&gt;
===== Multiple repositories with a single set of patches each =====&lt;br /&gt;
You can set up multiple sets of patches at once against multiple repositories:&lt;br /&gt;
Update fx-team&lt;br /&gt;
* hg pull fx-team &amp;amp;&amp;amp; hg up fx-team&lt;br /&gt;
Create a bookmark to base your fx-team checkin-needed patches&lt;br /&gt;
* hg bookmark fxteam-checkins&lt;br /&gt;
Import a bunch of patches against fx-team&lt;br /&gt;
* hg import &amp;lt;patch1&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch2&amp;gt;&lt;br /&gt;
Update inbound and make a bookmark for inbound patches&lt;br /&gt;
* hg pull inbound &amp;amp;&amp;amp; hg up inbound &amp;amp;&amp;amp; hg bookmark inbound-checkins&lt;br /&gt;
Import some patches against inbound&lt;br /&gt;
* hg import &amp;lt;patch3&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch4&amp;gt;&lt;br /&gt;
See what you&#039;d be pushing to inbound and push it&lt;br /&gt;
* hg out -r . inbound # this will only show patch3 and patch4&lt;br /&gt;
* hg push -r . inbound # this only pushes patch3 and patch4&lt;br /&gt;
* hg bookmark -d inbound-checkins # delete inbound&#039;s checkin bookmark as it&#039;s not needed&lt;br /&gt;
Go back to your fx-team checkins and add another patch to the bookmark, then push it&lt;br /&gt;
* hg up fxteam-checkins&lt;br /&gt;
* hg import &amp;lt;patch5&amp;gt;&lt;br /&gt;
* hg out -r . fx-team # this will be patch1, patch2, and patch5&lt;br /&gt;
* hg push -r . fx-team&lt;br /&gt;
* hg bookmark -d fxteam-checkins&lt;br /&gt;
&lt;br /&gt;
===== Single repository with multiple sets of patches =====&lt;br /&gt;
Or have multiple sets of patches against a single repository:&lt;br /&gt;
Update fx-team&lt;br /&gt;
* hg pull fx-team &amp;amp;&amp;amp; hg up fx-team&lt;br /&gt;
Make the first bookmark/set&lt;br /&gt;
* hg bookmark fxteam-checkins-1&lt;br /&gt;
* hg import &amp;lt;patch1&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch2&amp;gt;&lt;br /&gt;
Make the second set&lt;br /&gt;
* hg up fx-team &amp;amp;&amp;amp; hg bookmark fxteam-checkins-2&lt;br /&gt;
* hg import &amp;lt;patch3&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch4&amp;gt;&lt;br /&gt;
See what&#039;s going to be pushed in each&lt;br /&gt;
* hg out -r . fx-team # patch3 and patch4&lt;br /&gt;
* hg up fxteam-checkins-1 &amp;amp;&amp;amp; hg out -r . fx-team # patch1 and patch2&lt;br /&gt;
Push the first set&lt;br /&gt;
* hg push -r . fx-team # pushes patch1 and patch2&lt;br /&gt;
Get ready to push the second set&lt;br /&gt;
* hg up fxteam-checkins-2&lt;br /&gt;
* hg rebase -d fx-team # Rebase the second set onto the now-pushed first set&lt;br /&gt;
And push it&lt;br /&gt;
* hg push -r . fx-team # pushes patch3 and patch4&lt;br /&gt;
Delete the now-unneeded bookmarks&lt;br /&gt;
* hg bookmark -d fxteam-checkins-1&lt;br /&gt;
* hg bookmark -d fxteam-checkins-2&lt;br /&gt;
&lt;br /&gt;
=== Uplifts ===&lt;br /&gt;
If branch-specific patches are posted, follow the checkin-needed instructions above, importing the patches onto the release branch.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re uplifting directly from an m-c checkin to aurora:&lt;br /&gt;
&lt;br /&gt;
Pull and update to prepare for the uplifts:&lt;br /&gt;
* hg pull central&lt;br /&gt;
* hg pull aurora&lt;br /&gt;
* hg up aurora&lt;br /&gt;
Graft the mc commit and bring up the editor to edit the commit message, adding &amp;quot;a=foo&amp;quot; as needed:&lt;br /&gt;
* hg graft --edit -r &amp;lt;revision&amp;gt;&lt;br /&gt;
Repeat the previous step as needed for all uplifts as needed.&lt;br /&gt;
Verify the outgoing changes and push:&lt;br /&gt;
* hg out -r . aurora&lt;br /&gt;
* hg push -r . aurora&lt;br /&gt;
&lt;br /&gt;
You can graft a range of commits at once if that&#039;s easier:&lt;br /&gt;
* hg graft -r &amp;lt;toprevision&amp;gt;::&amp;lt;bottomrevision&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Read the documentation for [https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/unifiedrepo.html#uplifting-backporting-commits graft] for further help.&lt;br /&gt;
&lt;br /&gt;
=== Backouts ===&lt;br /&gt;
Better tools are coming:&lt;br /&gt;
* https://bugzilla.mozilla.org/show_bug.cgi?id=1117632&lt;br /&gt;
* https://bugzilla.mozilla.org/show_bug.cgi?id=1121211&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The standard backout command makes backing out revisions more difficult than it should, as it won&#039;t pre-fill the backout commit message with a bug number:&lt;br /&gt;
* Copy backout &amp;lt;revision&amp;gt; from treeherder, note the bug &amp;lt;number&amp;gt;, and remember the &amp;lt;reason&amp;gt;&lt;br /&gt;
* `hg backout -r &amp;lt;revision&amp;gt;`&lt;br /&gt;
** This should open up your editor with a completely empty commit message. Type in the backout message like &amp;quot;Backout revision &amp;lt;revision&amp;gt; (bug &amp;lt;number&amp;gt;) for &amp;lt;reason&amp;gt;&amp;quot; (possibly with &amp;quot;CLOSED TREE&amp;quot; in there to get around a closure hook).&lt;br /&gt;
* `hg push -r . &amp;lt;tree&amp;gt;`&lt;br /&gt;
&lt;br /&gt;
[https://hg.mozilla.org/hgcustom/version-control-tools/file/4e7ab9638cf0/hgext/qbackout qbackout] can probably still be used (assuming you don&#039;t use `hg share` to get multiple working directories, as mq doesn&#039;t play nice with shared repos):&lt;br /&gt;
* Copy the backout &amp;lt;revision&amp;gt; from treeherder&lt;br /&gt;
* `hg qbackout -e -r &amp;lt;revision&amp;gt;`&lt;br /&gt;
** This should open up your editor with a pre-formed commit message like &amp;quot;Backed out &amp;lt;revision&amp;gt; (bug &amp;lt;number&amp;gt;)&amp;quot;. Add in the &amp;lt;reason&amp;gt; and possibly &amp;quot;CLOSED TREE&amp;quot; to get around a closure hook.&lt;br /&gt;
* `hg qfin -a &amp;amp;&amp;amp; hg push -r . &amp;lt;tree&amp;gt;`&lt;br /&gt;
&lt;br /&gt;
qbackout can also back out a range of commits in a single backout commit:&lt;br /&gt;
* `hg qbackout -e -s -r &amp;lt;toprevision&amp;gt;:&amp;lt;bottomrevision&amp;gt;`&lt;br /&gt;
** This will open your editor with a pre-formed commit message like &amp;quot;Backed out &amp;lt;toprevision&amp;gt;,&amp;lt;anymiddlerevisions&amp;gt;,&amp;lt;bottomrevision&amp;gt; (bug &amp;lt;number&amp;gt;,any other bug &amp;lt;numbers&amp;gt;)&amp;quot;. Add in the &amp;lt;reason&amp;gt; and possibly &amp;quot;CLOSED TREE&amp;quot; to get around a closure hook.&lt;br /&gt;
* `hg qfin -a ** hg push -r . &amp;lt;tree&amp;gt;`&lt;br /&gt;
(Omit qbackout&#039;s -s flag to back out each individual revision in the range as a separate commit.)&lt;br /&gt;
&lt;br /&gt;
==== Revert a backout ====&lt;br /&gt;
* https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/common.html#revive-a-commit-that-was-backed-out&lt;br /&gt;
&lt;br /&gt;
=== Rebasing after losing a push race ===&lt;br /&gt;
This assumes you have commits you&#039;re attempting to push to mozilla-inbound when you lose a push race with someone. Change `inbound` to the correct branch name as needed.&lt;br /&gt;
&lt;br /&gt;
* hg pull inbound &lt;br /&gt;
* hg rebase -d inbound &lt;br /&gt;
* hg push -r . inbound&lt;br /&gt;
&lt;br /&gt;
=== Recovering from mistakes ===&lt;br /&gt;
&amp;lt;big&amp;gt;WARNING:&amp;lt;/big&amp;gt; This will strip out any commits that haven&#039;t been pushed to the remote repositories, regardless of what branch/label/tag those commits are on. (So if you have local changes on inbound and run this command to strip something bad on fx-team, both inbound and fx-team will be stripped.) Only do this if you don&#039;t care about any of those commits!&lt;br /&gt;
* hg strip &#039;not public()&#039;&lt;br /&gt;
&lt;br /&gt;
You may also need to use some combination of the following to get things back to a known-good state:&lt;br /&gt;
* hg purge # http://mercurial.selenic.com/wiki/PurgeExtension&lt;br /&gt;
* hg up -C&lt;br /&gt;
&lt;br /&gt;
=== See what you&#039;re about to push ===&lt;br /&gt;
`hg out` without any flags added will show you a LOT of unrelated commits. To see just what you&#039;ll be pushing to a given branch, use `hg out -r . &amp;lt;branch&amp;gt;`&lt;br /&gt;
* hg out -r . inbound&lt;br /&gt;
** This will only display the things you&#039;re about to push to the inbound branch&lt;br /&gt;
&lt;br /&gt;
=== View incoming changes ===&lt;br /&gt;
Since your unified repo will likely have all changesets from the various branches pulled locally, `hg in &amp;lt;somebranch&amp;gt; -r &amp;lt;somerev&amp;gt;` will likely not help you see what would be pulled into your current branch from &amp;lt;somebranch&amp;gt; up to that &amp;lt;somerev&amp;gt;.&lt;br /&gt;
Instead, you can use the following to print out the equivalent. Say you want to see what would be merged onto mozilla-central from b2g-inbound&#039;s revision ca142ec8ba0f:&lt;br /&gt;
&lt;br /&gt;
Make sure m-c is fully up to date:&lt;br /&gt;
* hg pull central &lt;br /&gt;
* hg up central &lt;br /&gt;
Get all of b2g-inbound&#039;s changesets:&lt;br /&gt;
* hg pull b2ginbound&lt;br /&gt;
Do a preview of the merge without actually performing the merge:&lt;br /&gt;
* hg merge -r ca142ec8ba0f -P&lt;br /&gt;
This will print out everything on b2g-inbound (up to and including revision ca142ec8ba0f) that is not already on mozilla-central.&lt;br /&gt;
&lt;br /&gt;
= Extras =&lt;br /&gt;
I set up the following aliases in my global .hgrc file to make merging things around trunk a little faster:&lt;br /&gt;
 [alias]&lt;br /&gt;
 # merge tree $1, revision $2 to central, optionally appending $3 (for &amp;quot;CLOSED TREE&amp;quot;, etc)&lt;br /&gt;
 mergetocentral = !$HG pull central ; $HG up central ; $HG pull $1 ; $HG merge $2 ; $HG commit -m &amp;quot;Merge $1 to central, a=merge $3&amp;quot; ; $HG push -r . central&lt;br /&gt;
 # merge central tip to tree $1, optionally appending $2 (for &amp;quot;CLOSED TREE&amp;quot;, etc)&lt;br /&gt;
 mergetointegration = !$HG pull central ; $HG pull $1 ; $HG up $1 ; $HG merge central ; $HG commit -m &amp;quot;Merge m-c to $1, a=merge $2&amp;quot; ; $HG push -r . $1&lt;br /&gt;
&lt;br /&gt;
With these set up, I can merge fx-team&#039;s revision 04a3d9130aa0 over to mozilla-central with the following command:&lt;br /&gt;
 hg mergetocentral fx-team 04a3d9130aa0&lt;br /&gt;
and then I can merge mozilla-central&#039;s tip back to fx-team with the following command:&lt;br /&gt;
 hg mergetointegration fx-team&lt;br /&gt;
This cuts down on a lot of repetitive typing, saving a bit of time.&lt;/div&gt;</summary>
		<author><name>KWierso</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Auto-tools/Meetings/2015-05-04&amp;diff=1071997</id>
		<title>Auto-tools/Meetings/2015-05-04</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Auto-tools/Meetings/2015-05-04&amp;diff=1071997"/>
		<updated>2015-05-04T16:50:56Z</updated>

		<summary type="html">&lt;p&gt;KWierso: /* Misc */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Notices, Highlights, Roundtable =&lt;br /&gt;
* Significant Contributions&lt;br /&gt;
* Releng work week recap&lt;br /&gt;
* MozReview now has autoland-to-try&lt;br /&gt;
* ActiveData testfile explorer discussion&lt;br /&gt;
&lt;br /&gt;
= Newsgroup and Blog Posts =&lt;br /&gt;
* [https://groups.google.com/forum/#!topic/mozilla.dev.platform/4aTa1iEUuXY You can now log into BMO with your GitHub account]&lt;br /&gt;
* [https://gbrownmozilla.wordpress.com/2015/04/23/android-4-3-opt-tests-running-on-trunk-trees/ Android 4.3 opt tests]&lt;br /&gt;
&lt;br /&gt;
= Goal Updates =&lt;br /&gt;
&lt;br /&gt;
* Please update status at https://docs.google.com/a/mozilla.com/document/d/1U3VXk7K5iTmZvqqtX4sc-Znhch9ZAD98Vl1OyWRqZwo/edit#&lt;br /&gt;
&lt;br /&gt;
= Other Project Updates =&lt;br /&gt;
&lt;br /&gt;
= Holidays and Trips =&lt;br /&gt;
&lt;br /&gt;
= Misc =&lt;/div&gt;</summary>
		<author><name>KWierso</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Auto-tools/Meetings/2015-05-04&amp;diff=1070577</id>
		<title>Auto-tools/Meetings/2015-05-04</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Auto-tools/Meetings/2015-05-04&amp;diff=1070577"/>
		<updated>2015-04-27T18:22:55Z</updated>

		<summary type="html">&lt;p&gt;KWierso: Bugherder&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Notices, Highlights, Roundtable =&lt;br /&gt;
* Significant Contributions&lt;br /&gt;
&lt;br /&gt;
= Newsgroup and Blog Posts =&lt;br /&gt;
* [https://groups.google.com/forum/#!topic/mozilla.dev.platform/4aTa1iEUuXY You can now log into BMO with your GitHub account]&lt;br /&gt;
&lt;br /&gt;
= Goal Updates =&lt;br /&gt;
&lt;br /&gt;
= Other Project Updates =&lt;br /&gt;
&lt;br /&gt;
= Holidays and Trips =&lt;br /&gt;
&lt;br /&gt;
= Misc =&lt;br /&gt;
== Adding tests to Bugherder ==&lt;br /&gt;
I&#039;m wanting to add a test framework (and then tests) to Bugherder (formerly mcMerge) in bug 1156095, but I don&#039;t know where to start. It&#039;s all HTML/JS, no Node or anything fancy. Would like it to be run per-push to the Github repo (and on pull requests) as well as able to run locally. Any suggestions?&lt;/div&gt;</summary>
		<author><name>KWierso</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Unified_Repos&amp;diff=1063175</id>
		<title>Sheriffing/How To/Unified Repos</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Unified_Repos&amp;diff=1063175"/>
		<updated>2015-03-19T20:22:29Z</updated>

		<summary type="html">&lt;p&gt;KWierso: /* Setting up the repo */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Unified Repos ==&lt;br /&gt;
* http://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/unifiedrepo.html&lt;br /&gt;
* https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/firefoxtree.html&lt;br /&gt;
&lt;br /&gt;
=== Setting up the repo ===&lt;br /&gt;
* Set up your ssh key yourself&lt;br /&gt;
* Install Mercurial 3.2 or higher&lt;br /&gt;
* Make a copy of your .hgrc file for safekeeping and delete the original&lt;br /&gt;
* hg clone https://hg.mozilla.org/mozilla-central&lt;br /&gt;
* cd mozilla-central&lt;br /&gt;
* ./mach mercurial-setup&lt;br /&gt;
Configure mercurial as desired &amp;lt;br /&amp;gt;&lt;br /&gt;
The following will pull all (or at least most) of the branches sheriffs need to have on hand:&lt;br /&gt;
* hg pull inbound &amp;amp;&amp;amp; hg pull b2ginbound &amp;amp;&amp;amp; hg pull fx-team &amp;amp;&amp;amp; hg pull aurora &amp;amp;&amp;amp; hg pull beta &amp;amp;&amp;amp; hg pull esr31 &amp;amp;&amp;amp; hg pull b2g34 &amp;amp;&amp;amp; hg pull b2g32 &amp;amp;&amp;amp; hg pull b2g30 &lt;br /&gt;
If you need other branches, you can find their names in the [https://hg.mozilla.org/hgcustom/version-control-tools/file/default/pylib/mozautomation/mozautomation/repository.py firefoxtree extension source].&lt;br /&gt;
&lt;br /&gt;
You should now have everything set up for proper use! &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Maybe rename the folder from &amp;quot;mozilla-central&amp;quot; to &amp;quot;unifiedrepo&amp;quot; or something to make it clear it&#039;s more than just mozilla-central?&lt;br /&gt;
&lt;br /&gt;
The `hg fxheads` command should list references to each of the relevant branch names, and the current revision and commit message for each.&lt;br /&gt;
&lt;br /&gt;
With [https://bugzilla.mozilla.org/show_bug.cgi?id=1116861 bug 1116861] landed in version-control-tools, you can now use the following commands to pull from groups of repositories with a single command:&lt;br /&gt;
* hg pull fxtrees # this will pull from all branches listed with the fxheads command&lt;br /&gt;
* hg pull integration # this will pull from the mozilla-inbound, b2g-inbound, and fx-team branches&lt;br /&gt;
* hg pull releases # this will pull from pretty much every release branch (FYI: including old, unused branches)&lt;br /&gt;
&lt;br /&gt;
=== Merges ===&lt;br /&gt;
This assumes you have your unified repo all set up so that `hg fxheads` lists each of central, b2ginbound, fx-team, and inbound.&lt;br /&gt;
&lt;br /&gt;
To merge a specific non-tip &amp;lt;revision&amp;gt; from mozilla-inbound to mozilla-central:&lt;br /&gt;
# hg pull central&lt;br /&gt;
# hg pull inbound&lt;br /&gt;
# hg up central&lt;br /&gt;
# hg merge -r &amp;lt;revision&amp;gt;&lt;br /&gt;
# hg commit -m &amp;quot;Merge mozilla-inbound to mozilla-central a=merge&amp;quot;&lt;br /&gt;
# hg push -r . central&lt;br /&gt;
&lt;br /&gt;
To merge mozilla-central into mozilla-inbound:&lt;br /&gt;
# hg pull central&lt;br /&gt;
# hg pull inbound&lt;br /&gt;
# hg up inbound&lt;br /&gt;
# hg merge central&lt;br /&gt;
# hg commit -m &amp;quot;Merge mozilla-central to mozilla-inbound a=merge&amp;quot;&lt;br /&gt;
# hg push -r . inbound&lt;br /&gt;
&lt;br /&gt;
* If the `hg merge central` command results in &amp;quot;abort: nothing to merge&amp;quot;, you should instead use `hg update -r &amp;lt;mozilla-central&#039;s tip revision&amp;gt;` to do a non-merging update, then you can do `hg push -r . inbound` to push it as usual.&lt;br /&gt;
&lt;br /&gt;
=== Checkin-neededs ===&lt;br /&gt;
This assumes we&#039;re checking things in to fx-team. Replace fx-team with another branch name as needed.&lt;br /&gt;
&lt;br /&gt;
===== Single repository and single set of patches =====&lt;br /&gt;
Update fx-team and prepare for the patches:&lt;br /&gt;
* hg pull fx-team&lt;br /&gt;
* hg up fx-team&lt;br /&gt;
* hg bookmark fx-team-checkins&lt;br /&gt;
Import the patches:&lt;br /&gt;
* hg import https://link.to/correct/checkin-needed.patch&lt;br /&gt;
* Repeat ^ as needed for all fx-team checkin-needed patches&lt;br /&gt;
Verify your outgoing changes:&lt;br /&gt;
* hg out -r . fx-team&lt;br /&gt;
If you haven&#039;t lost a push race:&lt;br /&gt;
* hg push -r . fx-team&lt;br /&gt;
If you lost a push race:&lt;br /&gt;
* hg pull fx-team&lt;br /&gt;
* hg rebase -d fx-team&lt;br /&gt;
* hg push -r . fx-team&lt;br /&gt;
Delete your no longer needed bookmark:&lt;br /&gt;
* hg bookmark -d fx-team-checkins&lt;br /&gt;
&lt;br /&gt;
===== Multiple repositories with a single set of patches each =====&lt;br /&gt;
You can set up multiple sets of patches at once against multiple repositories:&lt;br /&gt;
Update fx-team&lt;br /&gt;
* hg pull fx-team &amp;amp;&amp;amp; hg up fx-team&lt;br /&gt;
Create a bookmark to base your fx-team checkin-needed patches&lt;br /&gt;
* hg bookmark fxteam-checkins&lt;br /&gt;
Import a bunch of patches against fx-team&lt;br /&gt;
* hg import &amp;lt;patch1&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch2&amp;gt;&lt;br /&gt;
Update inbound and make a bookmark for inbound patches&lt;br /&gt;
* hg pull inbound &amp;amp;&amp;amp; hg up inbound &amp;amp;&amp;amp; hg bookmark inbound-checkins&lt;br /&gt;
Import some patches against inbound&lt;br /&gt;
* hg import &amp;lt;patch3&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch4&amp;gt;&lt;br /&gt;
See what you&#039;d be pushing to inbound and push it&lt;br /&gt;
* hg out -r . inbound # this will only show patch3 and patch4&lt;br /&gt;
* hg push -r . inbound # this only pushes patch3 and patch4&lt;br /&gt;
* hg bookmark -d inbound-checkins # delete inbound&#039;s checkin bookmark as it&#039;s not needed&lt;br /&gt;
Go back to your fx-team checkins and add another patch to the bookmark, then push it&lt;br /&gt;
* hg up fxteam-checkins&lt;br /&gt;
* hg import &amp;lt;patch5&amp;gt;&lt;br /&gt;
* hg out -r . fx-team # this will be patch1, patch2, and patch5&lt;br /&gt;
* hg push -r . fx-team&lt;br /&gt;
* hg bookmark -d fxteam-checkins&lt;br /&gt;
&lt;br /&gt;
===== Single repository with multiple sets of patches =====&lt;br /&gt;
Or have multiple sets of patches against a single repository:&lt;br /&gt;
Update fx-team&lt;br /&gt;
* hg pull fx-team &amp;amp;&amp;amp; hg up fx-team&lt;br /&gt;
Make the first bookmark/set&lt;br /&gt;
* hg bookmark fxteam-checkins-1&lt;br /&gt;
* hg import &amp;lt;patch1&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch2&amp;gt;&lt;br /&gt;
Make the second set&lt;br /&gt;
* hg up fx-team &amp;amp;&amp;amp; hg bookmark fxteam-checkins-2&lt;br /&gt;
* hg import &amp;lt;patch3&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch4&amp;gt;&lt;br /&gt;
See what&#039;s going to be pushed in each&lt;br /&gt;
* hg out -r . fx-team # patch3 and patch4&lt;br /&gt;
* hg up fxteam-checkins-1 &amp;amp;&amp;amp; hg out -r . fx-team # patch1 and patch2&lt;br /&gt;
Push the first set&lt;br /&gt;
* hg push -r . fx-team # pushes patch1 and patch2&lt;br /&gt;
Get ready to push the second set&lt;br /&gt;
* hg up fxteam-checkins-2&lt;br /&gt;
* hg rebase -d fx-team # Rebase the second set onto the now-pushed first set&lt;br /&gt;
And push it&lt;br /&gt;
* hg push -r . fx-team # pushes patch3 and patch4&lt;br /&gt;
Delete the now-unneeded bookmarks&lt;br /&gt;
* hg bookmark -d fxteam-checkins-1&lt;br /&gt;
* hg bookmark -d fxteam-checkins-2&lt;br /&gt;
&lt;br /&gt;
=== Uplifts ===&lt;br /&gt;
If branch-specific patches are posted, follow the checkin-needed instructions above, importing the patches onto the release branch.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re uplifting directly from an m-c checkin to aurora:&lt;br /&gt;
&lt;br /&gt;
Pull and update to prepare for the uplifts:&lt;br /&gt;
* hg pull central&lt;br /&gt;
* hg pull aurora&lt;br /&gt;
* hg up aurora&lt;br /&gt;
Graft the mc commit and bring up the editor to edit the commit message, adding &amp;quot;a=foo&amp;quot; as needed:&lt;br /&gt;
* hg graft --edit -r &amp;lt;revision&amp;gt;&lt;br /&gt;
Repeat the previous step as needed for all uplifts as needed.&lt;br /&gt;
Verify the outgoing changes and push:&lt;br /&gt;
* hg out -r . aurora&lt;br /&gt;
* hg push -r . aurora&lt;br /&gt;
&lt;br /&gt;
You can graft a range of commits at once if that&#039;s easier:&lt;br /&gt;
* hg graft -r &amp;lt;toprevision&amp;gt;::&amp;lt;bottomrevision&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Read the documentation for [https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/unifiedrepo.html#uplifting-backporting-commits graft] for further help.&lt;br /&gt;
&lt;br /&gt;
=== Backouts ===&lt;br /&gt;
Better tools are coming:&lt;br /&gt;
* https://bugzilla.mozilla.org/show_bug.cgi?id=1117632&lt;br /&gt;
* https://bugzilla.mozilla.org/show_bug.cgi?id=1121211&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The standard backout command makes backing out revisions more difficult than it should, as it won&#039;t pre-fill the backout commit message with a bug number:&lt;br /&gt;
* Copy backout &amp;lt;revision&amp;gt; from treeherder, note the bug &amp;lt;number&amp;gt;, and remember the &amp;lt;reason&amp;gt;&lt;br /&gt;
* `hg backout -r &amp;lt;revision&amp;gt;`&lt;br /&gt;
** This should open up your editor with a completely empty commit message. Type in the backout message like &amp;quot;Backout revision &amp;lt;revision&amp;gt; (bug &amp;lt;number&amp;gt;) for &amp;lt;reason&amp;gt;&amp;quot; (possibly with &amp;quot;CLOSED TREE&amp;quot; in there to get around a closure hook).&lt;br /&gt;
* `hg push -r . &amp;lt;tree&amp;gt;`&lt;br /&gt;
&lt;br /&gt;
[https://hg.mozilla.org/hgcustom/version-control-tools/file/4e7ab9638cf0/hgext/qbackout qbackout] can probably still be used (assuming you don&#039;t use `hg share` to get multiple working directories, as mq doesn&#039;t play nice with shared repos):&lt;br /&gt;
* Copy the backout &amp;lt;revision&amp;gt; from treeherder&lt;br /&gt;
* `hg qbackout -e -r &amp;lt;revision&amp;gt;`&lt;br /&gt;
** This should open up your editor with a pre-formed commit message like &amp;quot;Backed out &amp;lt;revision&amp;gt; (bug &amp;lt;number&amp;gt;)&amp;quot;. Add in the &amp;lt;reason&amp;gt; and possibly &amp;quot;CLOSED TREE&amp;quot; to get around a closure hook.&lt;br /&gt;
* `hg qfin -a &amp;amp;&amp;amp; hg push -r . &amp;lt;tree&amp;gt;`&lt;br /&gt;
&lt;br /&gt;
qbackout can also back out a range of commits in a single backout commit:&lt;br /&gt;
* `hg qbackout -e -s -r &amp;lt;toprevision&amp;gt;:&amp;lt;bottomrevision&amp;gt;`&lt;br /&gt;
** This will open your editor with a pre-formed commit message like &amp;quot;Backed out &amp;lt;toprevision&amp;gt;,&amp;lt;anymiddlerevisions&amp;gt;,&amp;lt;bottomrevision&amp;gt; (bug &amp;lt;number&amp;gt;,any other bug &amp;lt;numbers&amp;gt;)&amp;quot;. Add in the &amp;lt;reason&amp;gt; and possibly &amp;quot;CLOSED TREE&amp;quot; to get around a closure hook.&lt;br /&gt;
* `hg qfin -a ** hg push -r . &amp;lt;tree&amp;gt;`&lt;br /&gt;
(Omit qbackout&#039;s -s flag to back out each individual revision in the range as a separate commit.)&lt;br /&gt;
&lt;br /&gt;
==== Revert a backout ====&lt;br /&gt;
* https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/common.html#revive-a-commit-that-was-backed-out&lt;br /&gt;
&lt;br /&gt;
=== Rebasing after losing a push race ===&lt;br /&gt;
This assumes you have commits you&#039;re attempting to push to mozilla-inbound when you lose a push race with someone. Change `inbound` to the correct branch name as needed.&lt;br /&gt;
&lt;br /&gt;
* hg pull inbound &lt;br /&gt;
* hg rebase -d inbound &lt;br /&gt;
* hg push -r . inbound&lt;br /&gt;
&lt;br /&gt;
=== Recovering from mistakes ===&lt;br /&gt;
&amp;lt;big&amp;gt;WARNING:&amp;lt;/big&amp;gt; This will strip out any commits that haven&#039;t been pushed to the remote repositories, regardless of what branch/label/tag those commits are on. (So if you have local changes on inbound and run this command to strip something bad on fx-team, both inbound and fx-team will be stripped.) Only do this if you don&#039;t care about any of those commits!&lt;br /&gt;
* hg strip &#039;not public()&#039;&lt;br /&gt;
&lt;br /&gt;
You may also need to use some combination of the following to get things back to a known-good state:&lt;br /&gt;
* hg purge # http://mercurial.selenic.com/wiki/PurgeExtension&lt;br /&gt;
* hg up -C&lt;br /&gt;
&lt;br /&gt;
=== See what you&#039;re about to push ===&lt;br /&gt;
`hg out` without any flags added will show you a LOT of unrelated commits. To see just what you&#039;ll be pushing to a given branch, use `hg out -r . &amp;lt;branch&amp;gt;`&lt;br /&gt;
* hg out -r . inbound&lt;br /&gt;
** This will only display the things you&#039;re about to push to the inbound branch&lt;br /&gt;
&lt;br /&gt;
=== View incoming changes ===&lt;br /&gt;
Since your unified repo will likely have all changesets from the various branches pulled locally, `hg in &amp;lt;somebranch&amp;gt; -r &amp;lt;somerev&amp;gt;` will likely not help you see what would be pulled into your current branch from &amp;lt;somebranch&amp;gt; up to that &amp;lt;somerev&amp;gt;.&lt;br /&gt;
Instead, you can use the following to print out the equivalent. Say you want to see what would be merged onto mozilla-central from b2g-inbound&#039;s revision ca142ec8ba0f:&lt;br /&gt;
&lt;br /&gt;
Make sure m-c is fully up to date:&lt;br /&gt;
* hg pull central &lt;br /&gt;
* hg up central &lt;br /&gt;
Get all of b2g-inbound&#039;s changesets:&lt;br /&gt;
* hg pull b2ginbound&lt;br /&gt;
Do a preview of the merge without actually performing the merge:&lt;br /&gt;
* hg merge -r ca142ec8ba0f -P&lt;br /&gt;
This will print out everything on b2g-inbound (up to and including revision ca142ec8ba0f) that is not already on mozilla-central.&lt;/div&gt;</summary>
		<author><name>KWierso</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Unified_Repos&amp;diff=1060115</id>
		<title>Sheriffing/How To/Unified Repos</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Unified_Repos&amp;diff=1060115"/>
		<updated>2015-03-05T19:56:38Z</updated>

		<summary type="html">&lt;p&gt;KWierso: /* Recovering from mistakes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Unified Repos ==&lt;br /&gt;
* http://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/unifiedrepo.html&lt;br /&gt;
* https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/firefoxtree.html&lt;br /&gt;
&lt;br /&gt;
=== Setting up the repo ===&lt;br /&gt;
* Set up your ssh key yourself&lt;br /&gt;
* Install Mercurial 3.2 or higher&lt;br /&gt;
* Make a copy of your .hgrc file for safekeeping and delete the original&lt;br /&gt;
* hg clone https://hg.mozilla.org/mozilla-central&lt;br /&gt;
* hg clone https://hg.mozilla.org/hgcustom/version-control-tools&lt;br /&gt;
* cd mozilla-central&lt;br /&gt;
* ./mach mercurial-setup&lt;br /&gt;
Configure mercurial as desired (do not enable the mq extension)&amp;lt;br /&amp;gt;&lt;br /&gt;
Edit your global .hgrc file to add the following to the [extensions] section:&lt;br /&gt;
*firefoxtree = /path/to/version-control-tools/hgext/firefoxtree&lt;br /&gt;
The following will pull all (or at least most) of the branches sheriffs need to have on hand:&lt;br /&gt;
* hg pull inbound &amp;amp;&amp;amp; hg pull b2ginbound &amp;amp;&amp;amp; hg pull fx-team &amp;amp;&amp;amp; hg pull aurora &amp;amp;&amp;amp; hg pull beta &amp;amp;&amp;amp; hg pull esr31 &amp;amp;&amp;amp; hg pull b2g34 &amp;amp;&amp;amp; hg pull b2g32 &amp;amp;&amp;amp; hg pull b2g30 &lt;br /&gt;
If you need other branches, you can find their names in the [https://hg.mozilla.org/hgcustom/version-control-tools/file/default/pylib/mozautomation/mozautomation/repository.py firefoxtree extension source].&lt;br /&gt;
&lt;br /&gt;
You should now have everything set up for proper use! &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Maybe rename the folder from &amp;quot;mozilla-central&amp;quot; to &amp;quot;unifiedrepo&amp;quot; or something to make it clear it&#039;s more than just mozilla-central?&lt;br /&gt;
&lt;br /&gt;
The `hg fxheads` command should list references to each of the relevant branch names, and the current revision and commit message for each.&lt;br /&gt;
&lt;br /&gt;
With [https://bugzilla.mozilla.org/show_bug.cgi?id=1116861 bug 1116861] landed in version-control-tools, you can now use the following commands to pull from groups of repositories with a single command:&lt;br /&gt;
* hg pull fxtrees # this will pull from all branches listed with the fxheads command&lt;br /&gt;
* hg pull integration # this will pull from the mozilla-inbound, b2g-inbound, and fx-team branches&lt;br /&gt;
* hg pull releases # this will pull from pretty much every release branch (FYI: including old, unused branches)&lt;br /&gt;
&lt;br /&gt;
=== Merges ===&lt;br /&gt;
This assumes you have your unified repo all set up so that `hg fxheads` lists each of central, b2ginbound, fx-team, and inbound.&lt;br /&gt;
&lt;br /&gt;
To merge a specific non-tip &amp;lt;revision&amp;gt; from mozilla-inbound to mozilla-central:&lt;br /&gt;
# hg pull central&lt;br /&gt;
# hg pull inbound&lt;br /&gt;
# hg up central&lt;br /&gt;
# hg merge -r &amp;lt;revision&amp;gt;&lt;br /&gt;
# hg commit -m &amp;quot;Merge mozilla-inbound to mozilla-central a=merge&amp;quot;&lt;br /&gt;
# hg push -r . central&lt;br /&gt;
&lt;br /&gt;
To merge mozilla-central into mozilla-inbound:&lt;br /&gt;
# hg pull central&lt;br /&gt;
# hg pull inbound&lt;br /&gt;
# hg up inbound&lt;br /&gt;
# hg merge central&lt;br /&gt;
# hg commit -m &amp;quot;Merge mozilla-central to mozilla-inbound a=merge&amp;quot;&lt;br /&gt;
# hg push -r . inbound&lt;br /&gt;
&lt;br /&gt;
* If the `hg merge central` command results in &amp;quot;abort: nothing to merge&amp;quot;, you should instead use `hg update -r &amp;lt;mozilla-central&#039;s tip revision&amp;gt;` to do a non-merging update, then you can do `hg push -r . inbound` to push it as usual.&lt;br /&gt;
&lt;br /&gt;
=== Checkin-neededs ===&lt;br /&gt;
This assumes we&#039;re checking things in to fx-team. Replace fx-team with another branch name as needed.&lt;br /&gt;
&lt;br /&gt;
===== Single repository and single set of patches =====&lt;br /&gt;
Update fx-team and prepare for the patches:&lt;br /&gt;
* hg pull fx-team&lt;br /&gt;
* hg up fx-team&lt;br /&gt;
* hg bookmark fx-team-checkins&lt;br /&gt;
Import the patches:&lt;br /&gt;
* hg import https://link.to/correct/checkin-needed.patch&lt;br /&gt;
* Repeat ^ as needed for all fx-team checkin-needed patches&lt;br /&gt;
Verify your outgoing changes:&lt;br /&gt;
* hg out -r . fx-team&lt;br /&gt;
If you haven&#039;t lost a push race:&lt;br /&gt;
* hg push -r . fx-team&lt;br /&gt;
If you lost a push race:&lt;br /&gt;
* hg pull fx-team&lt;br /&gt;
* hg rebase -d fx-team&lt;br /&gt;
* hg push -r . fx-team&lt;br /&gt;
Delete your no longer needed bookmark:&lt;br /&gt;
* hg bookmark -d fx-team-checkins&lt;br /&gt;
&lt;br /&gt;
===== Multiple repositories with a single set of patches each =====&lt;br /&gt;
You can set up multiple sets of patches at once against multiple repositories:&lt;br /&gt;
Update fx-team&lt;br /&gt;
* hg pull fx-team &amp;amp;&amp;amp; hg up fx-team&lt;br /&gt;
Create a bookmark to base your fx-team checkin-needed patches&lt;br /&gt;
* hg bookmark fxteam-checkins&lt;br /&gt;
Import a bunch of patches against fx-team&lt;br /&gt;
* hg import &amp;lt;patch1&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch2&amp;gt;&lt;br /&gt;
Update inbound and make a bookmark for inbound patches&lt;br /&gt;
* hg pull inbound &amp;amp;&amp;amp; hg up inbound &amp;amp;&amp;amp; hg bookmark inbound-checkins&lt;br /&gt;
Import some patches against inbound&lt;br /&gt;
* hg import &amp;lt;patch3&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch4&amp;gt;&lt;br /&gt;
See what you&#039;d be pushing to inbound and push it&lt;br /&gt;
* hg out -r . inbound # this will only show patch3 and patch4&lt;br /&gt;
* hg push -r . inbound # this only pushes patch3 and patch4&lt;br /&gt;
* hg bookmark -d inbound-checkins # delete inbound&#039;s checkin bookmark as it&#039;s not needed&lt;br /&gt;
Go back to your fx-team checkins and add another patch to the bookmark, then push it&lt;br /&gt;
* hg up fxteam-checkins&lt;br /&gt;
* hg import &amp;lt;patch5&amp;gt;&lt;br /&gt;
* hg out -r . fx-team # this will be patch1, patch2, and patch5&lt;br /&gt;
* hg push -r . fx-team&lt;br /&gt;
* hg bookmark -d fxteam-checkins&lt;br /&gt;
&lt;br /&gt;
===== Single repository with multiple sets of patches =====&lt;br /&gt;
Or have multiple sets of patches against a single repository:&lt;br /&gt;
Update fx-team&lt;br /&gt;
* hg pull fx-team &amp;amp;&amp;amp; hg up fx-team&lt;br /&gt;
Make the first bookmark/set&lt;br /&gt;
* hg bookmark fxteam-checkins-1&lt;br /&gt;
* hg import &amp;lt;patch1&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch2&amp;gt;&lt;br /&gt;
Make the second set&lt;br /&gt;
* hg up fx-team &amp;amp;&amp;amp; hg bookmark fxteam-checkins-2&lt;br /&gt;
* hg import &amp;lt;patch3&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch4&amp;gt;&lt;br /&gt;
See what&#039;s going to be pushed in each&lt;br /&gt;
* hg out -r . fx-team # patch3 and patch4&lt;br /&gt;
* hg up fxteam-checkins-1 &amp;amp;&amp;amp; hg out -r . fx-team # patch1 and patch2&lt;br /&gt;
Push the first set&lt;br /&gt;
* hg push -r . fx-team # pushes patch1 and patch2&lt;br /&gt;
Get ready to push the second set&lt;br /&gt;
* hg up fxteam-checkins-2&lt;br /&gt;
* hg rebase -d fx-team # Rebase the second set onto the now-pushed first set&lt;br /&gt;
And push it&lt;br /&gt;
* hg push -r . fx-team # pushes patch3 and patch4&lt;br /&gt;
Delete the now-unneeded bookmarks&lt;br /&gt;
* hg bookmark -d fxteam-checkins-1&lt;br /&gt;
* hg bookmark -d fxteam-checkins-2&lt;br /&gt;
&lt;br /&gt;
=== Uplifts ===&lt;br /&gt;
If branch-specific patches are posted, follow the checkin-needed instructions above, importing the patches onto the release branch.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re uplifting directly from an m-c checkin to aurora:&lt;br /&gt;
&lt;br /&gt;
Pull and update to prepare for the uplifts:&lt;br /&gt;
* hg pull central&lt;br /&gt;
* hg pull aurora&lt;br /&gt;
* hg up aurora&lt;br /&gt;
Graft the mc commit and bring up the editor to edit the commit message, adding &amp;quot;a=foo&amp;quot; as needed:&lt;br /&gt;
* hg graft --edit -r &amp;lt;revision&amp;gt;&lt;br /&gt;
Repeat the previous step as needed for all uplifts as needed.&lt;br /&gt;
Verify the outgoing changes and push:&lt;br /&gt;
* hg out -r . aurora&lt;br /&gt;
* hg push -r . aurora&lt;br /&gt;
&lt;br /&gt;
You can graft a range of commits at once if that&#039;s easier:&lt;br /&gt;
* hg graft -r &amp;lt;toprevision&amp;gt;::&amp;lt;bottomrevision&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Read the documentation for [https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/unifiedrepo.html#uplifting-backporting-commits graft] for further help.&lt;br /&gt;
&lt;br /&gt;
=== Backouts ===&lt;br /&gt;
Better tools are coming:&lt;br /&gt;
* https://bugzilla.mozilla.org/show_bug.cgi?id=1117632&lt;br /&gt;
* https://bugzilla.mozilla.org/show_bug.cgi?id=1121211&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The standard backout command makes backing out revisions more difficult than it should, as it won&#039;t pre-fill the backout commit message with a bug number:&lt;br /&gt;
* Copy backout &amp;lt;revision&amp;gt; from treeherder, note the bug &amp;lt;number&amp;gt;, and remember the &amp;lt;reason&amp;gt;&lt;br /&gt;
* `hg backout -r &amp;lt;revision&amp;gt;`&lt;br /&gt;
** This should open up your editor with a completely empty commit message. Type in the backout message like &amp;quot;Backout revision &amp;lt;revision&amp;gt; (bug &amp;lt;number&amp;gt;) for &amp;lt;reason&amp;gt;&amp;quot; (possibly with &amp;quot;CLOSED TREE&amp;quot; in there to get around a closure hook).&lt;br /&gt;
* `hg push -r . &amp;lt;tree&amp;gt;`&lt;br /&gt;
&lt;br /&gt;
[https://hg.mozilla.org/hgcustom/version-control-tools/file/4e7ab9638cf0/hgext/qbackout qbackout] can probably still be used (assuming you don&#039;t use `hg share` to get multiple working directories, as mq doesn&#039;t play nice with shared repos):&lt;br /&gt;
* Copy the backout &amp;lt;revision&amp;gt; from treeherder&lt;br /&gt;
* `hg qbackout -e -r &amp;lt;revision&amp;gt;`&lt;br /&gt;
** This should open up your editor with a pre-formed commit message like &amp;quot;Backed out &amp;lt;revision&amp;gt; (bug &amp;lt;number&amp;gt;)&amp;quot;. Add in the &amp;lt;reason&amp;gt; and possibly &amp;quot;CLOSED TREE&amp;quot; to get around a closure hook.&lt;br /&gt;
* `hg qfin -a &amp;amp;&amp;amp; hg push -r . &amp;lt;tree&amp;gt;`&lt;br /&gt;
&lt;br /&gt;
qbackout can also back out a range of commits in a single backout commit:&lt;br /&gt;
* `hg qbackout -e -s -r &amp;lt;toprevision&amp;gt;:&amp;lt;bottomrevision&amp;gt;`&lt;br /&gt;
** This will open your editor with a pre-formed commit message like &amp;quot;Backed out &amp;lt;toprevision&amp;gt;,&amp;lt;anymiddlerevisions&amp;gt;,&amp;lt;bottomrevision&amp;gt; (bug &amp;lt;number&amp;gt;,any other bug &amp;lt;numbers&amp;gt;)&amp;quot;. Add in the &amp;lt;reason&amp;gt; and possibly &amp;quot;CLOSED TREE&amp;quot; to get around a closure hook.&lt;br /&gt;
* `hg qfin -a ** hg push -r . &amp;lt;tree&amp;gt;`&lt;br /&gt;
(Omit qbackout&#039;s -s flag to back out each individual revision in the range as a separate commit.)&lt;br /&gt;
&lt;br /&gt;
==== Revert a backout ====&lt;br /&gt;
* https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/common.html#revive-a-commit-that-was-backed-out&lt;br /&gt;
&lt;br /&gt;
=== Rebasing after losing a push race ===&lt;br /&gt;
This assumes you have commits you&#039;re attempting to push to mozilla-inbound when you lose a push race with someone. Change `inbound` to the correct branch name as needed.&lt;br /&gt;
&lt;br /&gt;
* hg pull inbound &lt;br /&gt;
* hg rebase -d inbound &lt;br /&gt;
* hg push -r . inbound&lt;br /&gt;
&lt;br /&gt;
=== Recovering from mistakes ===&lt;br /&gt;
&amp;lt;big&amp;gt;WARNING:&amp;lt;/big&amp;gt; This will strip out any commits that haven&#039;t been pushed to the remote repositories, regardless of what branch/label/tag those commits are on. (So if you have local changes on inbound and run this command to strip something bad on fx-team, both inbound and fx-team will be stripped.) Only do this if you don&#039;t care about any of those commits!&lt;br /&gt;
* hg strip &#039;not public()&#039;&lt;br /&gt;
&lt;br /&gt;
You may also need to use some combination of the following to get things back to a known-good state:&lt;br /&gt;
* hg purge # http://mercurial.selenic.com/wiki/PurgeExtension&lt;br /&gt;
* hg up -C&lt;br /&gt;
&lt;br /&gt;
=== See what you&#039;re about to push ===&lt;br /&gt;
`hg out` without any flags added will show you a LOT of unrelated commits. To see just what you&#039;ll be pushing to a given branch, use `hg out -r . &amp;lt;branch&amp;gt;`&lt;br /&gt;
* hg out -r . inbound&lt;br /&gt;
** This will only display the things you&#039;re about to push to the inbound branch&lt;br /&gt;
&lt;br /&gt;
=== View incoming changes ===&lt;br /&gt;
Since your unified repo will likely have all changesets from the various branches pulled locally, `hg in &amp;lt;somebranch&amp;gt; -r &amp;lt;somerev&amp;gt;` will likely not help you see what would be pulled into your current branch from &amp;lt;somebranch&amp;gt; up to that &amp;lt;somerev&amp;gt;.&lt;br /&gt;
Instead, you can use the following to print out the equivalent. Say you want to see what would be merged onto mozilla-central from b2g-inbound&#039;s revision ca142ec8ba0f:&lt;br /&gt;
&lt;br /&gt;
Make sure m-c is fully up to date:&lt;br /&gt;
* hg pull central &lt;br /&gt;
* hg up central &lt;br /&gt;
Get all of b2g-inbound&#039;s changesets:&lt;br /&gt;
* hg pull b2ginbound&lt;br /&gt;
Do a preview of the merge without actually performing the merge:&lt;br /&gt;
* hg merge -r ca142ec8ba0f -P&lt;br /&gt;
This will print out everything on b2g-inbound (up to and including revision ca142ec8ba0f) that is not already on mozilla-central.&lt;/div&gt;</summary>
		<author><name>KWierso</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Auto-tools/The_Sheriffs&amp;diff=1054703</id>
		<title>Auto-tools/The Sheriffs</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Auto-tools/The_Sheriffs&amp;diff=1054703"/>
		<updated>2015-02-09T16:13:33Z</updated>

		<summary type="html">&lt;p&gt;KWierso: KWierso&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! Name&lt;br /&gt;
! IRC&lt;br /&gt;
! Duty Times &lt;br /&gt;
! Info&lt;br /&gt;
! core areas of involvement and more about me&lt;br /&gt;
|-&lt;br /&gt;
| Carsten Book&lt;br /&gt;
| Tomcat&lt;br /&gt;
| Sheriffduty from 8am to 5pm German Time&lt;br /&gt;
| [https://phonebook.mozilla.org/tree.php#search/cbook@mozilla.com ldap], [https://mozillians.org/en-US/u/Tomcat/ Mozillians]&lt;br /&gt;
| sheriffing, bughunter, troubleshooter. Living in Freising - Bavaria Germany and you can Read more about my contributor story [http://blog.mozilla.org/tomcat/2013/10/21/getting-started-in-the-community-today/ here] - I love working with Computers, Icehockey and Soccer&lt;br /&gt;
|-&lt;br /&gt;
| Wes Kocher&lt;br /&gt;
| KWierso&lt;br /&gt;
| Pacific Timezone (typically on duty in afternoons)&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>KWierso</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Unified_Repos&amp;diff=1054425</id>
		<title>Sheriffing/How To/Unified Repos</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Unified_Repos&amp;diff=1054425"/>
		<updated>2015-02-07T02:08:41Z</updated>

		<summary type="html">&lt;p&gt;KWierso: Formatting fix&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Unified Repos ==&lt;br /&gt;
* http://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/unifiedrepo.html&lt;br /&gt;
* https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/firefoxtree.html&lt;br /&gt;
&lt;br /&gt;
=== Setting up the repo ===&lt;br /&gt;
* Set up your ssh key yourself&lt;br /&gt;
* Install Mercurial 3.2 or higher&lt;br /&gt;
* Make a copy of your .hgrc file for safekeeping and delete the original&lt;br /&gt;
* hg clone https://hg.mozilla.org/mozilla-central&lt;br /&gt;
* hg clone https://hg.mozilla.org/hgcustom/version-control-tools&lt;br /&gt;
* cd mozilla-central&lt;br /&gt;
* ./mach mercurial-setup&lt;br /&gt;
Configure mercurial as desired (do not enable the mq extension)&amp;lt;br /&amp;gt;&lt;br /&gt;
Edit your global .hgrc file to add the following to the [extensions] section:&lt;br /&gt;
*firefoxtree = /path/to/version-control-tools/hgext/firefoxtree&lt;br /&gt;
The following will pull all (or at least most) of the branches sheriffs need to have on hand:&lt;br /&gt;
* hg pull inbound &amp;amp;&amp;amp; hg pull b2ginbound &amp;amp;&amp;amp; hg pull fx-team &amp;amp;&amp;amp; hg pull aurora &amp;amp;&amp;amp; hg pull beta &amp;amp;&amp;amp; hg pull esr31 &amp;amp;&amp;amp; hg pull b2g34 &amp;amp;&amp;amp; hg pull b2g32 &amp;amp;&amp;amp; hg pull b2g30 &lt;br /&gt;
If you need other branches, you can find their names in the [https://hg.mozilla.org/hgcustom/version-control-tools/file/default/pylib/mozautomation/mozautomation/repository.py firefoxtree extension source].&lt;br /&gt;
&lt;br /&gt;
You should now have everything set up for proper use! &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Maybe rename the folder from &amp;quot;mozilla-central&amp;quot; to &amp;quot;unifiedrepo&amp;quot; or something to make it clear it&#039;s more than just mozilla-central?&lt;br /&gt;
&lt;br /&gt;
The `hg fxheads` command should list references to each of the relevant branch names, and the current revision and commit message for each.&lt;br /&gt;
&lt;br /&gt;
With [https://bugzilla.mozilla.org/show_bug.cgi?id=1116861 bug 1116861] landed in version-control-tools, you can now use the following commands to pull from groups of repositories with a single command:&lt;br /&gt;
* hg pull fxtrees # this will pull from all branches listed with the fxheads command&lt;br /&gt;
* hg pull integration # this will pull from the mozilla-inbound, b2g-inbound, and fx-team branches&lt;br /&gt;
* hg pull releases # this will pull from pretty much every release branch (FYI: including old, unused branches)&lt;br /&gt;
&lt;br /&gt;
=== Merges ===&lt;br /&gt;
This assumes you have your unified repo all set up so that `hg fxheads` lists each of central, b2ginbound, fx-team, and inbound.&lt;br /&gt;
&lt;br /&gt;
To merge a specific non-tip &amp;lt;revision&amp;gt; from mozilla-inbound to mozilla-central:&lt;br /&gt;
# hg pull central&lt;br /&gt;
# hg pull inbound&lt;br /&gt;
# hg up central&lt;br /&gt;
# hg merge -r &amp;lt;revision&amp;gt;&lt;br /&gt;
# hg commit -m &amp;quot;Merge mozilla-inbound to mozilla-central a=merge&amp;quot;&lt;br /&gt;
# hg push -r . central&lt;br /&gt;
&lt;br /&gt;
To merge mozilla-central into mozilla-inbound:&lt;br /&gt;
# hg pull central&lt;br /&gt;
# hg pull inbound&lt;br /&gt;
# hg up inbound&lt;br /&gt;
# hg merge central&lt;br /&gt;
# hg commit -m &amp;quot;Merge mozilla-central to mozilla-inbound a=merge&amp;quot;&lt;br /&gt;
# hg push -r . inbound&lt;br /&gt;
&lt;br /&gt;
* If the `hg merge central` command results in &amp;quot;abort: nothing to merge&amp;quot;, you should instead use `hg update -r &amp;lt;mozilla-central&#039;s tip revision&amp;gt;` to do a non-merging update, then you can do `hg push -r . inbound` to push it as usual.&lt;br /&gt;
&lt;br /&gt;
=== Checkin-neededs ===&lt;br /&gt;
This assumes we&#039;re checking things in to fx-team. Replace fx-team with another branch name as needed.&lt;br /&gt;
&lt;br /&gt;
===== Single repository and single set of patches =====&lt;br /&gt;
Update fx-team and prepare for the patches:&lt;br /&gt;
* hg pull fx-team&lt;br /&gt;
* hg up fx-team&lt;br /&gt;
* hg bookmark fx-team-checkins&lt;br /&gt;
Import the patches:&lt;br /&gt;
* hg import https://link.to/correct/checkin-needed.patch&lt;br /&gt;
* Repeat ^ as needed for all fx-team checkin-needed patches&lt;br /&gt;
Verify your outgoing changes:&lt;br /&gt;
* hg out -r . fx-team&lt;br /&gt;
If you haven&#039;t lost a push race:&lt;br /&gt;
* hg push -r . fx-team&lt;br /&gt;
If you lost a push race:&lt;br /&gt;
* hg pull fx-team&lt;br /&gt;
* hg rebase -d fx-team&lt;br /&gt;
* hg push -r . fx-team&lt;br /&gt;
Delete your no longer needed bookmark:&lt;br /&gt;
* hg bookmark -d fx-team-checkins&lt;br /&gt;
&lt;br /&gt;
===== Multiple repositories with a single set of patches each =====&lt;br /&gt;
You can set up multiple sets of patches at once against multiple repositories:&lt;br /&gt;
Update fx-team&lt;br /&gt;
* hg pull fx-team &amp;amp;&amp;amp; hg up fx-team&lt;br /&gt;
Create a bookmark to base your fx-team checkin-needed patches&lt;br /&gt;
* hg bookmark fxteam-checkins&lt;br /&gt;
Import a bunch of patches against fx-team&lt;br /&gt;
* hg import &amp;lt;patch1&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch2&amp;gt;&lt;br /&gt;
Update inbound and make a bookmark for inbound patches&lt;br /&gt;
* hg pull inbound &amp;amp;&amp;amp; hg up inbound &amp;amp;&amp;amp; hg bookmark inbound-checkins&lt;br /&gt;
Import some patches against inbound&lt;br /&gt;
* hg import &amp;lt;patch3&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch4&amp;gt;&lt;br /&gt;
See what you&#039;d be pushing to inbound and push it&lt;br /&gt;
* hg out -r . inbound # this will only show patch3 and patch4&lt;br /&gt;
* hg push -r . inbound # this only pushes patch3 and patch4&lt;br /&gt;
* hg bookmark -d inbound-checkins # delete inbound&#039;s checkin bookmark as it&#039;s not needed&lt;br /&gt;
Go back to your fx-team checkins and add another patch to the bookmark, then push it&lt;br /&gt;
* hg up fxteam-checkins&lt;br /&gt;
* hg import &amp;lt;patch5&amp;gt;&lt;br /&gt;
* hg out -r . fx-team # this will be patch1, patch2, and patch5&lt;br /&gt;
* hg push -r . fx-team&lt;br /&gt;
* hg bookmark -d fxteam-checkins&lt;br /&gt;
&lt;br /&gt;
===== Single repository with multiple sets of patches =====&lt;br /&gt;
Or have multiple sets of patches against a single repository:&lt;br /&gt;
Update fx-team&lt;br /&gt;
* hg pull fx-team &amp;amp;&amp;amp; hg up fx-team&lt;br /&gt;
Make the first bookmark/set&lt;br /&gt;
* hg bookmark fxteam-checkins-1&lt;br /&gt;
* hg import &amp;lt;patch1&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch2&amp;gt;&lt;br /&gt;
Make the second set&lt;br /&gt;
* hg up fx-team &amp;amp;&amp;amp; hg bookmark fxteam-checkins-2&lt;br /&gt;
* hg import &amp;lt;patch3&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch4&amp;gt;&lt;br /&gt;
See what&#039;s going to be pushed in each&lt;br /&gt;
* hg out -r . fx-team # patch3 and patch4&lt;br /&gt;
* hg up fxteam-checkins-1 &amp;amp;&amp;amp; hg out -r . fx-team # patch1 and patch2&lt;br /&gt;
Push the first set&lt;br /&gt;
* hg push -r . fx-team # pushes patch1 and patch2&lt;br /&gt;
Get ready to push the second set&lt;br /&gt;
* hg up fxteam-checkins-2&lt;br /&gt;
* hg rebase -d fx-team # Rebase the second set onto the now-pushed first set&lt;br /&gt;
And push it&lt;br /&gt;
* hg push -r . fx-team # pushes patch3 and patch4&lt;br /&gt;
Delete the now-unneeded bookmarks&lt;br /&gt;
* hg bookmark -d fxteam-checkins-1&lt;br /&gt;
* hg bookmark -d fxteam-checkins-2&lt;br /&gt;
&lt;br /&gt;
=== Uplifts ===&lt;br /&gt;
If branch-specific patches are posted, follow the checkin-needed instructions above, importing the patches onto the release branch.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re uplifting directly from an m-c checkin to aurora:&lt;br /&gt;
&lt;br /&gt;
Pull and update to prepare for the uplifts:&lt;br /&gt;
* hg pull central&lt;br /&gt;
* hg pull aurora&lt;br /&gt;
* hg up aurora&lt;br /&gt;
Graft the mc commit and bring up the editor to edit the commit message, adding &amp;quot;a=foo&amp;quot; as needed:&lt;br /&gt;
* hg graft --edit -r &amp;lt;revision&amp;gt;&lt;br /&gt;
Repeat the previous step as needed for all uplifts as needed.&lt;br /&gt;
Verify the outgoing changes and push:&lt;br /&gt;
* hg out -r . aurora&lt;br /&gt;
* hg push -r . aurora&lt;br /&gt;
&lt;br /&gt;
You can graft a range of commits at once if that&#039;s easier:&lt;br /&gt;
* hg graft -r &amp;lt;toprevision&amp;gt;::&amp;lt;bottomrevision&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Read the documentation for [https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/unifiedrepo.html#uplifting-backporting-commits graft] for further help.&lt;br /&gt;
&lt;br /&gt;
=== Backouts ===&lt;br /&gt;
Better tools are coming:&lt;br /&gt;
* https://bugzilla.mozilla.org/show_bug.cgi?id=1117632&lt;br /&gt;
* https://bugzilla.mozilla.org/show_bug.cgi?id=1121211&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The standard backout command makes backing out revisions more difficult than it should, as it won&#039;t pre-fill the backout commit message with a bug number:&lt;br /&gt;
* Copy backout &amp;lt;revision&amp;gt; from treeherder, note the bug &amp;lt;number&amp;gt;, and remember the &amp;lt;reason&amp;gt;&lt;br /&gt;
* `hg backout -r &amp;lt;revision&amp;gt;`&lt;br /&gt;
** This should open up your editor with a completely empty commit message. Type in the backout message like &amp;quot;Backout revision &amp;lt;revision&amp;gt; (bug &amp;lt;number&amp;gt;) for &amp;lt;reason&amp;gt;&amp;quot; (possibly with &amp;quot;CLOSED TREE&amp;quot; in there to get around a closure hook).&lt;br /&gt;
* `hg push -r . &amp;lt;tree&amp;gt;`&lt;br /&gt;
&lt;br /&gt;
[https://hg.mozilla.org/hgcustom/version-control-tools/file/4e7ab9638cf0/hgext/qbackout qbackout] can probably still be used (assuming you don&#039;t use `hg share` to get multiple working directories, as mq doesn&#039;t play nice with shared repos):&lt;br /&gt;
* Copy the backout &amp;lt;revision&amp;gt; from treeherder&lt;br /&gt;
* `hg qbackout -e -r &amp;lt;revision&amp;gt;`&lt;br /&gt;
** This should open up your editor with a pre-formed commit message like &amp;quot;Backed out &amp;lt;revision&amp;gt; (bug &amp;lt;number&amp;gt;)&amp;quot;. Add in the &amp;lt;reason&amp;gt; and possibly &amp;quot;CLOSED TREE&amp;quot; to get around a closure hook.&lt;br /&gt;
* `hg qfin -a &amp;amp;&amp;amp; hg push -r . &amp;lt;tree&amp;gt;`&lt;br /&gt;
&lt;br /&gt;
qbackout can also back out a range of commits in a single backout commit:&lt;br /&gt;
* `hg qbackout -e -s -r &amp;lt;toprevision&amp;gt;:&amp;lt;bottomrevision&amp;gt;`&lt;br /&gt;
** This will open your editor with a pre-formed commit message like &amp;quot;Backed out &amp;lt;toprevision&amp;gt;,&amp;lt;anymiddlerevisions&amp;gt;,&amp;lt;bottomrevision&amp;gt; (bug &amp;lt;number&amp;gt;,any other bug &amp;lt;numbers&amp;gt;)&amp;quot;. Add in the &amp;lt;reason&amp;gt; and possibly &amp;quot;CLOSED TREE&amp;quot; to get around a closure hook.&lt;br /&gt;
* `hg qfin -a ** hg push -r . &amp;lt;tree&amp;gt;`&lt;br /&gt;
(Omit qbackout&#039;s -s flag to back out each individual revision in the range as a separate commit.)&lt;br /&gt;
&lt;br /&gt;
==== Revert a backout ====&lt;br /&gt;
* https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/common.html#revive-a-commit-that-was-backed-out&lt;br /&gt;
&lt;br /&gt;
=== Rebasing after losing a push race ===&lt;br /&gt;
This assumes you have commits you&#039;re attempting to push to mozilla-inbound when you lose a push race with someone. Change `inbound` to the correct branch name as needed.&lt;br /&gt;
&lt;br /&gt;
* hg pull inbound &lt;br /&gt;
* hg rebase -d inbound &lt;br /&gt;
* hg push -r . inbound&lt;br /&gt;
&lt;br /&gt;
=== Recovering from mistakes ===&lt;br /&gt;
&amp;lt;big&amp;gt;WARNING:&amp;lt;/big&amp;gt; This will strip out any commits that haven&#039;t been pushed to the remote repositories, regardless of what branch/label/tag those commits are on. (So if you have local changes on inbound and run this command to strip something bad on fx-team, both inbound and fx-team will be stripped.) Only do this if you don&#039;t care about any of those commits!&lt;br /&gt;
* hg strip &#039;not public()&#039;&lt;br /&gt;
&lt;br /&gt;
=== See what you&#039;re about to push ===&lt;br /&gt;
`hg out` without any flags added will show you a LOT of unrelated commits. To see just what you&#039;ll be pushing to a given branch, use `hg out -r . &amp;lt;branch&amp;gt;`&lt;br /&gt;
* hg out -r . inbound&lt;br /&gt;
** This will only display the things you&#039;re about to push to the inbound branch&lt;br /&gt;
&lt;br /&gt;
=== View incoming changes ===&lt;br /&gt;
Since your unified repo will likely have all changesets from the various branches pulled locally, `hg in &amp;lt;somebranch&amp;gt; -r &amp;lt;somerev&amp;gt;` will likely not help you see what would be pulled into your current branch from &amp;lt;somebranch&amp;gt; up to that &amp;lt;somerev&amp;gt;.&lt;br /&gt;
Instead, you can use the following to print out the equivalent. Say you want to see what would be merged onto mozilla-central from b2g-inbound&#039;s revision ca142ec8ba0f:&lt;br /&gt;
&lt;br /&gt;
Make sure m-c is fully up to date:&lt;br /&gt;
* hg pull central &lt;br /&gt;
* hg up central &lt;br /&gt;
Get all of b2g-inbound&#039;s changesets:&lt;br /&gt;
* hg pull b2ginbound&lt;br /&gt;
Do a preview of the merge without actually performing the merge:&lt;br /&gt;
* hg merge -r ca142ec8ba0f -P&lt;br /&gt;
This will print out everything on b2g-inbound (up to and including revision ca142ec8ba0f) that is not already on mozilla-central.&lt;/div&gt;</summary>
		<author><name>KWierso</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Unified_Repos&amp;diff=1054419</id>
		<title>Sheriffing/How To/Unified Repos</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Unified_Repos&amp;diff=1054419"/>
		<updated>2015-02-07T00:52:36Z</updated>

		<summary type="html">&lt;p&gt;KWierso: Fix range&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Unified Repos ==&lt;br /&gt;
* http://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/unifiedrepo.html&lt;br /&gt;
* https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/firefoxtree.html&lt;br /&gt;
&lt;br /&gt;
=== Setting up the repo ===&lt;br /&gt;
Set up your ssh key yourself&lt;br /&gt;
Install Mercurial 3.2 or higher&lt;br /&gt;
Make a copy of your .hgrc file for safekeeping and delete the original&lt;br /&gt;
* hg clone https://hg.mozilla.org/mozilla-central&lt;br /&gt;
* hg clone https://hg.mozilla.org/hgcustom/version-control-tools&lt;br /&gt;
* cd mozilla-central&lt;br /&gt;
* ./mach mercurial-setup&lt;br /&gt;
Configure mercurial as desired (do not enable the mq extension)&amp;lt;br /&amp;gt;&lt;br /&gt;
Edit your global .hgrc file to add the following to the [extensions] section:&lt;br /&gt;
*firefoxtree = /path/to/version-control-tools/hgext/firefoxtree&lt;br /&gt;
The following will pull all (or at least most) of the branches sheriffs need to have on hand:&lt;br /&gt;
* hg pull inbound &amp;amp;&amp;amp; hg pull b2ginbound &amp;amp;&amp;amp; hg pull fx-team &amp;amp;&amp;amp; hg pull aurora &amp;amp;&amp;amp; hg pull beta &amp;amp;&amp;amp; hg pull esr31 &amp;amp;&amp;amp; hg pull b2g34 &amp;amp;&amp;amp; hg pull b2g32 &amp;amp;&amp;amp; hg pull b2g30 &lt;br /&gt;
If you need other branches, you can find their names in the [https://hg.mozilla.org/hgcustom/version-control-tools/file/default/pylib/mozautomation/mozautomation/repository.py firefoxtree extension source].&lt;br /&gt;
&lt;br /&gt;
You should now have everything set up for proper use! &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Maybe rename the folder from &amp;quot;mozilla-central&amp;quot; to &amp;quot;unifiedrepo&amp;quot; or something to make it clear it&#039;s more than just mozilla-central?&lt;br /&gt;
&lt;br /&gt;
The `hg fxheads` command should list references to each of the relevant branch names, and the current revision and commit message for each.&lt;br /&gt;
&lt;br /&gt;
With [https://bugzilla.mozilla.org/show_bug.cgi?id=1116861 bug 1116861] landed in version-control-tools, you can now use the following commands to pull from groups of repositories with a single command:&lt;br /&gt;
* hg pull fxtrees # this will pull from all branches listed with the fxheads command&lt;br /&gt;
* hg pull integration # this will pull from the mozilla-inbound, b2g-inbound, and fx-team branches&lt;br /&gt;
* hg pull releases # this will pull from pretty much every release branch (FYI: including old, unused branches)&lt;br /&gt;
&lt;br /&gt;
=== Merges ===&lt;br /&gt;
This assumes you have your unified repo all set up so that `hg fxheads` lists each of central, b2ginbound, fx-team, and inbound.&lt;br /&gt;
&lt;br /&gt;
To merge a specific non-tip &amp;lt;revision&amp;gt; from mozilla-inbound to mozilla-central:&lt;br /&gt;
# hg pull central&lt;br /&gt;
# hg pull inbound&lt;br /&gt;
# hg up central&lt;br /&gt;
# hg merge -r &amp;lt;revision&amp;gt;&lt;br /&gt;
# hg commit -m &amp;quot;Merge mozilla-inbound to mozilla-central a=merge&amp;quot;&lt;br /&gt;
# hg push -r . central&lt;br /&gt;
&lt;br /&gt;
To merge mozilla-central into mozilla-inbound:&lt;br /&gt;
# hg pull central&lt;br /&gt;
# hg pull inbound&lt;br /&gt;
# hg up inbound&lt;br /&gt;
# hg merge central&lt;br /&gt;
# hg commit -m &amp;quot;Merge mozilla-central to mozilla-inbound a=merge&amp;quot;&lt;br /&gt;
# hg push -r . inbound&lt;br /&gt;
&lt;br /&gt;
* If the `hg merge central` command results in &amp;quot;abort: nothing to merge&amp;quot;, you should instead use `hg update -r &amp;lt;mozilla-central&#039;s tip revision&amp;gt;` to do a non-merging update, then you can do `hg push -r . inbound` to push it as usual.&lt;br /&gt;
&lt;br /&gt;
=== Checkin-neededs ===&lt;br /&gt;
This assumes we&#039;re checking things in to fx-team. Replace fx-team with another branch name as needed.&lt;br /&gt;
&lt;br /&gt;
===== Single repository and single set of patches =====&lt;br /&gt;
Update fx-team and prepare for the patches:&lt;br /&gt;
* hg pull fx-team&lt;br /&gt;
* hg up fx-team&lt;br /&gt;
* hg bookmark fx-team-checkins&lt;br /&gt;
Import the patches:&lt;br /&gt;
* hg import https://link.to/correct/checkin-needed.patch&lt;br /&gt;
* Repeat ^ as needed for all fx-team checkin-needed patches&lt;br /&gt;
Verify your outgoing changes:&lt;br /&gt;
* hg out -r . fx-team&lt;br /&gt;
If you haven&#039;t lost a push race:&lt;br /&gt;
* hg push -r . fx-team&lt;br /&gt;
If you lost a push race:&lt;br /&gt;
* hg pull fx-team&lt;br /&gt;
* hg rebase -d fx-team&lt;br /&gt;
* hg push -r . fx-team&lt;br /&gt;
Delete your no longer needed bookmark:&lt;br /&gt;
* hg bookmark -d fx-team-checkins&lt;br /&gt;
&lt;br /&gt;
===== Multiple repositories with a single set of patches each =====&lt;br /&gt;
You can set up multiple sets of patches at once against multiple repositories:&lt;br /&gt;
Update fx-team&lt;br /&gt;
* hg pull fx-team &amp;amp;&amp;amp; hg up fx-team&lt;br /&gt;
Create a bookmark to base your fx-team checkin-needed patches&lt;br /&gt;
* hg bookmark fxteam-checkins&lt;br /&gt;
Import a bunch of patches against fx-team&lt;br /&gt;
* hg import &amp;lt;patch1&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch2&amp;gt;&lt;br /&gt;
Update inbound and make a bookmark for inbound patches&lt;br /&gt;
* hg pull inbound &amp;amp;&amp;amp; hg up inbound &amp;amp;&amp;amp; hg bookmark inbound-checkins&lt;br /&gt;
Import some patches against inbound&lt;br /&gt;
* hg import &amp;lt;patch3&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch4&amp;gt;&lt;br /&gt;
See what you&#039;d be pushing to inbound and push it&lt;br /&gt;
* hg out -r . inbound # this will only show patch3 and patch4&lt;br /&gt;
* hg push -r . inbound # this only pushes patch3 and patch4&lt;br /&gt;
* hg bookmark -d inbound-checkins # delete inbound&#039;s checkin bookmark as it&#039;s not needed&lt;br /&gt;
Go back to your fx-team checkins and add another patch to the bookmark, then push it&lt;br /&gt;
* hg up fxteam-checkins&lt;br /&gt;
* hg import &amp;lt;patch5&amp;gt;&lt;br /&gt;
* hg out -r . fx-team # this will be patch1, patch2, and patch5&lt;br /&gt;
* hg push -r . fx-team&lt;br /&gt;
* hg bookmark -d fxteam-checkins&lt;br /&gt;
&lt;br /&gt;
===== Single repository with multiple sets of patches =====&lt;br /&gt;
Or have multiple sets of patches against a single repository:&lt;br /&gt;
Update fx-team&lt;br /&gt;
* hg pull fx-team &amp;amp;&amp;amp; hg up fx-team&lt;br /&gt;
Make the first bookmark/set&lt;br /&gt;
* hg bookmark fxteam-checkins-1&lt;br /&gt;
* hg import &amp;lt;patch1&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch2&amp;gt;&lt;br /&gt;
Make the second set&lt;br /&gt;
* hg up fx-team &amp;amp;&amp;amp; hg bookmark fxteam-checkins-2&lt;br /&gt;
* hg import &amp;lt;patch3&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch4&amp;gt;&lt;br /&gt;
See what&#039;s going to be pushed in each&lt;br /&gt;
* hg out -r . fx-team # patch3 and patch4&lt;br /&gt;
* hg up fxteam-checkins-1 &amp;amp;&amp;amp; hg out -r . fx-team # patch1 and patch2&lt;br /&gt;
Push the first set&lt;br /&gt;
* hg push -r . fx-team # pushes patch1 and patch2&lt;br /&gt;
Get ready to push the second set&lt;br /&gt;
* hg up fxteam-checkins-2&lt;br /&gt;
* hg rebase -d fx-team # Rebase the second set onto the now-pushed first set&lt;br /&gt;
And push it&lt;br /&gt;
* hg push -r . fx-team # pushes patch3 and patch4&lt;br /&gt;
Delete the now-unneeded bookmarks&lt;br /&gt;
* hg bookmark -d fxteam-checkins-1&lt;br /&gt;
* hg bookmark -d fxteam-checkins-2&lt;br /&gt;
&lt;br /&gt;
=== Uplifts ===&lt;br /&gt;
If branch-specific patches are posted, follow the checkin-needed instructions above, importing the patches onto the release branch.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re uplifting directly from an m-c checkin to aurora:&lt;br /&gt;
&lt;br /&gt;
Pull and update to prepare for the uplifts:&lt;br /&gt;
* hg pull central&lt;br /&gt;
* hg pull aurora&lt;br /&gt;
* hg up aurora&lt;br /&gt;
Graft the mc commit and bring up the editor to edit the commit message, adding &amp;quot;a=foo&amp;quot; as needed:&lt;br /&gt;
* hg graft --edit -r &amp;lt;revision&amp;gt;&lt;br /&gt;
Repeat the previous step as needed for all uplifts as needed.&lt;br /&gt;
Verify the outgoing changes and push:&lt;br /&gt;
* hg out -r . aurora&lt;br /&gt;
* hg push -r . aurora&lt;br /&gt;
&lt;br /&gt;
You can graft a range of commits at once if that&#039;s easier:&lt;br /&gt;
* hg graft -r &amp;lt;toprevision&amp;gt;::&amp;lt;bottomrevision&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Read the documentation for [https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/unifiedrepo.html#uplifting-backporting-commits graft] for further help.&lt;br /&gt;
&lt;br /&gt;
=== Backouts ===&lt;br /&gt;
Better tools are coming:&lt;br /&gt;
* https://bugzilla.mozilla.org/show_bug.cgi?id=1117632&lt;br /&gt;
* https://bugzilla.mozilla.org/show_bug.cgi?id=1121211&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The standard backout command makes backing out revisions more difficult than it should, as it won&#039;t pre-fill the backout commit message with a bug number:&lt;br /&gt;
* Copy backout &amp;lt;revision&amp;gt; from treeherder, note the bug &amp;lt;number&amp;gt;, and remember the &amp;lt;reason&amp;gt;&lt;br /&gt;
* `hg backout -r &amp;lt;revision&amp;gt;`&lt;br /&gt;
** This should open up your editor with a completely empty commit message. Type in the backout message like &amp;quot;Backout revision &amp;lt;revision&amp;gt; (bug &amp;lt;number&amp;gt;) for &amp;lt;reason&amp;gt;&amp;quot; (possibly with &amp;quot;CLOSED TREE&amp;quot; in there to get around a closure hook).&lt;br /&gt;
* `hg push -r . &amp;lt;tree&amp;gt;`&lt;br /&gt;
&lt;br /&gt;
[https://hg.mozilla.org/hgcustom/version-control-tools/file/4e7ab9638cf0/hgext/qbackout qbackout] can probably still be used (assuming you don&#039;t use `hg share` to get multiple working directories, as mq doesn&#039;t play nice with shared repos):&lt;br /&gt;
* Copy the backout &amp;lt;revision&amp;gt; from treeherder&lt;br /&gt;
* `hg qbackout -e -r &amp;lt;revision&amp;gt;`&lt;br /&gt;
** This should open up your editor with a pre-formed commit message like &amp;quot;Backed out &amp;lt;revision&amp;gt; (bug &amp;lt;number&amp;gt;)&amp;quot;. Add in the &amp;lt;reason&amp;gt; and possibly &amp;quot;CLOSED TREE&amp;quot; to get around a closure hook.&lt;br /&gt;
* `hg qfin -a &amp;amp;&amp;amp; hg push -r . &amp;lt;tree&amp;gt;`&lt;br /&gt;
&lt;br /&gt;
qbackout can also back out a range of commits in a single backout commit:&lt;br /&gt;
* `hg qbackout -e -s -r &amp;lt;toprevision&amp;gt;:&amp;lt;bottomrevision&amp;gt;`&lt;br /&gt;
** This will open your editor with a pre-formed commit message like &amp;quot;Backed out &amp;lt;toprevision&amp;gt;,&amp;lt;anymiddlerevisions&amp;gt;,&amp;lt;bottomrevision&amp;gt; (bug &amp;lt;number&amp;gt;,any other bug &amp;lt;numbers&amp;gt;)&amp;quot;. Add in the &amp;lt;reason&amp;gt; and possibly &amp;quot;CLOSED TREE&amp;quot; to get around a closure hook.&lt;br /&gt;
* `hg qfin -a ** hg push -r . &amp;lt;tree&amp;gt;`&lt;br /&gt;
(Omit qbackout&#039;s -s flag to back out each individual revision in the range as a separate commit.)&lt;br /&gt;
&lt;br /&gt;
==== Revert a backout ====&lt;br /&gt;
* https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/common.html#revive-a-commit-that-was-backed-out&lt;br /&gt;
&lt;br /&gt;
=== Rebasing after losing a push race ===&lt;br /&gt;
This assumes you have commits you&#039;re attempting to push to mozilla-inbound when you lose a push race with someone. Change `inbound` to the correct branch name as needed.&lt;br /&gt;
&lt;br /&gt;
* hg pull inbound &lt;br /&gt;
* hg rebase -d inbound &lt;br /&gt;
* hg push -r . inbound&lt;br /&gt;
&lt;br /&gt;
=== Recovering from mistakes ===&lt;br /&gt;
&amp;lt;big&amp;gt;WARNING:&amp;lt;/big&amp;gt; This will strip out any commits that haven&#039;t been pushed to the remote repositories, regardless of what branch/label/tag those commits are on. (So if you have local changes on inbound and run this command to strip something bad on fx-team, both inbound and fx-team will be stripped.) Only do this if you don&#039;t care about any of those commits!&lt;br /&gt;
* hg strip &#039;not public()&#039;&lt;br /&gt;
&lt;br /&gt;
=== See what you&#039;re about to push ===&lt;br /&gt;
`hg out` without any flags added will show you a LOT of unrelated commits. To see just what you&#039;ll be pushing to a given branch, use `hg out -r . &amp;lt;branch&amp;gt;`&lt;br /&gt;
* hg out -r . inbound&lt;br /&gt;
** This will only display the things you&#039;re about to push to the inbound branch&lt;br /&gt;
&lt;br /&gt;
=== View incoming changes ===&lt;br /&gt;
Since your unified repo will likely have all changesets from the various branches pulled locally, `hg in &amp;lt;somebranch&amp;gt; -r &amp;lt;somerev&amp;gt;` will likely not help you see what would be pulled into your current branch from &amp;lt;somebranch&amp;gt; up to that &amp;lt;somerev&amp;gt;.&lt;br /&gt;
Instead, you can use the following to print out the equivalent. Say you want to see what would be merged onto mozilla-central from b2g-inbound&#039;s revision ca142ec8ba0f:&lt;br /&gt;
&lt;br /&gt;
Make sure m-c is fully up to date:&lt;br /&gt;
* hg pull central &lt;br /&gt;
* hg up central &lt;br /&gt;
Get all of b2g-inbound&#039;s changesets:&lt;br /&gt;
* hg pull b2ginbound&lt;br /&gt;
Do a preview of the merge without actually performing the merge:&lt;br /&gt;
* hg merge -r ca142ec8ba0f -P&lt;br /&gt;
This will print out everything on b2g-inbound (up to and including revision ca142ec8ba0f) that is not already on mozilla-central.&lt;/div&gt;</summary>
		<author><name>KWierso</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Unified_Repos&amp;diff=1054418</id>
		<title>Sheriffing/How To/Unified Repos</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Unified_Repos&amp;diff=1054418"/>
		<updated>2015-02-07T00:47:47Z</updated>

		<summary type="html">&lt;p&gt;KWierso: Formatting fix&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Unified Repos ==&lt;br /&gt;
* http://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/unifiedrepo.html&lt;br /&gt;
* https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/firefoxtree.html&lt;br /&gt;
&lt;br /&gt;
=== Setting up the repo ===&lt;br /&gt;
Set up your ssh key yourself&lt;br /&gt;
Install Mercurial 3.2 or higher&lt;br /&gt;
Make a copy of your .hgrc file for safekeeping and delete the original&lt;br /&gt;
* hg clone https://hg.mozilla.org/mozilla-central&lt;br /&gt;
* hg clone https://hg.mozilla.org/hgcustom/version-control-tools&lt;br /&gt;
* cd mozilla-central&lt;br /&gt;
* ./mach mercurial-setup&lt;br /&gt;
Configure mercurial as desired (do not enable the mq extension)&amp;lt;br /&amp;gt;&lt;br /&gt;
Edit your global .hgrc file to add the following to the [extensions] section:&lt;br /&gt;
*firefoxtree = /path/to/version-control-tools/hgext/firefoxtree&lt;br /&gt;
The following will pull all (or at least most) of the branches sheriffs need to have on hand:&lt;br /&gt;
* hg pull inbound &amp;amp;&amp;amp; hg pull b2ginbound &amp;amp;&amp;amp; hg pull fx-team &amp;amp;&amp;amp; hg pull aurora &amp;amp;&amp;amp; hg pull beta &amp;amp;&amp;amp; hg pull esr31 &amp;amp;&amp;amp; hg pull b2g34 &amp;amp;&amp;amp; hg pull b2g32 &amp;amp;&amp;amp; hg pull b2g30 &lt;br /&gt;
If you need other branches, you can find their names in the [https://hg.mozilla.org/hgcustom/version-control-tools/file/default/pylib/mozautomation/mozautomation/repository.py firefoxtree extension source].&lt;br /&gt;
&lt;br /&gt;
You should now have everything set up for proper use! &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Maybe rename the folder from &amp;quot;mozilla-central&amp;quot; to &amp;quot;unifiedrepo&amp;quot; or something to make it clear it&#039;s more than just mozilla-central?&lt;br /&gt;
&lt;br /&gt;
The `hg fxheads` command should list references to each of the relevant branch names, and the current revision and commit message for each.&lt;br /&gt;
&lt;br /&gt;
With [https://bugzilla.mozilla.org/show_bug.cgi?id=1116861 bug 1116861] landed in version-control-tools, you can now use the following commands to pull from groups of repositories with a single command:&lt;br /&gt;
* hg pull fxtrees # this will pull from all branches listed with the fxheads command&lt;br /&gt;
* hg pull integration # this will pull from the mozilla-inbound, b2g-inbound, and fx-team branches&lt;br /&gt;
* hg pull releases # this will pull from pretty much every release branch (FYI: including old, unused branches)&lt;br /&gt;
&lt;br /&gt;
=== Merges ===&lt;br /&gt;
This assumes you have your unified repo all set up so that `hg fxheads` lists each of central, b2ginbound, fx-team, and inbound.&lt;br /&gt;
&lt;br /&gt;
To merge a specific non-tip &amp;lt;revision&amp;gt; from mozilla-inbound to mozilla-central:&lt;br /&gt;
# hg pull central&lt;br /&gt;
# hg pull inbound&lt;br /&gt;
# hg up central&lt;br /&gt;
# hg merge -r &amp;lt;revision&amp;gt;&lt;br /&gt;
# hg commit -m &amp;quot;Merge mozilla-inbound to mozilla-central a=merge&amp;quot;&lt;br /&gt;
# hg push -r . central&lt;br /&gt;
&lt;br /&gt;
To merge mozilla-central into mozilla-inbound:&lt;br /&gt;
# hg pull central&lt;br /&gt;
# hg pull inbound&lt;br /&gt;
# hg up inbound&lt;br /&gt;
# hg merge central&lt;br /&gt;
# hg commit -m &amp;quot;Merge mozilla-central to mozilla-inbound a=merge&amp;quot;&lt;br /&gt;
# hg push -r . inbound&lt;br /&gt;
&lt;br /&gt;
* If the `hg merge central` command results in &amp;quot;abort: nothing to merge&amp;quot;, you should instead use `hg update -r &amp;lt;mozilla-central&#039;s tip revision&amp;gt;` to do a non-merging update, then you can do `hg push -r . inbound` to push it as usual.&lt;br /&gt;
&lt;br /&gt;
=== Checkin-neededs ===&lt;br /&gt;
This assumes we&#039;re checking things in to fx-team. Replace fx-team with another branch name as needed.&lt;br /&gt;
&lt;br /&gt;
===== Single repository and single set of patches =====&lt;br /&gt;
Update fx-team and prepare for the patches:&lt;br /&gt;
* hg pull fx-team&lt;br /&gt;
* hg up fx-team&lt;br /&gt;
* hg bookmark fx-team-checkins&lt;br /&gt;
Import the patches:&lt;br /&gt;
* hg import https://link.to/correct/checkin-needed.patch&lt;br /&gt;
* Repeat ^ as needed for all fx-team checkin-needed patches&lt;br /&gt;
Verify your outgoing changes:&lt;br /&gt;
* hg out -r . fx-team&lt;br /&gt;
If you haven&#039;t lost a push race:&lt;br /&gt;
* hg push -r . fx-team&lt;br /&gt;
If you lost a push race:&lt;br /&gt;
* hg pull fx-team&lt;br /&gt;
* hg rebase -d fx-team&lt;br /&gt;
* hg push -r . fx-team&lt;br /&gt;
Delete your no longer needed bookmark:&lt;br /&gt;
* hg bookmark -d fx-team-checkins&lt;br /&gt;
&lt;br /&gt;
===== Multiple repositories with a single set of patches each =====&lt;br /&gt;
You can set up multiple sets of patches at once against multiple repositories:&lt;br /&gt;
Update fx-team&lt;br /&gt;
* hg pull fx-team &amp;amp;&amp;amp; hg up fx-team&lt;br /&gt;
Create a bookmark to base your fx-team checkin-needed patches&lt;br /&gt;
* hg bookmark fxteam-checkins&lt;br /&gt;
Import a bunch of patches against fx-team&lt;br /&gt;
* hg import &amp;lt;patch1&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch2&amp;gt;&lt;br /&gt;
Update inbound and make a bookmark for inbound patches&lt;br /&gt;
* hg pull inbound &amp;amp;&amp;amp; hg up inbound &amp;amp;&amp;amp; hg bookmark inbound-checkins&lt;br /&gt;
Import some patches against inbound&lt;br /&gt;
* hg import &amp;lt;patch3&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch4&amp;gt;&lt;br /&gt;
See what you&#039;d be pushing to inbound and push it&lt;br /&gt;
* hg out -r . inbound # this will only show patch3 and patch4&lt;br /&gt;
* hg push -r . inbound # this only pushes patch3 and patch4&lt;br /&gt;
* hg bookmark -d inbound-checkins # delete inbound&#039;s checkin bookmark as it&#039;s not needed&lt;br /&gt;
Go back to your fx-team checkins and add another patch to the bookmark, then push it&lt;br /&gt;
* hg up fxteam-checkins&lt;br /&gt;
* hg import &amp;lt;patch5&amp;gt;&lt;br /&gt;
* hg out -r . fx-team # this will be patch1, patch2, and patch5&lt;br /&gt;
* hg push -r . fx-team&lt;br /&gt;
* hg bookmark -d fxteam-checkins&lt;br /&gt;
&lt;br /&gt;
===== Single repository with multiple sets of patches =====&lt;br /&gt;
Or have multiple sets of patches against a single repository:&lt;br /&gt;
Update fx-team&lt;br /&gt;
* hg pull fx-team &amp;amp;&amp;amp; hg up fx-team&lt;br /&gt;
Make the first bookmark/set&lt;br /&gt;
* hg bookmark fxteam-checkins-1&lt;br /&gt;
* hg import &amp;lt;patch1&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch2&amp;gt;&lt;br /&gt;
Make the second set&lt;br /&gt;
* hg up fx-team &amp;amp;&amp;amp; hg bookmark fxteam-checkins-2&lt;br /&gt;
* hg import &amp;lt;patch3&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch4&amp;gt;&lt;br /&gt;
See what&#039;s going to be pushed in each&lt;br /&gt;
* hg out -r . fx-team # patch3 and patch4&lt;br /&gt;
* hg up fxteam-checkins-1 &amp;amp;&amp;amp; hg out -r . fx-team # patch1 and patch2&lt;br /&gt;
Push the first set&lt;br /&gt;
* hg push -r . fx-team # pushes patch1 and patch2&lt;br /&gt;
Get ready to push the second set&lt;br /&gt;
* hg up fxteam-checkins-2&lt;br /&gt;
* hg rebase -d fx-team # Rebase the second set onto the now-pushed first set&lt;br /&gt;
And push it&lt;br /&gt;
* hg push -r . fx-team # pushes patch3 and patch4&lt;br /&gt;
Delete the now-unneeded bookmarks&lt;br /&gt;
* hg bookmark -d fxteam-checkins-1&lt;br /&gt;
* hg bookmark -d fxteam-checkins-2&lt;br /&gt;
&lt;br /&gt;
=== Uplifts ===&lt;br /&gt;
If branch-specific patches are posted, follow the checkin-needed instructions above, importing the patches onto the release branch.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re uplifting directly from an m-c checkin to aurora:&lt;br /&gt;
&lt;br /&gt;
Pull and update to prepare for the uplifts:&lt;br /&gt;
* hg pull central&lt;br /&gt;
* hg pull aurora&lt;br /&gt;
* hg up aurora&lt;br /&gt;
Graft the mc commit and bring up the editor to edit the commit message, adding &amp;quot;a=foo&amp;quot; as needed:&lt;br /&gt;
* hg graft --edit -r &amp;lt;revision&amp;gt;&lt;br /&gt;
Repeat the previous step as needed for all uplifts as needed.&lt;br /&gt;
Verify the outgoing changes and push:&lt;br /&gt;
* hg out -r . aurora&lt;br /&gt;
* hg push -r . aurora&lt;br /&gt;
&lt;br /&gt;
You can graft a range of commits at once if that&#039;s easier:&lt;br /&gt;
* hg graft -r &amp;lt;toprevision&amp;gt;&amp;lt;bottomrevision&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Read the documentation for [https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/unifiedrepo.html#uplifting-backporting-commits graft] for further help.&lt;br /&gt;
&lt;br /&gt;
=== Backouts ===&lt;br /&gt;
Better tools are coming:&lt;br /&gt;
* https://bugzilla.mozilla.org/show_bug.cgi?id=1117632&lt;br /&gt;
* https://bugzilla.mozilla.org/show_bug.cgi?id=1121211&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The standard backout command makes backing out revisions more difficult than it should, as it won&#039;t pre-fill the backout commit message with a bug number:&lt;br /&gt;
* Copy backout &amp;lt;revision&amp;gt; from treeherder, note the bug &amp;lt;number&amp;gt;, and remember the &amp;lt;reason&amp;gt;&lt;br /&gt;
* `hg backout -r &amp;lt;revision&amp;gt;`&lt;br /&gt;
** This should open up your editor with a completely empty commit message. Type in the backout message like &amp;quot;Backout revision &amp;lt;revision&amp;gt; (bug &amp;lt;number&amp;gt;) for &amp;lt;reason&amp;gt;&amp;quot; (possibly with &amp;quot;CLOSED TREE&amp;quot; in there to get around a closure hook).&lt;br /&gt;
* `hg push -r . &amp;lt;tree&amp;gt;`&lt;br /&gt;
&lt;br /&gt;
[https://hg.mozilla.org/hgcustom/version-control-tools/file/4e7ab9638cf0/hgext/qbackout qbackout] can probably still be used (assuming you don&#039;t use `hg share` to get multiple working directories, as mq doesn&#039;t play nice with shared repos):&lt;br /&gt;
* Copy the backout &amp;lt;revision&amp;gt; from treeherder&lt;br /&gt;
* `hg qbackout -e -r &amp;lt;revision&amp;gt;`&lt;br /&gt;
** This should open up your editor with a pre-formed commit message like &amp;quot;Backed out &amp;lt;revision&amp;gt; (bug &amp;lt;number&amp;gt;)&amp;quot;. Add in the &amp;lt;reason&amp;gt; and possibly &amp;quot;CLOSED TREE&amp;quot; to get around a closure hook.&lt;br /&gt;
* `hg qfin -a &amp;amp;&amp;amp; hg push -r . &amp;lt;tree&amp;gt;`&lt;br /&gt;
&lt;br /&gt;
qbackout can also back out a range of commits in a single backout commit:&lt;br /&gt;
* `hg qbackout -e -s -r &amp;lt;toprevision&amp;gt;:&amp;lt;bottomrevision&amp;gt;`&lt;br /&gt;
** This will open your editor with a pre-formed commit message like &amp;quot;Backed out &amp;lt;toprevision&amp;gt;,&amp;lt;anymiddlerevisions&amp;gt;,&amp;lt;bottomrevision&amp;gt; (bug &amp;lt;number&amp;gt;,any other bug &amp;lt;numbers&amp;gt;)&amp;quot;. Add in the &amp;lt;reason&amp;gt; and possibly &amp;quot;CLOSED TREE&amp;quot; to get around a closure hook.&lt;br /&gt;
* `hg qfin -a ** hg push -r . &amp;lt;tree&amp;gt;`&lt;br /&gt;
(Omit qbackout&#039;s -s flag to back out each individual revision in the range as a separate commit.)&lt;br /&gt;
&lt;br /&gt;
==== Revert a backout ====&lt;br /&gt;
* https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/common.html#revive-a-commit-that-was-backed-out&lt;br /&gt;
&lt;br /&gt;
=== Rebasing after losing a push race ===&lt;br /&gt;
This assumes you have commits you&#039;re attempting to push to mozilla-inbound when you lose a push race with someone. Change `inbound` to the correct branch name as needed.&lt;br /&gt;
&lt;br /&gt;
* hg pull inbound &lt;br /&gt;
* hg rebase -d inbound &lt;br /&gt;
* hg push -r . inbound&lt;br /&gt;
&lt;br /&gt;
=== Recovering from mistakes ===&lt;br /&gt;
&amp;lt;big&amp;gt;WARNING:&amp;lt;/big&amp;gt; This will strip out any commits that haven&#039;t been pushed to the remote repositories, regardless of what branch/label/tag those commits are on. (So if you have local changes on inbound and run this command to strip something bad on fx-team, both inbound and fx-team will be stripped.) Only do this if you don&#039;t care about any of those commits!&lt;br /&gt;
* hg strip &#039;not public()&#039;&lt;br /&gt;
&lt;br /&gt;
=== See what you&#039;re about to push ===&lt;br /&gt;
`hg out` without any flags added will show you a LOT of unrelated commits. To see just what you&#039;ll be pushing to a given branch, use `hg out -r . &amp;lt;branch&amp;gt;`&lt;br /&gt;
* hg out -r . inbound&lt;br /&gt;
** This will only display the things you&#039;re about to push to the inbound branch&lt;br /&gt;
&lt;br /&gt;
=== View incoming changes ===&lt;br /&gt;
Since your unified repo will likely have all changesets from the various branches pulled locally, `hg in &amp;lt;somebranch&amp;gt; -r &amp;lt;somerev&amp;gt;` will likely not help you see what would be pulled into your current branch from &amp;lt;somebranch&amp;gt; up to that &amp;lt;somerev&amp;gt;.&lt;br /&gt;
Instead, you can use the following to print out the equivalent. Say you want to see what would be merged onto mozilla-central from b2g-inbound&#039;s revision ca142ec8ba0f:&lt;br /&gt;
&lt;br /&gt;
Make sure m-c is fully up to date:&lt;br /&gt;
* hg pull central &lt;br /&gt;
* hg up central &lt;br /&gt;
Get all of b2g-inbound&#039;s changesets:&lt;br /&gt;
* hg pull b2ginbound&lt;br /&gt;
Do a preview of the merge without actually performing the merge:&lt;br /&gt;
* hg merge -r ca142ec8ba0f -P&lt;br /&gt;
This will print out everything on b2g-inbound (up to and including revision ca142ec8ba0f) that is not already on mozilla-central.&lt;/div&gt;</summary>
		<author><name>KWierso</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Unified_Repos&amp;diff=1054417</id>
		<title>Sheriffing/How To/Unified Repos</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Unified_Repos&amp;diff=1054417"/>
		<updated>2015-02-07T00:43:45Z</updated>

		<summary type="html">&lt;p&gt;KWierso: Formatting fix&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Unified Repos ==&lt;br /&gt;
* http://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/unifiedrepo.html&lt;br /&gt;
* https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/firefoxtree.html&lt;br /&gt;
&lt;br /&gt;
=== Setting up the repo ===&lt;br /&gt;
Set up your ssh key yourself&lt;br /&gt;
Install Mercurial 3.2 or higher&lt;br /&gt;
Make a copy of your .hgrc file for safekeeping and delete the original&lt;br /&gt;
* hg clone https://hg.mozilla.org/mozilla-central&lt;br /&gt;
* hg clone https://hg.mozilla.org/hgcustom/version-control-tools&lt;br /&gt;
* cd mozilla-central&lt;br /&gt;
* ./mach mercurial-setup&lt;br /&gt;
Configure mercurial as desired (do not enable the mq extension)&amp;lt;br /&amp;gt;&lt;br /&gt;
Edit your global .hgrc file to add the following to the [extensions] section:&lt;br /&gt;
*firefoxtree = /path/to/version-control-tools/hgext/firefoxtree&lt;br /&gt;
The following will pull all (or at least most) of the branches sheriffs need to have on hand:&lt;br /&gt;
* hg pull inbound &amp;amp;&amp;amp; hg pull b2ginbound &amp;amp;&amp;amp; hg pull fx-team &amp;amp;&amp;amp; hg pull aurora &amp;amp;&amp;amp; hg pull beta &amp;amp;&amp;amp; hg pull esr31 &amp;amp;&amp;amp; hg pull b2g34 &amp;amp;&amp;amp; hg pull b2g32 &amp;amp;&amp;amp; hg pull b2g30 &lt;br /&gt;
If you need other branches, you can find their names in the [https://hg.mozilla.org/hgcustom/version-control-tools/file/default/pylib/mozautomation/mozautomation/repository.py firefoxtree extension source].&lt;br /&gt;
&lt;br /&gt;
You should now have everything set up for proper use! &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Maybe rename the folder from &amp;quot;mozilla-central&amp;quot; to &amp;quot;unifiedrepo&amp;quot; or something to make it clear it&#039;s more than just mozilla-central?&lt;br /&gt;
&lt;br /&gt;
The `hg fxheads` command should list references to each of the relevant branch names, and the current revision and commit message for each.&lt;br /&gt;
&lt;br /&gt;
With [https://bugzilla.mozilla.org/show_bug.cgi?id=1116861 bug 1116861] landed in version-control-tools, you can now use the following commands to pull from groups of repositories with a single command:&lt;br /&gt;
* hg pull fxtrees # this will pull from all branches listed with the fxheads command&lt;br /&gt;
* hg pull integration # this will pull from the mozilla-inbound, b2g-inbound, and fx-team branches&lt;br /&gt;
* hg pull releases # this will pull from pretty much every release branch (FYI: including old, unused branches)&lt;br /&gt;
&lt;br /&gt;
=== Merges ===&lt;br /&gt;
This assumes you have your unified repo all set up so that `hg fxheads` lists each of central, b2ginbound, fx-team, and inbound.&lt;br /&gt;
&lt;br /&gt;
To merge a specific non-tip &amp;lt;revision&amp;gt; from mozilla-inbound to mozilla-central:&lt;br /&gt;
# hg pull central&lt;br /&gt;
# hg pull inbound&lt;br /&gt;
# hg up central&lt;br /&gt;
# hg merge -r &amp;lt;revision&amp;gt;&lt;br /&gt;
# hg commit -m &amp;quot;Merge mozilla-inbound to mozilla-central a=merge&amp;quot;&lt;br /&gt;
# hg push -r . central&lt;br /&gt;
&lt;br /&gt;
To merge mozilla-central into mozilla-inbound:&lt;br /&gt;
# hg pull central&lt;br /&gt;
# hg pull inbound&lt;br /&gt;
# hg up inbound&lt;br /&gt;
# hg merge central&lt;br /&gt;
# hg commit -m &amp;quot;Merge mozilla-central to mozilla-inbound a=merge&amp;quot;&lt;br /&gt;
# hg push -r . inbound&lt;br /&gt;
&lt;br /&gt;
* If the `hg merge central` command results in &amp;quot;abort: nothing to merge&amp;quot;, you should instead use `hg update -r &amp;lt;mozilla-central&#039;s tip revision&amp;gt;` to do a non-merging update, then you can do `hg push -r . inbound` to push it as usual.&lt;br /&gt;
&lt;br /&gt;
=== Checkin-neededs ===&lt;br /&gt;
This assumes we&#039;re checking things in to fx-team. Replace fx-team with another branch name as needed.&lt;br /&gt;
&lt;br /&gt;
Update fx-team and prepare for the patches:&lt;br /&gt;
* hg pull fx-team&lt;br /&gt;
* hg up fx-team&lt;br /&gt;
* hg bookmark fx-team-checkins&lt;br /&gt;
Import the patches:&lt;br /&gt;
* hg import https://link.to/correct/checkin-needed.patch&lt;br /&gt;
* Repeat ^ as needed for all fx-team checkin-needed patches&lt;br /&gt;
Verify your outgoing changes:&lt;br /&gt;
* hg out -r . fx-team&lt;br /&gt;
If you haven&#039;t lost a push race:&lt;br /&gt;
* hg push -r . fx-team&lt;br /&gt;
If you lost a push race:&lt;br /&gt;
* hg pull fx-team&lt;br /&gt;
* hg rebase -d fx-team&lt;br /&gt;
* hg push -r . fx-team&lt;br /&gt;
Delete your no longer needed bookmark:&lt;br /&gt;
* hg bookmark -d fx-team-checkins&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can set up multiple sets of patches at once against multiple repositories:&lt;br /&gt;
Update fx-team&lt;br /&gt;
* hg pull fx-team &amp;amp;&amp;amp; hg up fx-team&lt;br /&gt;
Create a bookmark to base your fx-team checkin-needed patches&lt;br /&gt;
* hg bookmark fxteam-checkins&lt;br /&gt;
Import a bunch of patches against fx-team&lt;br /&gt;
* hg import &amp;lt;patch1&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch2&amp;gt;&lt;br /&gt;
Update inbound and make a bookmark for inbound patches&lt;br /&gt;
* hg pull inbound &amp;amp;&amp;amp; hg up inbound &amp;amp;&amp;amp; hg bookmark inbound-checkins&lt;br /&gt;
Import some patches against inbound&lt;br /&gt;
* hg import &amp;lt;patch3&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch4&amp;gt;&lt;br /&gt;
See what you&#039;d be pushing to inbound and push it&lt;br /&gt;
* hg out -r . inbound # this will only show patch3 and patch4&lt;br /&gt;
* hg push -r . inbound # this only pushes patch3 and patch4&lt;br /&gt;
* hg bookmark -d inbound-checkins # delete inbound&#039;s checkin bookmark as it&#039;s not needed&lt;br /&gt;
Go back to your fx-team checkins and add another patch to the bookmark, then push it&lt;br /&gt;
* hg up fxteam-checkins&lt;br /&gt;
* hg import &amp;lt;patch5&amp;gt;&lt;br /&gt;
* hg out -r . fx-team # this will be patch1, patch2, and patch5&lt;br /&gt;
* hg push -r . fx-team&lt;br /&gt;
* hg bookmark -d fxteam-checkins&lt;br /&gt;
&lt;br /&gt;
Or have multiple sets of patches against a single repository:&lt;br /&gt;
Update fx-team&lt;br /&gt;
* hg pull fx-team &amp;amp;&amp;amp; hg up fx-team&lt;br /&gt;
Make the first bookmark/set&lt;br /&gt;
* hg bookmark fxteam-checkins-1&lt;br /&gt;
* hg import &amp;lt;patch1&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch2&amp;gt;&lt;br /&gt;
Make the second set&lt;br /&gt;
* hg up fx-team &amp;amp;&amp;amp; hg bookmark fxteam-checkins-2&lt;br /&gt;
* hg import &amp;lt;patch3&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch4&amp;gt;&lt;br /&gt;
See what&#039;s going to be pushed in each&lt;br /&gt;
* hg out -r . fx-team # patch3 and patch4&lt;br /&gt;
* hg up fxteam-checkins-1 &amp;amp;&amp;amp; hg out -r . fx-team # patch1 and patch2&lt;br /&gt;
Push the first set&lt;br /&gt;
* hg push -r . fx-team # pushes patch1 and patch2&lt;br /&gt;
Get ready to push the second set&lt;br /&gt;
* hg up fxteam-checkins-2&lt;br /&gt;
* hg rebase -d fx-team # Rebase the second set onto the now-pushed first set&lt;br /&gt;
And push it&lt;br /&gt;
* hg push -r . fx-team # pushes patch3 and patch4&lt;br /&gt;
Delete the now-unneeded bookmarks&lt;br /&gt;
* hg bookmark -d fxteam-checkins-1&lt;br /&gt;
* hg bookmark -d fxteam-checkins-2&lt;br /&gt;
&lt;br /&gt;
=== Uplifts ===&lt;br /&gt;
If branch-specific patches are posted, follow the checkin-needed instructions above, importing the patches onto the release branch.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re uplifting directly from an m-c checkin to aurora:&lt;br /&gt;
&lt;br /&gt;
Pull and update to prepare for the uplifts:&lt;br /&gt;
* hg pull central&lt;br /&gt;
* hg pull aurora&lt;br /&gt;
* hg up aurora&lt;br /&gt;
Graft the mc commit and bring up the editor to edit the commit message, adding &amp;quot;a=foo&amp;quot; as needed:&lt;br /&gt;
* hg graft --edit -r &amp;lt;revision&amp;gt;&lt;br /&gt;
Repeat the previous step as needed for all uplifts as needed.&lt;br /&gt;
Verify the outgoing changes and push:&lt;br /&gt;
* hg out -r . aurora&lt;br /&gt;
* hg push -r . aurora&lt;br /&gt;
&lt;br /&gt;
You can graft a range of commits at once if that&#039;s easier:&lt;br /&gt;
* hg graft -r &amp;lt;toprevision&amp;gt;&amp;lt;bottomrevision&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Read the documentation for [https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/unifiedrepo.html#uplifting-backporting-commits graft] for further help.&lt;br /&gt;
&lt;br /&gt;
=== Backouts ===&lt;br /&gt;
Better tools are coming:&lt;br /&gt;
* https://bugzilla.mozilla.org/show_bug.cgi?id=1117632&lt;br /&gt;
* https://bugzilla.mozilla.org/show_bug.cgi?id=1121211&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The standard backout command makes backing out revisions more difficult than it should, as it won&#039;t pre-fill the backout commit message with a bug number:&lt;br /&gt;
* Copy backout &amp;lt;revision&amp;gt; from treeherder, note the bug &amp;lt;number&amp;gt;, and remember the &amp;lt;reason&amp;gt;&lt;br /&gt;
* `hg backout -r &amp;lt;revision&amp;gt;`&lt;br /&gt;
** This should open up your editor with a completely empty commit message. Type in the backout message like &amp;quot;Backout revision &amp;lt;revision&amp;gt; (bug &amp;lt;number&amp;gt;) for &amp;lt;reason&amp;gt;&amp;quot; (possibly with &amp;quot;CLOSED TREE&amp;quot; in there to get around a closure hook).&lt;br /&gt;
* `hg push -r . &amp;lt;tree&amp;gt;`&lt;br /&gt;
&lt;br /&gt;
[https://hg.mozilla.org/hgcustom/version-control-tools/file/4e7ab9638cf0/hgext/qbackout qbackout] can probably still be used (assuming you don&#039;t use `hg share` to get multiple working directories, as mq doesn&#039;t play nice with shared repos):&lt;br /&gt;
* Copy the backout &amp;lt;revision&amp;gt; from treeherder&lt;br /&gt;
* `hg qbackout -e -r &amp;lt;revision&amp;gt;`&lt;br /&gt;
** This should open up your editor with a pre-formed commit message like &amp;quot;Backed out &amp;lt;revision&amp;gt; (bug &amp;lt;number&amp;gt;)&amp;quot;. Add in the &amp;lt;reason&amp;gt; and possibly &amp;quot;CLOSED TREE&amp;quot; to get around a closure hook.&lt;br /&gt;
* `hg qfin -a &amp;amp;&amp;amp; hg push -r . &amp;lt;tree&amp;gt;`&lt;br /&gt;
&lt;br /&gt;
qbackout can also back out a range of commits in a single backout commit:&lt;br /&gt;
* `hg qbackout -e -s -r &amp;lt;toprevision&amp;gt;:&amp;lt;bottomrevision&amp;gt;`&lt;br /&gt;
** This will open your editor with a pre-formed commit message like &amp;quot;Backed out &amp;lt;toprevision&amp;gt;,&amp;lt;anymiddlerevisions&amp;gt;,&amp;lt;bottomrevision&amp;gt; (bug &amp;lt;number&amp;gt;,any other bug &amp;lt;numbers&amp;gt;)&amp;quot;. Add in the &amp;lt;reason&amp;gt; and possibly &amp;quot;CLOSED TREE&amp;quot; to get around a closure hook.&lt;br /&gt;
* `hg qfin -a ** hg push -r . &amp;lt;tree&amp;gt;`&lt;br /&gt;
(Omit qbackout&#039;s -s flag to back out each individual revision in the range as a separate commit.)&lt;br /&gt;
&lt;br /&gt;
==== Revert a backout ====&lt;br /&gt;
* https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/common.html#revive-a-commit-that-was-backed-out&lt;br /&gt;
&lt;br /&gt;
=== Rebasing after losing a push race ===&lt;br /&gt;
This assumes you have commits you&#039;re attempting to push to mozilla-inbound when you lose a push race with someone. Change `inbound` to the correct branch name as needed.&lt;br /&gt;
&lt;br /&gt;
* hg pull inbound &lt;br /&gt;
* hg rebase -d inbound &lt;br /&gt;
* hg push -r . inbound&lt;br /&gt;
&lt;br /&gt;
=== Recovering from mistakes ===&lt;br /&gt;
&amp;lt;big&amp;gt;WARNING:&amp;lt;/big&amp;gt; This will strip out any commits that haven&#039;t been pushed to the remote repositories, regardless of what branch/label/tag those commits are on. (So if you have local changes on inbound and run this command to strip something bad on fx-team, both inbound and fx-team will be stripped.) Only do this if you don&#039;t care about any of those commits!&lt;br /&gt;
* hg strip &#039;not public()&#039;&lt;br /&gt;
&lt;br /&gt;
=== See what you&#039;re about to push ===&lt;br /&gt;
`hg out` without any flags added will show you a LOT of unrelated commits. To see just what you&#039;ll be pushing to a given branch, use `hg out -r . &amp;lt;branch&amp;gt;`&lt;br /&gt;
* hg out -r . inbound&lt;br /&gt;
** This will only display the things you&#039;re about to push to the inbound branch&lt;br /&gt;
&lt;br /&gt;
=== View incoming changes ===&lt;br /&gt;
Since your unified repo will likely have all changesets from the various branches pulled locally, `hg in &amp;lt;somebranch&amp;gt; -r &amp;lt;somerev&amp;gt;` will likely not help you see what would be pulled into your current branch from &amp;lt;somebranch&amp;gt; up to that &amp;lt;somerev&amp;gt;.&lt;br /&gt;
Instead, you can use the following to print out the equivalent. Say you want to see what would be merged onto mozilla-central from b2g-inbound&#039;s revision ca142ec8ba0f:&lt;br /&gt;
&lt;br /&gt;
Make sure m-c is fully up to date:&lt;br /&gt;
* hg pull central &lt;br /&gt;
* hg up central &lt;br /&gt;
Get all of b2g-inbound&#039;s changesets:&lt;br /&gt;
* hg pull b2ginbound&lt;br /&gt;
Do a preview of the merge without actually performing the merge:&lt;br /&gt;
* hg merge -r ca142ec8ba0f -P&lt;br /&gt;
This will print out everything on b2g-inbound (up to and including revision ca142ec8ba0f) that is not already on mozilla-central.&lt;/div&gt;</summary>
		<author><name>KWierso</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Unified_Repos&amp;diff=1054416</id>
		<title>Sheriffing/How To/Unified Repos</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Unified_Repos&amp;diff=1054416"/>
		<updated>2015-02-07T00:40:42Z</updated>

		<summary type="html">&lt;p&gt;KWierso: Add more examples for checkin-neededs&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Unified Repos ==&lt;br /&gt;
* http://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/unifiedrepo.html&lt;br /&gt;
* https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/firefoxtree.html&lt;br /&gt;
&lt;br /&gt;
=== Setting up the repo ===&lt;br /&gt;
Set up your ssh key yourself&lt;br /&gt;
Install Mercurial 3.2 or higher&lt;br /&gt;
Make a copy of your .hgrc file for safekeeping and delete the original&lt;br /&gt;
* hg clone https://hg.mozilla.org/mozilla-central&lt;br /&gt;
* hg clone https://hg.mozilla.org/hgcustom/version-control-tools&lt;br /&gt;
* cd mozilla-central&lt;br /&gt;
* ./mach mercurial-setup&lt;br /&gt;
Configure mercurial as desired (do not enable the mq extension)&amp;lt;br /&amp;gt;&lt;br /&gt;
Edit your global .hgrc file to add the following to the [extensions] section:&lt;br /&gt;
*firefoxtree = /path/to/version-control-tools/hgext/firefoxtree&lt;br /&gt;
The following will pull all (or at least most) of the branches sheriffs need to have on hand:&lt;br /&gt;
* hg pull inbound &amp;amp;&amp;amp; hg pull b2ginbound &amp;amp;&amp;amp; hg pull fx-team &amp;amp;&amp;amp; hg pull aurora &amp;amp;&amp;amp; hg pull beta &amp;amp;&amp;amp; hg pull esr31 &amp;amp;&amp;amp; hg pull b2g34 &amp;amp;&amp;amp; hg pull b2g32 &amp;amp;&amp;amp; hg pull b2g30 &lt;br /&gt;
If you need other branches, you can find their names in the [https://hg.mozilla.org/hgcustom/version-control-tools/file/default/pylib/mozautomation/mozautomation/repository.py firefoxtree extension source].&lt;br /&gt;
&lt;br /&gt;
You should now have everything set up for proper use! &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Maybe rename the folder from &amp;quot;mozilla-central&amp;quot; to &amp;quot;unifiedrepo&amp;quot; or something to make it clear it&#039;s more than just mozilla-central?&lt;br /&gt;
&lt;br /&gt;
The `hg fxheads` command should list references to each of the relevant branch names, and the current revision and commit message for each.&lt;br /&gt;
&lt;br /&gt;
With [https://bugzilla.mozilla.org/show_bug.cgi?id=1116861 bug 1116861] landed in version-control-tools, you can now use the following commands to pull from groups of repositories with a single command:&lt;br /&gt;
* hg pull fxtrees # this will pull from all branches listed with the fxheads command&lt;br /&gt;
* hg pull integration # this will pull from the mozilla-inbound, b2g-inbound, and fx-team branches&lt;br /&gt;
* hg pull releases # this will pull from pretty much every release branch (FYI: including old, unused branches)&lt;br /&gt;
&lt;br /&gt;
=== Merges ===&lt;br /&gt;
This assumes you have your unified repo all set up so that `hg fxheads` lists each of central, b2ginbound, fx-team, and inbound.&lt;br /&gt;
&lt;br /&gt;
To merge a specific non-tip &amp;lt;revision&amp;gt; from mozilla-inbound to mozilla-central:&lt;br /&gt;
# hg pull central&lt;br /&gt;
# hg pull inbound&lt;br /&gt;
# hg up central&lt;br /&gt;
# hg merge -r &amp;lt;revision&amp;gt;&lt;br /&gt;
# hg commit -m &amp;quot;Merge mozilla-inbound to mozilla-central a=merge&amp;quot;&lt;br /&gt;
# hg push -r . central&lt;br /&gt;
&lt;br /&gt;
To merge mozilla-central into mozilla-inbound:&lt;br /&gt;
# hg pull central&lt;br /&gt;
# hg pull inbound&lt;br /&gt;
# hg up inbound&lt;br /&gt;
# hg merge central&lt;br /&gt;
# hg commit -m &amp;quot;Merge mozilla-central to mozilla-inbound a=merge&amp;quot;&lt;br /&gt;
# hg push -r . inbound&lt;br /&gt;
&lt;br /&gt;
* If the `hg merge central` command results in &amp;quot;abort: nothing to merge&amp;quot;, you should instead use `hg update -r &amp;lt;mozilla-central&#039;s tip revision&amp;gt;` to do a non-merging update, then you can do `hg push -r . inbound` to push it as usual.&lt;br /&gt;
&lt;br /&gt;
=== Checkin-neededs ===&lt;br /&gt;
This assumes we&#039;re checking things in to fx-team. Replace fx-team with another branch name as needed.&lt;br /&gt;
&lt;br /&gt;
Update fx-team and prepare for the patches:&lt;br /&gt;
* hg pull fx-team&lt;br /&gt;
* hg up fx-team&lt;br /&gt;
* hg bookmark fx-team-checkins&lt;br /&gt;
Import the patches:&lt;br /&gt;
* hg import https://link.to/correct/checkin-needed.patch&lt;br /&gt;
* Repeat ^ as needed for all fx-team checkin-needed patches&lt;br /&gt;
Verify your outgoing changes:&lt;br /&gt;
* hg out -r . fx-team&lt;br /&gt;
If you haven&#039;t lost a push race:&lt;br /&gt;
* hg push -r . fx-team&lt;br /&gt;
If you lost a push race:&lt;br /&gt;
* hg pull fx-team&lt;br /&gt;
* hg rebase -d fx-team&lt;br /&gt;
* hg push -r . fx-team&lt;br /&gt;
Delete your no longer needed bookmark:&lt;br /&gt;
* hg bookmark -d fx-team-checkins&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can set up multiple sets of patches at once against multiple repositories:&lt;br /&gt;
# Update fx-team&lt;br /&gt;
* hg pull fx-team &amp;amp;&amp;amp; hg up fx-team&lt;br /&gt;
# Create a bookmark to base your fx-team checkin-needed patches&lt;br /&gt;
* hg bookmark fxteam-checkins&lt;br /&gt;
# Import a bunch of patches against fx-team&lt;br /&gt;
* hg import &amp;lt;patch1&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch2&amp;gt;&lt;br /&gt;
# Update inbound and make a bookmark for inbound patches&lt;br /&gt;
* hg pull inbound &amp;amp;&amp;amp; hg up inbound &amp;amp;&amp;amp; hg bookmark inbound-checkins&lt;br /&gt;
# Import some patches against inbound&lt;br /&gt;
* hg import &amp;lt;patch3&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch4&amp;gt;&lt;br /&gt;
# See what you&#039;d be pushing to inbound and push it&lt;br /&gt;
* hg out -r . inbound # this will only show patch3 and patch4&lt;br /&gt;
* hg push -r . inbound # this only pushes patch3 and patch4&lt;br /&gt;
* hg bookmark -d inbound-checkins # delete inbound&#039;s checkin bookmark as it&#039;s not needed&lt;br /&gt;
# Go back to your fx-team checkins and add another patch to the bookmark, then push it&lt;br /&gt;
* hg up fxteam-checkins&lt;br /&gt;
* hg import &amp;lt;patch5&amp;gt;&lt;br /&gt;
* hg out -r . fx-team # this will be patch1, patch2, and patch5&lt;br /&gt;
* hg push -r . fx-team&lt;br /&gt;
* hg bookmark -d fxteam-checkins&lt;br /&gt;
&lt;br /&gt;
Or have multiple sets of patches against a single repository:&lt;br /&gt;
# Update fx-team&lt;br /&gt;
* hg pull fx-team &amp;amp;&amp;amp; hg up fx-team&lt;br /&gt;
# Make the first bookmark/set&lt;br /&gt;
* hg bookmark fxteam-checkins-1&lt;br /&gt;
* hg import &amp;lt;patch1&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch2&amp;gt;&lt;br /&gt;
# Make the second set&lt;br /&gt;
* hg up fx-team &amp;amp;&amp;amp; hg bookmark fxteam-checkins-2&lt;br /&gt;
* hg import &amp;lt;patch3&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch4&amp;gt;&lt;br /&gt;
# See what&#039;s going to be pushed in each&lt;br /&gt;
* hg out -r . fx-team # patch3 and patch4&lt;br /&gt;
* hg up fxteam-checkins-1 &amp;amp;&amp;amp; hg out -r . fx-team # patch1 and patch2&lt;br /&gt;
# Push the first set&lt;br /&gt;
* hg push -r . fx-team # pushes patch1 and patch2&lt;br /&gt;
# Get ready to push the second set&lt;br /&gt;
* hg up fxteam-checkins-2&lt;br /&gt;
* hg rebase -d fx-team # Rebase the second set onto the now-pushed first set&lt;br /&gt;
# And push it&lt;br /&gt;
* hg push -r . fx-team # pushes patch3 and patch4&lt;br /&gt;
# Delete the now-unneeded bookmarks&lt;br /&gt;
* hg bookmark -d fxteam-checkins-1&lt;br /&gt;
* hg bookmark -d fxteam-checkins-2&lt;br /&gt;
&lt;br /&gt;
=== Uplifts ===&lt;br /&gt;
If branch-specific patches are posted, follow the checkin-needed instructions above, importing the patches onto the release branch.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re uplifting directly from an m-c checkin to aurora:&lt;br /&gt;
&lt;br /&gt;
Pull and update to prepare for the uplifts:&lt;br /&gt;
* hg pull central&lt;br /&gt;
* hg pull aurora&lt;br /&gt;
* hg up aurora&lt;br /&gt;
Graft the mc commit and bring up the editor to edit the commit message, adding &amp;quot;a=foo&amp;quot; as needed:&lt;br /&gt;
* hg graft --edit -r &amp;lt;revision&amp;gt;&lt;br /&gt;
Repeat the previous step as needed for all uplifts as needed.&lt;br /&gt;
Verify the outgoing changes and push:&lt;br /&gt;
* hg out -r . aurora&lt;br /&gt;
* hg push -r . aurora&lt;br /&gt;
&lt;br /&gt;
You can graft a range of commits at once if that&#039;s easier:&lt;br /&gt;
* hg graft -r &amp;lt;toprevision&amp;gt;&amp;lt;bottomrevision&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Read the documentation for [https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/unifiedrepo.html#uplifting-backporting-commits graft] for further help.&lt;br /&gt;
&lt;br /&gt;
=== Backouts ===&lt;br /&gt;
Better tools are coming:&lt;br /&gt;
* https://bugzilla.mozilla.org/show_bug.cgi?id=1117632&lt;br /&gt;
* https://bugzilla.mozilla.org/show_bug.cgi?id=1121211&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The standard backout command makes backing out revisions more difficult than it should, as it won&#039;t pre-fill the backout commit message with a bug number:&lt;br /&gt;
* Copy backout &amp;lt;revision&amp;gt; from treeherder, note the bug &amp;lt;number&amp;gt;, and remember the &amp;lt;reason&amp;gt;&lt;br /&gt;
* `hg backout -r &amp;lt;revision&amp;gt;`&lt;br /&gt;
** This should open up your editor with a completely empty commit message. Type in the backout message like &amp;quot;Backout revision &amp;lt;revision&amp;gt; (bug &amp;lt;number&amp;gt;) for &amp;lt;reason&amp;gt;&amp;quot; (possibly with &amp;quot;CLOSED TREE&amp;quot; in there to get around a closure hook).&lt;br /&gt;
* `hg push -r . &amp;lt;tree&amp;gt;`&lt;br /&gt;
&lt;br /&gt;
[https://hg.mozilla.org/hgcustom/version-control-tools/file/4e7ab9638cf0/hgext/qbackout qbackout] can probably still be used (assuming you don&#039;t use `hg share` to get multiple working directories, as mq doesn&#039;t play nice with shared repos):&lt;br /&gt;
* Copy the backout &amp;lt;revision&amp;gt; from treeherder&lt;br /&gt;
* `hg qbackout -e -r &amp;lt;revision&amp;gt;`&lt;br /&gt;
** This should open up your editor with a pre-formed commit message like &amp;quot;Backed out &amp;lt;revision&amp;gt; (bug &amp;lt;number&amp;gt;)&amp;quot;. Add in the &amp;lt;reason&amp;gt; and possibly &amp;quot;CLOSED TREE&amp;quot; to get around a closure hook.&lt;br /&gt;
* `hg qfin -a &amp;amp;&amp;amp; hg push -r . &amp;lt;tree&amp;gt;`&lt;br /&gt;
&lt;br /&gt;
qbackout can also back out a range of commits in a single backout commit:&lt;br /&gt;
* `hg qbackout -e -s -r &amp;lt;toprevision&amp;gt;:&amp;lt;bottomrevision&amp;gt;`&lt;br /&gt;
** This will open your editor with a pre-formed commit message like &amp;quot;Backed out &amp;lt;toprevision&amp;gt;,&amp;lt;anymiddlerevisions&amp;gt;,&amp;lt;bottomrevision&amp;gt; (bug &amp;lt;number&amp;gt;,any other bug &amp;lt;numbers&amp;gt;)&amp;quot;. Add in the &amp;lt;reason&amp;gt; and possibly &amp;quot;CLOSED TREE&amp;quot; to get around a closure hook.&lt;br /&gt;
* `hg qfin -a ** hg push -r . &amp;lt;tree&amp;gt;`&lt;br /&gt;
(Omit qbackout&#039;s -s flag to back out each individual revision in the range as a separate commit.)&lt;br /&gt;
&lt;br /&gt;
==== Revert a backout ====&lt;br /&gt;
* https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/common.html#revive-a-commit-that-was-backed-out&lt;br /&gt;
&lt;br /&gt;
=== Rebasing after losing a push race ===&lt;br /&gt;
This assumes you have commits you&#039;re attempting to push to mozilla-inbound when you lose a push race with someone. Change `inbound` to the correct branch name as needed.&lt;br /&gt;
&lt;br /&gt;
* hg pull inbound &lt;br /&gt;
* hg rebase -d inbound &lt;br /&gt;
* hg push -r . inbound&lt;br /&gt;
&lt;br /&gt;
=== Recovering from mistakes ===&lt;br /&gt;
&amp;lt;big&amp;gt;WARNING:&amp;lt;/big&amp;gt; This will strip out any commits that haven&#039;t been pushed to the remote repositories, regardless of what branch/label/tag those commits are on. (So if you have local changes on inbound and run this command to strip something bad on fx-team, both inbound and fx-team will be stripped.) Only do this if you don&#039;t care about any of those commits!&lt;br /&gt;
* hg strip &#039;not public()&#039;&lt;br /&gt;
&lt;br /&gt;
=== See what you&#039;re about to push ===&lt;br /&gt;
`hg out` without any flags added will show you a LOT of unrelated commits. To see just what you&#039;ll be pushing to a given branch, use `hg out -r . &amp;lt;branch&amp;gt;`&lt;br /&gt;
* hg out -r . inbound&lt;br /&gt;
** This will only display the things you&#039;re about to push to the inbound branch&lt;br /&gt;
&lt;br /&gt;
=== View incoming changes ===&lt;br /&gt;
Since your unified repo will likely have all changesets from the various branches pulled locally, `hg in &amp;lt;somebranch&amp;gt; -r &amp;lt;somerev&amp;gt;` will likely not help you see what would be pulled into your current branch from &amp;lt;somebranch&amp;gt; up to that &amp;lt;somerev&amp;gt;.&lt;br /&gt;
Instead, you can use the following to print out the equivalent. Say you want to see what would be merged onto mozilla-central from b2g-inbound&#039;s revision ca142ec8ba0f:&lt;br /&gt;
&lt;br /&gt;
Make sure m-c is fully up to date:&lt;br /&gt;
* hg pull central &lt;br /&gt;
* hg up central &lt;br /&gt;
Get all of b2g-inbound&#039;s changesets:&lt;br /&gt;
* hg pull b2ginbound&lt;br /&gt;
Do a preview of the merge without actually performing the merge:&lt;br /&gt;
* hg merge -r ca142ec8ba0f -P&lt;br /&gt;
This will print out everything on b2g-inbound (up to and including revision ca142ec8ba0f) that is not already on mozilla-central.&lt;/div&gt;</summary>
		<author><name>KWierso</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Unified_Repos&amp;diff=1054415</id>
		<title>Sheriffing/How To/Unified Repos</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Sheriffing/How_To/Unified_Repos&amp;diff=1054415"/>
		<updated>2015-02-07T00:19:02Z</updated>

		<summary type="html">&lt;p&gt;KWierso: More advanced checkin-needed styles&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Unified Repos ==&lt;br /&gt;
* http://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/unifiedrepo.html&lt;br /&gt;
* https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/firefoxtree.html&lt;br /&gt;
&lt;br /&gt;
=== Setting up the repo ===&lt;br /&gt;
Set up your ssh key yourself&lt;br /&gt;
Install Mercurial 3.2 or higher&lt;br /&gt;
Make a copy of your .hgrc file for safekeeping and delete the original&lt;br /&gt;
* hg clone https://hg.mozilla.org/mozilla-central&lt;br /&gt;
* hg clone https://hg.mozilla.org/hgcustom/version-control-tools&lt;br /&gt;
* cd mozilla-central&lt;br /&gt;
* ./mach mercurial-setup&lt;br /&gt;
Configure mercurial as desired (do not enable the mq extension)&amp;lt;br /&amp;gt;&lt;br /&gt;
Edit your global .hgrc file to add the following to the [extensions] section:&lt;br /&gt;
*firefoxtree = /path/to/version-control-tools/hgext/firefoxtree&lt;br /&gt;
The following will pull all (or at least most) of the branches sheriffs need to have on hand:&lt;br /&gt;
* hg pull inbound &amp;amp;&amp;amp; hg pull b2ginbound &amp;amp;&amp;amp; hg pull fx-team &amp;amp;&amp;amp; hg pull aurora &amp;amp;&amp;amp; hg pull beta &amp;amp;&amp;amp; hg pull esr31 &amp;amp;&amp;amp; hg pull b2g34 &amp;amp;&amp;amp; hg pull b2g32 &amp;amp;&amp;amp; hg pull b2g30 &lt;br /&gt;
If you need other branches, you can find their names in the [https://hg.mozilla.org/hgcustom/version-control-tools/file/default/pylib/mozautomation/mozautomation/repository.py firefoxtree extension source].&lt;br /&gt;
&lt;br /&gt;
You should now have everything set up for proper use! &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Maybe rename the folder from &amp;quot;mozilla-central&amp;quot; to &amp;quot;unifiedrepo&amp;quot; or something to make it clear it&#039;s more than just mozilla-central?&lt;br /&gt;
&lt;br /&gt;
The `hg fxheads` command should list references to each of the relevant branch names, and the current revision and commit message for each.&lt;br /&gt;
&lt;br /&gt;
With [https://bugzilla.mozilla.org/show_bug.cgi?id=1116861 bug 1116861] landed in version-control-tools, you can now use the following commands to pull from groups of repositories with a single command:&lt;br /&gt;
* hg pull fxtrees # this will pull from all branches listed with the fxheads command&lt;br /&gt;
* hg pull integration # this will pull from the mozilla-inbound, b2g-inbound, and fx-team branches&lt;br /&gt;
* hg pull releases # this will pull from pretty much every release branch (FYI: including old, unused branches)&lt;br /&gt;
&lt;br /&gt;
=== Merges ===&lt;br /&gt;
This assumes you have your unified repo all set up so that `hg fxheads` lists each of central, b2ginbound, fx-team, and inbound.&lt;br /&gt;
&lt;br /&gt;
To merge a specific non-tip &amp;lt;revision&amp;gt; from mozilla-inbound to mozilla-central:&lt;br /&gt;
# hg pull central&lt;br /&gt;
# hg pull inbound&lt;br /&gt;
# hg up central&lt;br /&gt;
# hg merge -r &amp;lt;revision&amp;gt;&lt;br /&gt;
# hg commit -m &amp;quot;Merge mozilla-inbound to mozilla-central a=merge&amp;quot;&lt;br /&gt;
# hg push -r . central&lt;br /&gt;
&lt;br /&gt;
To merge mozilla-central into mozilla-inbound:&lt;br /&gt;
# hg pull central&lt;br /&gt;
# hg pull inbound&lt;br /&gt;
# hg up inbound&lt;br /&gt;
# hg merge central&lt;br /&gt;
# hg commit -m &amp;quot;Merge mozilla-central to mozilla-inbound a=merge&amp;quot;&lt;br /&gt;
# hg push -r . inbound&lt;br /&gt;
&lt;br /&gt;
* If the `hg merge central` command results in &amp;quot;abort: nothing to merge&amp;quot;, you should instead use `hg update -r &amp;lt;mozilla-central&#039;s tip revision&amp;gt;` to do a non-merging update, then you can do `hg push -r . inbound` to push it as usual.&lt;br /&gt;
&lt;br /&gt;
=== Checkin-neededs ===&lt;br /&gt;
This assumes we&#039;re checking things in to fx-team. Replace fx-team with another branch name as needed.&lt;br /&gt;
&lt;br /&gt;
Update fx-team and prepare for the patches:&lt;br /&gt;
* hg pull fx-team&lt;br /&gt;
* hg up fx-team&lt;br /&gt;
* hg bookmark fx-team-checkins&lt;br /&gt;
Import the patches:&lt;br /&gt;
* hg import https://link.to/correct/checkin-needed.patch&lt;br /&gt;
* Repeat ^ as needed for all fx-team checkin-needed patches&lt;br /&gt;
Verify your outgoing changes:&lt;br /&gt;
* hg out -r . fx-team&lt;br /&gt;
If you haven&#039;t lost a push race:&lt;br /&gt;
* hg push -r . fx-team&lt;br /&gt;
If you lost a push race:&lt;br /&gt;
* hg pull fx-team&lt;br /&gt;
* hg rebase -d fx-team&lt;br /&gt;
* hg push -r . fx-team&lt;br /&gt;
Delete your no longer needed bookmark:&lt;br /&gt;
* hg bookmark -d fx-team-checkins&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can set up multiple sets of patches at once (either multiple sets against a single repository or one set for multiple repositories):&lt;br /&gt;
# Update fx-team&lt;br /&gt;
* hg pull fx-team &amp;amp;&amp;amp; hg up fx-team&lt;br /&gt;
# Create a bookmark to base your fx-team checkin-needed patches&lt;br /&gt;
* hg bookmark fxteam-checkins&lt;br /&gt;
# Import a bunch of patches against fx-team&lt;br /&gt;
* hg import &amp;lt;patch1&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch2&amp;gt;&lt;br /&gt;
# Update inbound and make a bookmark for inbound patches&lt;br /&gt;
* hg pull inbound &amp;amp;&amp;amp; hg up inbound &amp;amp;&amp;amp; hg bookmark inbound-checkins&lt;br /&gt;
# Import some patches against inbound&lt;br /&gt;
* hg import &amp;lt;patch3&amp;gt;&lt;br /&gt;
* hg import &amp;lt;patch4&amp;gt;&lt;br /&gt;
# See what you&#039;d be pushing to inbound and push it&lt;br /&gt;
* hg out -r . inbound # this will only show patch3 and patch4&lt;br /&gt;
* hg push -r . inbound # this only pushes patch3 and patch4&lt;br /&gt;
* hg bookmark -d inbound-checkins # delete inbound&#039;s checkin bookmark as it&#039;s not needed&lt;br /&gt;
# Go back to your fx-team checkins and add another patch to the bookmark, then push it&lt;br /&gt;
* hg up fxteam-checkins&lt;br /&gt;
* hg import &amp;lt;patch5&amp;gt;&lt;br /&gt;
* hg out -r . fx-team # this will be patch1, patch2, and patch5&lt;br /&gt;
* hg push -r . fx-team&lt;br /&gt;
* hg bookmark -d fxteam-checkins&lt;br /&gt;
&lt;br /&gt;
=== Uplifts ===&lt;br /&gt;
If branch-specific patches are posted, follow the checkin-needed instructions above, importing the patches onto the release branch.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re uplifting directly from an m-c checkin to aurora:&lt;br /&gt;
&lt;br /&gt;
Pull and update to prepare for the uplifts:&lt;br /&gt;
* hg pull central&lt;br /&gt;
* hg pull aurora&lt;br /&gt;
* hg up aurora&lt;br /&gt;
Graft the mc commit and bring up the editor to edit the commit message, adding &amp;quot;a=foo&amp;quot; as needed:&lt;br /&gt;
* hg graft --edit -r &amp;lt;revision&amp;gt;&lt;br /&gt;
Repeat the previous step as needed for all uplifts as needed.&lt;br /&gt;
Verify the outgoing changes and push:&lt;br /&gt;
* hg out -r . aurora&lt;br /&gt;
* hg push -r . aurora&lt;br /&gt;
&lt;br /&gt;
You can graft a range of commits at once if that&#039;s easier:&lt;br /&gt;
* hg graft -r &amp;lt;toprevision&amp;gt;&amp;lt;bottomrevision&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Read the documentation for [https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/unifiedrepo.html#uplifting-backporting-commits graft] for further help.&lt;br /&gt;
&lt;br /&gt;
=== Backouts ===&lt;br /&gt;
Better tools are coming:&lt;br /&gt;
* https://bugzilla.mozilla.org/show_bug.cgi?id=1117632&lt;br /&gt;
* https://bugzilla.mozilla.org/show_bug.cgi?id=1121211&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The standard backout command makes backing out revisions more difficult than it should, as it won&#039;t pre-fill the backout commit message with a bug number:&lt;br /&gt;
* Copy backout &amp;lt;revision&amp;gt; from treeherder, note the bug &amp;lt;number&amp;gt;, and remember the &amp;lt;reason&amp;gt;&lt;br /&gt;
* `hg backout -r &amp;lt;revision&amp;gt;`&lt;br /&gt;
** This should open up your editor with a completely empty commit message. Type in the backout message like &amp;quot;Backout revision &amp;lt;revision&amp;gt; (bug &amp;lt;number&amp;gt;) for &amp;lt;reason&amp;gt;&amp;quot; (possibly with &amp;quot;CLOSED TREE&amp;quot; in there to get around a closure hook).&lt;br /&gt;
* `hg push -r . &amp;lt;tree&amp;gt;`&lt;br /&gt;
&lt;br /&gt;
[https://hg.mozilla.org/hgcustom/version-control-tools/file/4e7ab9638cf0/hgext/qbackout qbackout] can probably still be used (assuming you don&#039;t use `hg share` to get multiple working directories, as mq doesn&#039;t play nice with shared repos):&lt;br /&gt;
* Copy the backout &amp;lt;revision&amp;gt; from treeherder&lt;br /&gt;
* `hg qbackout -e -r &amp;lt;revision&amp;gt;`&lt;br /&gt;
** This should open up your editor with a pre-formed commit message like &amp;quot;Backed out &amp;lt;revision&amp;gt; (bug &amp;lt;number&amp;gt;)&amp;quot;. Add in the &amp;lt;reason&amp;gt; and possibly &amp;quot;CLOSED TREE&amp;quot; to get around a closure hook.&lt;br /&gt;
* `hg qfin -a &amp;amp;&amp;amp; hg push -r . &amp;lt;tree&amp;gt;`&lt;br /&gt;
&lt;br /&gt;
qbackout can also back out a range of commits in a single backout commit:&lt;br /&gt;
* `hg qbackout -e -s -r &amp;lt;toprevision&amp;gt;:&amp;lt;bottomrevision&amp;gt;`&lt;br /&gt;
** This will open your editor with a pre-formed commit message like &amp;quot;Backed out &amp;lt;toprevision&amp;gt;,&amp;lt;anymiddlerevisions&amp;gt;,&amp;lt;bottomrevision&amp;gt; (bug &amp;lt;number&amp;gt;,any other bug &amp;lt;numbers&amp;gt;)&amp;quot;. Add in the &amp;lt;reason&amp;gt; and possibly &amp;quot;CLOSED TREE&amp;quot; to get around a closure hook.&lt;br /&gt;
* `hg qfin -a ** hg push -r . &amp;lt;tree&amp;gt;`&lt;br /&gt;
(Omit qbackout&#039;s -s flag to back out each individual revision in the range as a separate commit.)&lt;br /&gt;
&lt;br /&gt;
==== Revert a backout ====&lt;br /&gt;
* https://mozilla-version-control-tools.readthedocs.org/en/latest/hgmozilla/common.html#revive-a-commit-that-was-backed-out&lt;br /&gt;
&lt;br /&gt;
=== Rebasing after losing a push race ===&lt;br /&gt;
This assumes you have commits you&#039;re attempting to push to mozilla-inbound when you lose a push race with someone. Change `inbound` to the correct branch name as needed.&lt;br /&gt;
&lt;br /&gt;
* hg pull inbound &lt;br /&gt;
* hg rebase -d inbound &lt;br /&gt;
* hg push -r . inbound&lt;br /&gt;
&lt;br /&gt;
=== Recovering from mistakes ===&lt;br /&gt;
&amp;lt;big&amp;gt;WARNING:&amp;lt;/big&amp;gt; This will strip out any commits that haven&#039;t been pushed to the remote repositories, regardless of what branch/label/tag those commits are on. (So if you have local changes on inbound and run this command to strip something bad on fx-team, both inbound and fx-team will be stripped.) Only do this if you don&#039;t care about any of those commits!&lt;br /&gt;
* hg strip &#039;not public()&#039;&lt;br /&gt;
&lt;br /&gt;
=== See what you&#039;re about to push ===&lt;br /&gt;
`hg out` without any flags added will show you a LOT of unrelated commits. To see just what you&#039;ll be pushing to a given branch, use `hg out -r . &amp;lt;branch&amp;gt;`&lt;br /&gt;
* hg out -r . inbound&lt;br /&gt;
** This will only display the things you&#039;re about to push to the inbound branch&lt;br /&gt;
&lt;br /&gt;
=== View incoming changes ===&lt;br /&gt;
Since your unified repo will likely have all changesets from the various branches pulled locally, `hg in &amp;lt;somebranch&amp;gt; -r &amp;lt;somerev&amp;gt;` will likely not help you see what would be pulled into your current branch from &amp;lt;somebranch&amp;gt; up to that &amp;lt;somerev&amp;gt;.&lt;br /&gt;
Instead, you can use the following to print out the equivalent. Say you want to see what would be merged onto mozilla-central from b2g-inbound&#039;s revision ca142ec8ba0f:&lt;br /&gt;
&lt;br /&gt;
Make sure m-c is fully up to date:&lt;br /&gt;
* hg pull central &lt;br /&gt;
* hg up central &lt;br /&gt;
Get all of b2g-inbound&#039;s changesets:&lt;br /&gt;
* hg pull b2ginbound&lt;br /&gt;
Do a preview of the merge without actually performing the merge:&lt;br /&gt;
* hg merge -r ca142ec8ba0f -P&lt;br /&gt;
This will print out everything on b2g-inbound (up to and including revision ca142ec8ba0f) that is not already on mozilla-central.&lt;/div&gt;</summary>
		<author><name>KWierso</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=ReleaseEngineering/How_To/Trigger_arbitrary_jobs&amp;diff=1054115</id>
		<title>ReleaseEngineering/How To/Trigger arbitrary jobs</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=ReleaseEngineering/How_To/Trigger_arbitrary_jobs&amp;diff=1054115"/>
		<updated>2015-02-06T01:16:41Z</updated>

		<summary type="html">&lt;p&gt;KWierso: Using &amp;quot;--revision&amp;quot; didn&amp;#039;t work for me locally. &amp;quot;--rev&amp;quot; did, though.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* This script hits the API that zeller, catlee and hwine made available:&lt;br /&gt;
** http://blog.johnzeller.com/triggering-of-arbitrary-buildstests-is-now-possible/&lt;br /&gt;
&lt;br /&gt;
Disclaimer: use this carefully as you could cause a lot of trouble.&lt;br /&gt;
&lt;br /&gt;
= Setup =&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://github.com/armenzg/mozilla_ci_tools.git&lt;br /&gt;
python setup.py develop (or install)&lt;br /&gt;
python scripts/trigger.py --help&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTE: We can probably improve this by adding console_scripts to setup.py and make it an installable script.&lt;br /&gt;
&lt;br /&gt;
= File issues =&lt;br /&gt;
File issues under https://github.com/armenzg/mozilla_ci_tools/issues.&lt;br /&gt;
armenzg is currently the main maintainer.&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
NOTE: You can now trigger jobs without having to find the installer and tests urls.&amp;lt;br /&amp;gt;&lt;br /&gt;
NOTE: This script will now trigger the associated build if there is no available completed build.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run it like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
python scripts/trigger.py \&lt;br /&gt;
--rev 6610f4646b3c --repo-name try --buildername &amp;quot;Android 2.2 Debug try build&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Hacks =&lt;br /&gt;
* You can run a test/talos job against:&lt;br /&gt;
** your own installer located at any web-host&lt;br /&gt;
** your own tests.zip located at any web-host&lt;br /&gt;
** This allows you to hack a tests.zip on your people account and zip it back&lt;br /&gt;
*** use it with zip -rq9D &amp;amp;&amp;amp; chmod 644&lt;br /&gt;
* You also don&#039;t need a build to happen on a revision to trigger a test/talos job&lt;br /&gt;
&lt;br /&gt;
= Solved issues =&lt;br /&gt;
* There&#039;s some logic to prevent you from triggering jobs against non-existing builds/test.zip (to some extent)&lt;br /&gt;
&lt;br /&gt;
= Known issues =&lt;br /&gt;
* You can attempt to trigger a revision that doesn&#039;t exist&lt;br /&gt;
* You can try to trigger a builder that doesn&#039;t exist&lt;br /&gt;
* You can be tempted to write a script to run a lot of jobs&lt;br /&gt;
** Remember that these are shared production resources&lt;br /&gt;
* We could have a web page to make this easier&lt;/div&gt;</summary>
		<author><name>KWierso</name></author>
	</entry>
</feed>