Mercurial > evolve
comparison docs/from-mq.rst @ 161:4e3f25ba5401
More doc and index with sphynx
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Tue, 20 Mar 2012 19:26:55 +0100 |
parents | |
children | 33b9cb1ce659 |
comparison
equal
deleted
inserted
replaced
160:24346b78cd99 | 161:4e3f25ba5401 |
---|---|
1 ------------------------------------------- | |
2 From MQ To Evolve, The Refugee Book | |
3 ------------------------------------------- | |
4 | |
5 Cheat sheet | |
6 ------------- | |
7 | |
8 ============================== ============================================ | |
9 mq command new equivalent | |
10 ============================== ============================================ | |
11 | |
12 qseries ``log`` | |
13 qnew ``commit`` | |
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`` | |
20 | |
21 qfinish -- | |
22 qimport -- | |
23 | |
24 | |
25 Replacement details | |
26 --------------------- | |
27 | |
28 hg qseries | |
29 ``````````` | |
30 | |
31 All your work in progress are now real changeset all the time. | |
32 | |
33 You can then use standard log to display them. You can use phase revset to | |
34 display unfinished business only and template to have the same kind of compact | |
35 output qseries have. | |
36 | |
37 This will result in something like that:: | |
38 | |
39 [alias] | |
40 wip = log -r 'not public()' --template='{rev}:{node|short} {description|firstline}\n' | |
41 | |
42 hg qnew | |
43 ```````` | |
44 | |
45 With evolve you handle standard changeset without additional overlay. | |
46 | |
47 Standard changeset are created using hg commit as usual. | |
48 | |
49 $ hg commit | |
50 | |
51 If you want to keep the "wip are not pushed" behavior, you are looking for | |
52 setting your changeset in the secret phase using the phase command. | |
53 | |
54 Note that you only need it for the first commit you want to be secret. Later | |
55 commit will inherit their parents phase. | |
56 | |
57 If you always want your new commit to be in the secret phase, your should | |
58 consider updating your configuration: | |
59 | |
60 [phases] | |
61 new-commit=secret | |
62 | |
63 hg qref | |
64 ```````` | |
65 | |
66 A new command from evolution will allow you to rewrite the changeset you are | |
67 currently on. just call: | |
68 | |
69 $ hg amend | |
70 | |
71 | |
72 This command takes the same option than commit plus useful switch '-e' (--edit) | |
73 to edit the commit message. | |
74 | |
75 Amend have also a -c switch which allow you to make and explicit amending | |
76 commit before rewriting a changeset. | |
77 | |
78 $ hg record -m 'feature A' | |
79 # oups, I forget some stuff | |
80 $ hg record babar.py | |
81 $ hg amend -c .^ # .^ refer to "working directoy parent, here 'feature A' | |
82 | |
83 note: refresh is an alias for amend | |
84 | |
85 hg qpop | |
86 ````````` | |
87 | |
88 the following command emule the behavior of hg qpop: | |
89 | |
90 $ hg gdown | |
91 | |
92 If you need to go back to an arbitrary commit you can just us: | |
93 | |
94 $ hg update | |
95 | |
96 .. note:: gdown and update allow movement with working directory changes applied | |
97 and gracefully merge them. | |
98 | |
99 hg qpush | |
100 ```````` | |
101 | |
102 When you rewrite changeset, descendant of rewritten changeset are marked as | |
103 "out of sync". You new to rewrite them on top of the new version of their | |
104 ancestor. | |
105 | |
106 The evolution extension add a command to rewrite the next changeset: | |
107 | |
108 $ hg stabilize | |
109 | |
110 You can also decide to do it manually using | |
111 | |
112 $ hg graft -O <old-version> | |
113 | |
114 or | |
115 | |
116 $ hg rebase -r <revset for old version> -d . | |
117 | |
118 note: using graft allow you to pick the changeset you want next as the --move | |
119 option of qpush do. | |
120 | |
121 | |
122 hg qrm | |
123 ``````` | |
124 | |
125 evolution introduce a new command to mark a changeset as "not wanted anymore". | |
126 | |
127 $ hg kill <revset> | |
128 | |
129 hg qfold | |
130 ````````` | |
131 | |
132 | |
133 :: | |
134 | |
135 $ hg up <top changeset> | |
136 $ amend --edit -c <bottom changeset> | |
137 | |
138 | |
139 or later:: | |
140 | |
141 $ hg collapse # XXX not implemented | |
142 | |
143 $ hg rebase --collapse # XXX not tested | |
144 | |
145 | |
146 hg qdiff | |
147 ````````` | |
148 | |
149 ``odiff`` is an alias for `hg diff -r .^` it works as qdiff event outside mq. | |
150 | |
151 | |
152 | |
153 hg qfinish and hg qimport | |
154 ```````````````````````````` | |
155 | |
156 Is not useful anymore if you want to controll exchange and mutability of | |
157 changeset see the phase feature | |
158 | |
159 | |
160 | |
161 hg qcommit | |
162 ``````````````` | |
163 | |
164 If you really need to send patches through a versionned mq patches you should | |
165 look at the qsync extension. |