comparison docs/evolve-faq.rst @ 1287:6f2c1574eda8 stable

docs: fix slightly unconventional .rst markup
author Greg Ward <greg@gerg.ca>
date Thu, 23 Apr 2015 21:05:54 -0400
parents 59c78fd80a0b
children c9dc8d0346f9
comparison
equal deleted inserted replaced
1286:d6a77e8f7d5c 1287:6f2c1574eda8
1 .. Copyright 2011 Pierre-Yves David <pierre-yves.david@ens-lyon.org> 1 .. Copyright 2011 Pierre-Yves David <pierre-yves.david@ens-lyon.org>
2 .. Logilab SA <contact@logilab.fr> 2 .. Logilab SA <contact@logilab.fr>
3 3
4 --------------------------------------------------------------------- 4 -------------
5 Evolve How To 5 Evolve How To
6 --------------------------------------------------------------------- 6 -------------
7 7
8 8
9 9
10 Add a changeset: ``commit`` 10 Add a changeset: ``commit``
11 ------------------------------------------------------------ 11 ---------------------------
12 12
13 Just use commit as usual. New changesets will be in the `draft` phase. 13 Just use commit as usual. New changesets will be in the `draft` phase.
14 14
15 Rewrite a changeset: ``commit --amend`` 15 Rewrite a changeset: ``commit --amend``
16 ------------------------------------------------------------ 16 ---------------------------------------
17 17
18 It writes a new changeset combining working-directory parent changes and parent. 18 It writes a new changeset combining working-directory parent changes and parent.
19 It will work on any `draft` or `secret` changeset. It will not work on `public` 19 It will work on any `draft` or `secret` changeset. It will not work on `public`
20 changesets. 20 changesets.
21 21
34 .. [#] (defined by the evolve extension for you) 34 .. [#] (defined by the evolve extension for you)
35 35
36 36
37 37
38 Move a changeset: ``grab`` 38 Move a changeset: ``grab``
39 ------------------------------------------------------------ 39 --------------------------
40 40
41 You can use ``hg grab <rev>`` to move a rev at your current location, making the 41 You can use ``hg grab <rev>`` to move a rev at your current location, making the
42 old version obsolete. 42 old version obsolete.
43 43
44 .. note:: grab is an alias for ``hg rebase --dest . --rev $@; hg up <result>`` 44 .. note:: grab is an alias for ``hg rebase --dest . --rev $@; hg up <result>``
45 45
46 46
47 Delete a changeset: ``prune`` 47 Delete a changeset: ``prune``
48 ------------------------------------------------------------ 48 -----------------------------
49 49
50 A new ``prune`` command allows removing a changeset. 50 A new ``prune`` command allows removing a changeset.
51 51
52 Just use ``hg prune <some-rev>``. 52 Just use ``hg prune <some-rev>``.
53 53
54 54
55 Moving within the history: ``gdown`` and ``gup`` 55 Moving within the history: ``gdown`` and ``gup``
56 ------------------------------------------------------------ 56 ------------------------------------------------
57 57
58 While working on mutable part of the history you often need to move between 58 While working on mutable part of the history you often need to move between
59 mutable commits. 59 mutable commits.
60 60
61 You just need to use standard update to work with evolve. For convenience, you 61 You just need to use standard update to work with evolve. For convenience, you
65 65
66 .. note:: Those commands only exist for the convenience of getting qpush and qpop 66 .. note:: Those commands only exist for the convenience of getting qpush and qpop
67 feeling back. 67 feeling back.
68 68
69 Collapse changesets: ``fold`` 69 Collapse changesets: ``fold``
70 ------------------------------------------------------------ 70 -----------------------------
71 71
72 You can use ``hg fold`` to collapse multiple changesets in a single one. 72 You can use ``hg fold`` to collapse multiple changesets in a single one.
73 73
74 It takes two forms: 74 It takes two forms:
75 75
76 ``hg fold <rev>`` folds everything from you current changeset to `<rev>` 76 ``hg fold <rev>`` folds everything from you current changeset to `<rev>`
77 77
78 ``hg fold -r <revset>`` fold everything changeset matching the revset together. 78 ``hg fold -r <revset>`` fold everything changeset matching the revset together.
79 79
80 Getting changes out of a commit 80 Getting changes out of a commit
81 ------------------------------------------------------------ 81 -------------------------------
82 82
83 The ``hg uncommit`` command lets you rewrite the parent commit without 83 The ``hg uncommit`` command lets you rewrite the parent commit without
84 selected changed files. Target files content is not altered and 84 selected changed files. Target files content is not altered and
85 appears again as "modified":: 85 appears again as "modified"::
86 86
92 $ hg uncommit celestine 92 $ hg uncommit celestine
93 $ hg status 93 $ hg status
94 M celestine 94 M celestine
95 95
96 Split a changeset 96 Split a changeset
97 ----------------------- 97 -----------------
98 98
99 To split on file boundaries, just use ``uncommit`` command. 99 To split on file boundaries, just use ``uncommit`` command.
100 100
101 If you need a fine-grained split, there is no official command for that yet. 101 If you need a fine-grained split, there is no official command for that yet.
102 However, it is easily achieved by manual operation:: 102 However, it is easily achieved by manual operation::
118 118
119 .. _histedit: http://mercurial.selenic.com/wiki/HisteditExtension 119 .. _histedit: http://mercurial.selenic.com/wiki/HisteditExtension
120 120
121 121
122 Update my current work in progress after a pull 122 Update my current work in progress after a pull
123 ---------------------------------------------- 123 -----------------------------------------------
124 124
125 Whenever you are working on some changesets, it is more likely that a pull 125 Whenever you are working on some changesets, it is more likely that a pull
126 will, eventually, import new changesets in your tree. 126 will, eventually, import new changesets in your tree.
127 127
128 And it is likely that you will want your work in progress changesets to be 128 And it is likely that you will want your work in progress changesets to be
131 Doing so is only a matter of rebasing. 131 Doing so is only a matter of rebasing.
132 132
133 133
134 134
135 Move multiple changesets: ``rebase`` 135 Move multiple changesets: ``rebase``
136 ------------------------------------------------------------ 136 ------------------------------------
137 137
138 You can still use rebase to move a whole segment of the changeset graph together. 138 You can still use rebase to move a whole segment of the changeset graph together.
139 139
140 .. warning:: Beware that rebasing changesets already obsolete will likely result in 140 .. warning:: Beware that rebasing changesets already obsolete will likely result in
141 divergent versions of the changesets. 141 divergent versions of the changesets.
142 142
143 Resolve history troubles: ``evolve`` 143 Resolve history troubles: ``evolve``
144 ------------------------------------------------------------ 144 ------------------------------------
145 145
146 When you rewrite (amend) a changeset with children without rewriting 146 When you rewrite (amend) a changeset with children without rewriting
147 those children you create *unstable* changesets and *suspended 147 those children you create *unstable* changesets and *suspended
148 obsolete* changesets. 148 obsolete* changesets.
149 149
153 153
154 You can also use evolve to solve `bumped` and `divergent` changeset/ 154 You can also use evolve to solve `bumped` and `divergent` changeset/
155 155
156 156
157 Fix my history afterward: ``prune -n`` 157 Fix my history afterward: ``prune -n``
158 ------------------------------------------------------------ 158 --------------------------------------
159 159
160 Sometimes you need to create an obsolete marker by hand. This may happen when 160 Sometimes you need to create an obsolete marker by hand. This may happen when
161 upstream has applied some of your patches for example. 161 upstream has applied some of your patches for example.
162 162
163 you can use ``hg prune <old-changeset> --succ <new-changeset>`` to add obsolete 163 you can use ``hg prune <old-changeset> --succ <new-changeset>`` to add obsolete
164 marker. 164 marker.
165 165
166 View diff from the last amend 166 View diff from the last amend
167 ------------------------------------------------------------ 167 -----------------------------
168 168
169 An ``odiff`` alias have been added by ``enable.sh`` 169 An ``odiff`` alias have been added by ``enable.sh``
170 170
171 :: 171 ::
172 [alias] 172 [alias]
173 odiff = diff --rev 'limit(precursors(.),1)' --rev . 173 odiff = diff --rev 'limit(precursors(.),1)' --rev .
174 174
175 View obsolete markers 175 View obsolete markers
176 ------------------------------------------------------------ 176 ---------------------
177 177
178 hgview_ is the only viewer that currently supports this feature. You 178 hgview_ is the only viewer that currently supports this feature. You
179 need version 1.6.2 179 need version 1.6.2
180 180
181 .. _hgview: http://www.logilab.org/project/hgview/ 181 .. _hgview: http://www.logilab.org/project/hgview/
191 c4cbebac3751 4f1c269eab68 191 c4cbebac3751 4f1c269eab68
192 192
193 193
194 194
195 Important Note 195 Important Note
196 ===================================================================== 196 ==============
197 197
198 View change to your file 198 View change to your file
199 ------------------------------------------------------------ 199 ------------------------
200 200
201 Extinct changesets are hidden using the *hidden* feature of mercurial. 201 Extinct changesets are hidden using the *hidden* feature of mercurial.
202 202
203 Only ``hg log`` and ``hgview`` support it, other 203 Only ``hg log`` and ``hgview`` support it, other
204 graphical viewer do not. 204 graphical viewer do not.