# HG changeset patch # User Chuck Tuffli # Date 1609354897 28800 # Node ID 0257716d1f225fa1a901065d2d809aaa437feb01 # Parent 9fe35f4bc173c755123bd925ab9dd0304dd4548d doc: update MQ To Evolve refugee book Updated the MQ Rosetta stone to improve style and remove deprecated commands. Changes include: - replace deprecated commands with current equivalents - added documentation for qimport and qcommit - changed 'odiff' in Cheat sheet to 'pdiff' to match detailed description - add in-line formatting of commands - add syntax aware highlighting to examples in literal blocks - tweaked wording in a few places - standardized formatting of file diff -r 9fe35f4bc173 -r 0257716d1f22 CHANGELOG --- a/CHANGELOG Wed Dec 30 11:15:01 2020 -0800 +++ b/CHANGELOG Wed Dec 30 11:01:37 2020 -0800 @@ -5,6 +5,7 @@ --------------------- * evolve: remove spurious "working directory is now at ..." messages + * evolve: various documentation improvements topic: diff -r 9fe35f4bc173 -r 0257716d1f22 docs/from-mq.rst --- a/docs/from-mq.rst Wed Dec 30 11:15:01 2020 -0800 +++ b/docs/from-mq.rst Wed Dec 30 11:01:37 2020 -0800 @@ -15,15 +15,16 @@ qnew ``commit`` qrefresh ``amend`` qrefresh --exclude ``uncommit`` -qpop ``update`` or ``gdown`` -qpush ``update`` or ``gup`` sometimes ``evolve`` +qpop ``update`` or ``previous`` +qpush ``update`` or ``next`` sometimes ``evolve`` or ``pick`` qrm ``prune`` qfold ``fold`` -qdiff ``odiff`` +qdiff ``pdiff`` qrecord ``record`` +qimport ``import`` qfinish -- -qimport -- +qcommit -- ============================== ============================================ @@ -35,11 +36,14 @@ All your work in progress is now in real changesets all the time. -You can use the standard log command to display them. You can use the -phase revset to display unfinished work only, and use templates to have -the same kind of compact that the output of qseries has. +You can use the standard ``log`` command to display them. You can use the +``draft()`` (or ``secret()``) revset to display unfinished work only, and +use templates to have the same kind of compact that the output of +``qseries`` has. -This will result in something like:: +This will result in something like + +.. code-block:: ini [alias] wip = log -r 'not public()' --template='{rev}:{node|short} {desc|firstline}\n' @@ -49,31 +53,37 @@ With evolve you handle standard changesets without an additional overlay. -Standard changeset are created using hg commit as usual:: +Standard changeset are created using ``hg commit`` as usual + +.. code-block:: console $ hg commit If you want to keep the "WIP is not pushed" behavior, you want to -set your changeset in the secret phase using the phase command. +set your changeset in the secret phase using the ``phase`` command. Note that you only need it for the first commit you want to be secret. Later commits will inherit their parent's phase. If you always want your new commit to be in the secret phase, your should -consider updating your configuration: +consider updating your configuration + +.. code-block:: ini [phases] - new-commit=secret + new-commit = secret hg qref ``````` A new command from evolution will allow you to rewrite the changeset you are -currently on. Just call: +currently on. Just call + +.. code-block:: console $ hg amend -This command takes the same options as commit, plus the switch '-e' (--edit) +This command takes the same options as ``commit``, plus the switch ``-e`` (``--edit``) to edit the commit message in an editor. @@ -92,7 +102,9 @@ hg qref --exclude ````````````````` -To remove changes from your current commit use:: +To remove changes from your current commit use + +.. code-block:: console $ hg uncommit not-ready.txt @@ -100,70 +112,97 @@ hg qpop ``````` -The following command emulates the behavior of hg qpop: +To emulate the behavior of ``qpop`` use + +.. code-block:: console - $ hg gdown + $ hg previous -If you need to go back to an arbitrary commit you can use: +If you need to go back to an arbitrary commit you can use + +.. code-block:: console $ hg update -.. note:: gdown and update allow movement with working directory +.. note:: previous and update allow movement with working directory changes applied, and gracefully merge them. +.. note:: Previous versions of the documentation recommended + the deprecated gdown command + hg qpush ```````` +The following command emulates the behavior of ``hg qpush`` + +.. code-block:: console + + $ hg next + When you rewrite changesets, descendants of rewritten changesets are marked as "orphan". You need to rewrite them on top of the new version of their ancestor. -The evolution extension adds a command to rewrite "orphan" -changesets::: +The evolution extension adds a command to rewrite "orphan" changesets + +.. code-block:: console $ hg evolve -You can also decide to do it manually using:: +You can also reorder a changeset using - $ hg grab +.. code-block:: console + + $ hg pick OLD_VERSION -or:: +or + +.. code-block:: console - $ hg rebase -r -d . + $ hg rebase -r REVSET_FOR_OLD_VERSION -d . -note: using graft allows you to pick the changeset you want next as the --move -option of qpush do. +note: using ``pick`` allows you to choose the changeset you want next as the ``--move`` +option of ``qpush`` does. hg qrm `````` -evolution introduce a new command to mark a changeset as "not wanted anymore".:: +evolution introduces a new command to mark a changeset as "not wanted anymore". - $ hg prune +.. code-block:: console + + $ hg prune REVSET hg qfold ```````` +The following command emulates the behavior of ``qfold`` -:: +.. code-block:: console - $ hg fold first::last + $ hg fold FIRST::LAST hg qdiff ```````` -``pdiff`` is an alias for `hg diff -r .^` It works like qdiff, but outside MQ. - +``pdiff`` is an alias for ``hg diff -r .^`` It works like ``qdiff``, but outside MQ. -hg qfinish and hg qimport -````````````````````````` +hg qimport +`````````` + +To import a new patch, use + +.. code-block:: console -These are not necessary anymore. If you want to control the -mutability of changesets, see the phase feature. + $ hg import NEW_CHANGES.patch +hg qfinish +`````````` +This is not necessary anymore. If you want to control the +mutability of changesets, see the ``phase`` feature. hg qcommit ``````````