docs/from-mq.rst
changeset 367 5bc3e5dc2637
parent 347 631cdf4295bc
parent 366 c67af39d1ae9
child 377 1d6cc8c22cd9
equal deleted inserted replaced
361:ac7969043677 367:5bc3e5dc2637
    11 qseries                         ``log``
    11 qseries                         ``log``
    12 qnew                            ``commit``
    12 qnew                            ``commit``
    13 qrefresh                        ``amend``
    13 qrefresh                        ``amend``
    14 qpop                            ``update`` or ``qdown``
    14 qpop                            ``update`` or ``qdown``
    15 qpush                           ``update`` or ``gup`` sometimes ``stabilize``
    15 qpush                           ``update`` or ``gup`` sometimes ``stabilize``
    16 qrm                             ``kill``
    16 qrm                             ``prune`̀`
    17 qfold                           ``amend -c`` (for now, ``collapse`` soon)
    17 qfold                           ``amend -c`` (for now, ``collapse`` soon)
    18 qdiff                           ``odiff``
    18 qdiff                           ``odiff``
    19 
    19 
    20 qfinish                         --
    20 qfinish                         --
    21 qimport                         --
    21 qimport                         --
    26 ---------------------
    26 ---------------------
    27 
    27 
    28 hg qseries
    28 hg qseries
    29 ```````````
    29 ```````````
    30 
    30 
    31 All your work in progress is now in real changeset all the time.
    31 All your work in progress is now in real changesets all the time.
    32 
    32 
    33 You can use the standard log to display them. You can use the phase revset to
    33 You can use the standard log command to display them. You can use the
    34 display unfinished business only and templates to have the same kind of compact
    34 phase revset to display unfinished work only, and use templates to have
    35 output qseries has.
    35 the same kind of compact that the output of qseries has.
    36 
    36 
    37 This will result in something like that::
    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'
    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 
    51 If you want to keep the "wip are not pushed" behavior, you are looking for
    51 If you want to keep the "WIP is not pushed" behavior, you want to
    52 setting your changeset in the secret phase using the phase command.
    52 set your changeset in the secret phase using the phase command.
    53 
    53 
    54 Note that you only need it for the first commit you want to be secret. Later
    54 Note that you only need it for the first commit you want to be secret. Later
    55 commits will inherit their parents phase.
    55 commits will inherit their parents phase.
    56 
    56 
    57 If you always want your new commit to be in the secret phase, your should
    57 If you always want your new commit to be in the secret phase, your should
    62 
    62 
    63 hg qref
    63 hg qref
    64 ````````
    64 ````````
    65 
    65 
    66 A new command from evolution 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. just call:
    67 currently on. Just call:
    68 
    68 
    69   $ hg amend
    69   $ hg amend
    70 
       
    71 
    70 
    72 This command takes the same options as commit, plus the switch '-e' (--edit)
    71 This command takes the same options as commit, plus the switch '-e' (--edit)
    73 to edit the commit message in an editor.
    72 to edit the commit message in an editor.
    74 
    73 
    75 Amend have also a -c switch which allow you to make an explicit amending
    74 The amend command also has a -c switch which allow you to make an
    76 commit before rewriting a changeset.::
    75 explicit amending commit before rewriting a changeset.::
    77 
    76 
    78   $ hg record -m 'feature A'
    77   $ hg record -m 'feature A'
    79   # oups, I forget some stuff
    78   # oups, I forget some stuff
    80   $ hg record babar.py
    79   $ hg record babar.py
    81   $ hg amend -c .^ # .^ refer to "working directoy parent, here 'feature A'
    80   $ hg amend -c .^ # .^ refer to "working directoy parent, here 'feature A'
    91 
    90 
    92 
    91 
    93 hg qpop
    92 hg qpop
    94 `````````
    93 `````````
    95 
    94 
    96 the following command emule the behavior of hg qpop:
    95 The following command emulate the behavior of hg qpop:
    97 
    96 
    98   $ hg gdown
    97   $ hg gdown
    99 
    98 
   100 If you need to go back to an arbitrary commit you can just us:
    99 If you need to go back to an arbitrary commit you can use:
   101 
   100 
   102   $ hg update
   101   $ hg update
   103 
   102 
   104 .. note:: gdown and update allow movement with working directory changes applied
   103 .. note:: gdown and update allow movement with working directory changes applied
   105           and gracefully merge them.
   104           and gracefully merge them.
   109 
   108 
   110 When you rewrite changesets, descendants of rewritten changesets are marked as
   109 When you rewrite changesets, descendants of rewritten changesets are marked as
   111 "out of sync". You need to rewrite them on top of the new version of their
   110 "out of sync". You need to rewrite them on top of the new version of their
   112 ancestor.
   111 ancestor.
   113 
   112 
   114 The evolution extension adds a command to rewrite the "out of sync" changesets:::
   113 The evolution extension adds a command to rewrite the "out of sync"
       
   114 changesets:::
   115 
   115 
   116   $ hg stabilize
   116   $ hg stabilize
   117 
   117 
   118 You can also decide to do it manually using::
   118 You can also decide to do it manually using::
   119 
   119 
   121 
   121 
   122 or::
   122 or::
   123 
   123 
   124   $ hg rebase -r <revset for old version> -d .
   124   $ hg rebase -r <revset for old version> -d .
   125 
   125 
   126 note: using graft allow you to pick the changeset you want next as the --move
   126 note: using graft allows you to pick the changeset you want next as the --move
   127 option of qpush do.
   127 option of qpush do.
   128 
   128 
   129 
   129 
   130 hg qrm
   130 hg qrm
   131 ```````
   131 ```````
   132 
   132 
   133 evolution introduce a new command to mark a changeset as "not wanted anymore".::
   133 evolution introduce a new command to mark a changeset as "not wanted anymore".::
   134 
   134 
   135   $ hg kill <revset>
   135   $ hg prune <revset>
   136 
   136 
   137 hg qfold
   137 hg qfold
   138 `````````
   138 `````````
   139 
   139 
   140 
   140 
   158 
   158 
   159 
   159 
   160 hg qfinish and hg qimport
   160 hg qfinish and hg qimport
   161 ````````````````````````````
   161 ````````````````````````````
   162 
   162 
   163 Is not necessary anymore. If you want to control exchange and mutability of
   163 These are not necessary anymore. If you want to control exchange and
   164 changesets, see the phase feature
   164 mutability of changesets, see the phase feature
   165 
   165 
   166 
   166 
   167 
   167 
   168 hg qcommit
   168 hg qcommit
   169 ```````````````
   169 ```````````````