Sheriffing/How To/Unified Repos: Difference between revisions

Jump to navigation Jump to search
→‎Backouts: switch to hg oops
(Removing B2G stuff)
(→‎Backouts: switch to hg oops)
Line 153: Line 153:
* `hg push -r . <tree>`
* `hg push -r . <tree>`


[https://hg.mozilla.org/hgcustom/version-control-tools/file/4e7ab9638cf0/hgext/qbackout qbackout] can probably still be used (assuming you don't use `hg share` to get multiple working directories, as mq doesn't play nice with shared repos):
[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):
* Copy the backout <revision> from treeherder
* Copy the backout <revision> from treeherder
* `hg qbackout -e -r <revision>`
* `hg oops -e -r <revision>`
** This should open up your editor with a pre-formed commit message like "Backed out <revision> (bug <number>)". Add in the <reason> and possibly "CLOSED TREE" to get around a closure hook.
** This should open up your editor with a prepopulated commit message like "Backed out <revision> (bug <number>)". Add in the <reason> and possibly "CLOSED TREE" to get around a closure hook.
* `hg qfin -a && hg push -r . <tree>`
* `hg out -r . <tree>` to double-check what you will be pushing
* `hg push -r . <tree>`


qbackout can also back out a range of commits in a single backout commit:
qbackout can also back out a range of commits in a single backout commit:
* `hg qbackout -e -s -r <toprevision>:<bottomrevision>`
* `hg oops -e -s -r <toprevision>:<bottomrevision>`
** This will open your editor with a pre-formed commit message like "Backed out <toprevision>,<anymiddlerevisions>,<bottomrevision> (bug <number>,any other bug <numbers>)". Add in the <reason> and possibly "CLOSED TREE" to get around a closure hook.
** This will open your editor with a prepopulated commit message like "Backed out <toprevision>,<anymiddlerevisions>,<bottomrevision> (bug <number>,any other bug <numbers>)". Add in the <reason> and possibly "CLOSED TREE" to get around a closure hook.
* `hg qfin -a ** hg push -r . <tree>`
* `hg push -r . <tree>`
(Omit qbackout's -s flag to back out each individual revision in the range as a separate commit.)
(Omit oops's -s flag to back out each individual revision in the range as a separate commit.)


==== Revert a backout ====
==== Revert a backout ====
Confirmed users
328

edits

Navigation menu