docs/from-mq.rst
changeset 228 5a17c0d41a00
parent 227 abe52cf492ee
child 232 adb7e29cb2bd
equal deleted inserted replaced
227:abe52cf492ee 228:5a17c0d41a00
     3 -------------------------------------------
     3 -------------------------------------------
     4 
     4 
     5 Cheat sheet
     5 Cheat sheet
     6 -------------
     6 -------------
     7 
     7 
     8 :: 
     8 ==============================  ============================================
       
     9 mq command                       new equivalent
       
    10 ==============================  ============================================
     9 
    11 
    10     ==============================  ============================================
    12 qseries                         ``log``
    11     mq command                       new equivalent
    13 qnew                            ``commit``
    12     ==============================  ============================================
    14 qrefresh                        ``amend``
       
    15 qpop                            ``update`` or ``qdown``
       
    16 qpush                           ``update`` or ``gup`` sometimes ``stabilize``
       
    17 qrm                             ``kill``
       
    18 qfold                           ``amend -c`` (for now, ``collapse`` soon)
       
    19 qdiff                           ``odiff``
    13 
    20 
    14     qseries                         ``log``
    21 qfinish                         --
    15     qnew                            ``commit``
    22 qimport                         --
    16     qrefresh                        ``amend``
       
    17     qpop                            ``update`` or ``qdown``
       
    18     qpush                           ``update`` or ``gup`` sometimes ``stabilize``
       
    19     qrm                             ``kill``
       
    20     qfold                           ``amend -c`` (for now, ``collapse`` soon)
       
    21     qdiff                           ``odiff``
       
    22 
       
    23     qfinish                         --
       
    24     qimport                         --
       
    25 
    23 
    26 
    24 
    27 Replacement details
    25 Replacement details
    28 ---------------------
    26 ---------------------
    29 
    27 
    32 
    30 
    33 All your work in progress is now in real changeset all the time.
    31 All your work in progress is now in real changeset all the time.
    34 
    32 
    35 You can use the standard log to display them. You can use the phase revset to
    33 You can use the standard log to display them. You can use the phase revset to
    36 display unfinished business only and templates to have the same kind of compact
    34 display unfinished business only and templates to have the same kind of compact
    37 output qseries has.::
    35 output qseries has.
       
    36 
       
    37 This will result in something like that::
    38 
    38 
    39   [alias]
    39   [alias]
    40   wip = log -r 'not public()' --template='{rev}:{node|short} {desc|firstline}\n'
    40   wip = log -r 'not public()' --template='{rev}:{node|short} {desc|firstline}\n'
    41 
    41 
    42 hg qnew
    42 hg qnew
    43 ````````
    43 ````````
    44 
    44 
    45 With evolve you handle standard changesets without additional overlay.
    45 With evolve you handle standard changesets without an additional overlay.
    46 
    46 
    47 Standard changeset are created using hg commit as usual.::
    47 Standard changeset are created using hg commit as usual.::
    48 
    48 
    49   $ hg commit
    49   $ hg commit
    50 
    50 
    61   new-commit=secret
    61   new-commit=secret
    62 
    62 
    63 hg qref
    63 hg qref
    64 ````````
    64 ````````
    65 
    65 
    66 A dedicated command from evolve will allow you to rewrite the changeset you are
    66 A new command from evolution will allow you to rewrite the changeset you are
    67 currently on.::
    67 currently on. just call:
    68 
    68 
    69   $ hg amend
    69   $ hg amend
    70 
    70 
    71 
    71 
    72 This command takes the same options as commit, plus the switch '-e' (--edit)
    72 This command takes the same options as commit, plus the switch '-e' (--edit)
    78   $ hg record -m 'feature A'
    78   $ hg record -m 'feature A'
    79   # oups, I forget some stuff
    79   # oups, I forget some stuff
    80   $ hg record babar.py
    80   $ hg record babar.py
    81   $ hg amend -c .^ # .^ refer to "working directoy parent, here 'feature A'
    81   $ hg amend -c .^ # .^ refer to "working directoy parent, here 'feature A'
    82 
    82 
    83 .. warning:: `hg commit --amend` from Mercurial 2.2 does not lay obsolet marker yet and should
       
    84              **not** be used.
       
    85 
       
    86 note: refresh is an alias for amend
    83 note: refresh is an alias for amend
    87 
    84 
    88 hg qpop
    85 hg qpop
    89 `````````
    86 `````````
    90 
    87 
    91 the following command emulate the behavior of hg qpop:
    88 the following command emule the behavior of hg qpop:
    92 
    89 
    93   $ hg gdown
    90   $ hg gdown
    94 
    91 
    95 If you need to go back to an arbitrary commit you can just use:
    92 If you need to go back to an arbitrary commit you can just us:
    96 
    93 
    97   $ hg update
    94   $ hg update
    98 
    95 
    99 .. note:: gdown and update allow movement with working directory changes applied
    96 .. note:: gdown and update allow movement with working directory changes applied
   100           and gracefully merge them.
    97           and gracefully merge them.
   101 
    98 
   102 hg qpush
    99 hg qpush
   103 ````````
   100 ````````
   104 
   101 
   105 When you rewrite changesets, descendants of rewritten changesets are marked as
   102 When you rewrite changesets, descendants of rewritten changesets are marked as
   106 "unstable". You need to rewrite them on top of the new version of their
   103 "out of sync". You need to rewrite them on top of the new version of their
   107 ancestor.
   104 ancestor.
   108 
   105 
   109 The evolution extension adds a command to rewrite "unstable" changesets::
   106 The evolution extension adds a command to rewrite the "out of sync" changesets:::
   110 
   107 
   111   $ hg stabilize
   108   $ hg stabilize
   112 
   109 
   113 You can also decide to do it manually using::
   110 You can also decide to do it manually using::
   114 
   111 
   123 
   120 
   124 
   121 
   125 hg qrm
   122 hg qrm
   126 ```````
   123 ```````
   127 
   124 
   128 evolution introduce a new command to mark a changeset as "obsolete".::
   125 evolution introduce a new command to mark a changeset as "not wanted anymore".::
   129 
   126 
   130   $ hg kill <revset>
   127   $ hg kill <revset>
   131 
   128 
   132 hg qfold
   129 hg qfold
   133 `````````
   130 `````````
   134 
   131 
   135 
   132 
   136 ::
   133 ::
   137 
   134 
   138   $ hg up <top-most-changeset>
   135   $ hg up <top changeset>
   139   $ amend --edit -c <bottom-most-changeset>
   136   $ amend --edit -c <bottom changeset>
   140 
   137 
   141 
   138 
   142 or later::
   139 or later::
   143 
   140 
   144   $ hg collapse # XXX not implemented
   141   $ hg collapse # XXX not implemented
   153 
   150 
   154 
   151 
   155 hg qfinish and hg qimport
   152 hg qfinish and hg qimport
   156 ````````````````````````````
   153 ````````````````````````````
   157 
   154 
   158 Are not necessary anymore. If you want to control exchange and mutability of
   155 Is not necessary anymore. If you want to control exchange and mutability of
   159 changesets, see the phase feature
   156 changesets, see the phase feature
   160 
   157 
   161 
   158 
   162 
   159 
   163 hg qcommit
   160 hg qcommit