Sheriffing/How To/Uplifts: Difference between revisions

(no more aurora and gaia)
Line 2: Line 2:


= Prerequisites =
= Prerequisites =
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).
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.


== Gecko Uplifts ==
== Gecko Uplifts ==
Line 8: Line 8:
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 <b>(or revset)</b>.
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 <b>(or revset)</b>.
  # Transplant a cset from the specified branch to the current branch and edit the commit message.
  # Transplant a cset from the specified branch to the current branch and edit the commit message.
  # *** This assumes that local clones are named mozilla-XXX (aurora, beta, etc). ***
  # *** This assumes that local clones are named mozilla-XXX (central, beta, etc). ***
  #  Usage:  hg uplift &#60;source&#62; &#60;rev&#62;
  #  Usage:  hg uplift &#60;source&#62; &#60;rev&#62;
  #  Example: hg uplift aurora abc123abc123
  #  Example: hg uplift central abc123abc123
  uplift = transplant -e -s ../mozilla-$1 $2
  uplift = transplant -e -s ../mozilla-$1 $2


Optionally, an mq-based alias can also be created, which exports a specified revision from the current clone and imports it into another.
Optionally, an mq-based alias can also be created, which exports a specified revision from the current clone and imports it into another.
  # 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.
  # 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.
  # *** This assumes that local clones are named mozilla-XXX (aurora, beta, etc). ***
  # *** This assumes that local clones are named mozilla-XXX (central, beta, etc). ***
  #  Usage:  hg uplift-mq &#60;branch&#62; &#60;bug#&#62; &#60;rev&#62;
  #  Usage:  hg uplift-mq &#60;branch&#62; &#60;bug#&#62; &#60;rev&#62;
  #  Example: hg uplift-mq aurora 123456 abc123abc123
  #  Example: hg uplift-mq central 123456 abc123abc123
  uplift-mq = !hg export -r $3 > ../mozilla-$1/.hg/patches/$2 && cd ../mozilla-$1 && hg qimport -e -P $2 && hg qref -e
  uplift-mq = !hg export -r $3 > ../mozilla-$1/.hg/patches/$2 && cd ../mozilla-$1 && hg qimport -e -P $2 && hg qref -e


canmove, Confirmed users
2,850

edits