Mercurial > evolve
comparison docs/evolve-faq.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 | 06c942f9bac6 |
comparison
equal
deleted
inserted
replaced
160:24346b78cd99 | 161:4e3f25ba5401 |
---|---|
1 | |
2 --------------------------------------------------------------------- | |
3 Evolve How To | |
4 --------------------------------------------------------------------- | |
5 | |
6 | |
7 Add a changeset: ``commit`` | |
8 ------------------------------------------------------------ | |
9 | |
10 Just use commit as usual. | |
11 | |
12 Rewrite a changeset: ``amend`` | |
13 ------------------------------------------------------------ | |
14 | |
15 A new command ``hg amend`` is added by the extension. it write a new changeset | |
16 combining working-directory parent changes and working directory parent changes. | |
17 | |
18 To understand what the result of amend will be I do use the two following | |
19 aliases [#]_:: | |
20 | |
21 # diff what amend will look likes | |
22 pdiff=diff --rev .^ | |
23 | |
24 # status what amend will look likes | |
25 pstatus=status --rev .^ | |
26 | |
27 It take various options to choose the user, the date and the branch of the | |
28 result. see ``hg help amend for detail`` | |
29 | |
30 This command can be invoqued on any mutable changeset even changeset with | |
31 children ! | |
32 | |
33 | |
34 .. note:: the amend command is very similar to mq's ``qrefresh``, a ``refresh`` | |
35 alias for amend is also available. But note that contrary to | |
36 ``qrefresh``, ``amend`` does not exclude changes on file not specified | |
37 on the command line. | |
38 | |
39 XXX add idank example | |
40 | |
41 | |
42 .. [#] (added by enable.sh) | |
43 | |
44 | |
45 Move a changeset: ``graft`` | |
46 ------------------------------------------------------------ | |
47 | |
48 the graft command introduced in 2.0 allows to "copy changes from other branches | |
49 onto the current branch" | |
50 | |
51 The graft command have been altered to be able to create an obsolete marker from | |
52 the copy result to the copy source, acting like changeset movement operation. | |
53 This is achieved using a new flag `-O` (or `old-obsolete`) [#]_. | |
54 | |
55 | |
56 XXX example | |
57 | |
58 .. warning:: when using graft --continue after conflict resolution you **MUST** | |
59 pass `-O` or `-o` flag again because they are not saved for now | |
60 | |
61 | |
62 .. [#] add this `-O` to graft instead of a dedicated command is probably | |
63 abusive. But this was very convenient for experimental purpose. | |
64 This will likely change in non experimental release. | |
65 | |
66 Delete a changeset: ``kill`` | |
67 ------------------------------------------------------------ | |
68 | |
69 A new ``kill`` command allow to remove a changeset. | |
70 | |
71 Just use ``hg kill <some-rev>``. | |
72 | |
73 Moving within the history: ``up`` ``gdown`` and ``gup`` | |
74 ------------------------------------------------------------ | |
75 | |
76 While working on mutable part of the history you often need to move between | |
77 mutable commit. | |
78 | |
79 You just need to use standard update to work with evolve. For convenience, you | |
80 can use ``hg gup`` to move to children commit or ``hg gdown`` to move to working | |
81 directory parent commit. | |
82 | |
83 .. note:: those command only exist for the convenience of getting qpush and qpop | |
84 feeling back. | |
85 | |
86 They are | |
87 | |
88 collapse changesets: ``amend`` | |
89 ------------------------------------------------------------ | |
90 | |
91 you can use amend -c to collapse multiple changeset in a single one. | |
92 | |
93 Move multiple changesets: ``rebase`` | |
94 ------------------------------------------------------------ | |
95 | |
96 You can still use rebase to move whole part of the changeset graph at once. | |
97 | |
98 .. warning:: Beware that rebasing obsolete changeset will result in new | |
99 conflicting version. | |
100 | |
101 Stabilize history: ``stabilize`` | |
102 ------------------------------------------------------------ | |
103 | |
104 When you rewrite changeset with children without rewriting those children you | |
105 create *unstable* changeset and *suspended obsolete* changeset | |
106 | |
107 .. warning:: ``hg stabilize`` have no --continue to use after conflict | |
108 resolution. is conflict occurs use:: | |
109 | |
110 $ hg up -C . # cancel the failed merge | |
111 $ hg stabilize -n # go get a command to execute | |
112 | |
113 .. warning:: stabilization does not handle deletion yet. | |
114 | |
115 .. warning:: obsolete currently rely on secret changeset to not exchange | |
116 obsolete and unstable changeset. | |
117 | |
118 XXX details issue here | |
119 | |
120 | |
121 Fix my history afterward: ``kill -n`` | |
122 ------------------------------------------------------------ | |
123 | |
124 sometime you need to create obsolete marker by hand. This may happen when | |
125 upstream applied some of you patches for example. | |
126 | |
127 you can use ``hg kill --new <new-changeset> <old-changeset>`` to add obsolete | |
128 marker. | |
129 | |
130 view change to your file | |
131 ------------------------------------------------------------ | |
132 | |
133 Another extension allows to export | |
134 | |
135 view diff from the last amend | |
136 ------------------------------------------------------------ | |
137 | |
138 an odiff alias have been added by enable.sh | |
139 | |
140 :: | |
141 [alias] | |
142 odiff = diff --rev 'limit(obsparents(.),1)' --rev . | |
143 | |
144 view obsolete marker | |
145 ------------------------------------------------------------ | |
146 | |
147 hgview is the only viewer that support this feature. you need an experimental | |
148 version available here: | |
149 | |
150 $ hg clone http://hg-dev.octopoid.net/hgwebdir.cgi/hgview/ | |
151 | |
152 Prevent my unfinished changeset to get published | |
153 ------------------------------------------------------------ | |
154 | |
155 The easiest way is to set them in the private phase | |
156 | |
157 Important Note | |
158 ===================================================================== | |
159 | |
160 view change to your file | |
161 ------------------------------------------------------------ | |
162 | |
163 extinct changeset are hidden using the *hidden* feature of mercurial. | |
164 | |
165 only hg log and hgview support it. hg glog or other visual viewer don't. | |
166 | |
167 | |
168 | |
169 | |
170 | |
171 | |
172 | |
173 | |
174 | |
175 |