Mercurial > evolve
comparison docs/evolve-faq.rst @ 186:0698376bb13c
merge with arne change
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Wed, 28 Mar 2012 11:07:53 +0200 |
parents | 4379ffd6d293 |
children | 627dde054cd0 |
comparison
equal
deleted
inserted
replaced
174:8e2d9918c886 | 186:0698376bb13c |
---|---|
6 | 6 |
7 | 7 |
8 Add a changeset: ``commit`` | 8 Add a changeset: ``commit`` |
9 ------------------------------------------------------------ | 9 ------------------------------------------------------------ |
10 | 10 |
11 Just use commit as usual. New changeset will be in the `draft` phase. | 11 Just use commit as usual. New changesets will be in the `draft` phase. |
12 | 12 |
13 Rewrite a changeset: ``amend`` | 13 Rewrite a changeset: ``amend`` |
14 ------------------------------------------------------------ | 14 ------------------------------------------------------------ |
15 | 15 |
16 A new command ``hg amend`` is added by the extension. It writes a new | 16 A new command ``hg amend`` is added by the extension. It writes a new |
17 changeset combining working-directory parent changes and parent. It | 17 changeset combining working-directory parent changes and parent. It |
18 will work on any `draft` or `secret` changeset. It will not work on | 18 will work on any `draft` or `secret` changeset. It will not work on |
19 `public` changesets. | 19 `public` changesets. |
20 | 20 |
21 To understand what the result of amend will be I do use the two following | 21 To understand what the result of amend will be I use the two following |
22 aliases [#]_:: | 22 aliases [#]_:: |
23 | 23 |
24 # diff what amend will look likes | 24 # diff what amend will look likes |
25 pdiff=diff --rev .^ | 25 pdiff=diff --rev .^ |
26 | 26 |
63 .. warning:: when using graft --continue after conflict resolution you **MUST** | 63 .. warning:: when using graft --continue after conflict resolution you **MUST** |
64 pass `-O` or `-o` flag again because they are not saved for now | 64 pass `-O` or `-o` flag again because they are not saved for now |
65 | 65 |
66 | 66 |
67 .. [#] add this `-O` to graft instead of a dedicated command is probably | 67 .. [#] add this `-O` to graft instead of a dedicated command is probably |
68 abusive. But this was very convenient for experimental purpose. | 68 abusive. But this was very convenient for experimental purposes. |
69 This will likely change in non experimental release. | 69 This will likely change in non experimental release. |
70 | 70 |
71 Delete a changeset: ``kill`` | 71 Delete a changeset: ``kill`` |
72 ------------------------------------------------------------ | 72 ------------------------------------------------------------ |
73 | 73 |
74 A new ``kill`` command allows to remove a changeset. | 74 A new ``kill`` command allows removing a changeset. |
75 | 75 |
76 Just use ``hg kill <some-rev>``. | 76 Just use ``hg kill <some-rev>``. |
77 | 77 |
78 Moving within the history: ``up`` ``gdown`` and ``gup`` | 78 Moving within the history: ``up`` ``gdown`` and ``gup`` |
79 ------------------------------------------------------------ | 79 ------------------------------------------------------------ |
86 directory parent commit. | 86 directory parent commit. |
87 | 87 |
88 .. note:: those command only exist for the convenience of getting qpush and qpop | 88 .. note:: those command only exist for the convenience of getting qpush and qpop |
89 feeling back. | 89 feeling back. |
90 | 90 |
91 collapse changesets: ``amend`` | 91 Collapse changesets: ``amend`` |
92 ------------------------------------------------------------ | 92 ------------------------------------------------------------ |
93 | 93 |
94 you can use amend -c to collapse multiple changeset in a single one. | 94 you can use amend -c to collapse multiple changeset in a single one. |
95 | 95 |
96 Split changesets? | |
97 ----------------------- | |
98 | |
99 **TODO: Is it possible to split changesets, for example with record or crecord?** | |
100 | |
96 Move multiple changesets: ``rebase`` | 101 Move multiple changesets: ``rebase`` |
97 ------------------------------------------------------------ | 102 ------------------------------------------------------------ |
98 | 103 |
99 You can still use rebase to move whole part of the changeset graph at once. | 104 You can still use rebase to move a whole segment of the changeset graph together. |
100 | 105 |
101 .. warning:: Beware that rebasing obsolete changeset will result in new | 106 .. warning:: Beware that rebasing obsolete changesets will result in |
102 conflicting version. | 107 conflicting versions of the changesets. |
103 | 108 |
104 Stabilize history: ``stabilize`` | 109 Stabilize history: ``stabilize`` |
105 ------------------------------------------------------------ | 110 ------------------------------------------------------------ |
106 | 111 |
107 When you rewrite (amend) a changeset with children without rewriting | 112 When you rewrite (amend) a changeset with children without rewriting |
108 those children you create *unstable* changesets and *suspended | 113 those children you create *unstable* changesets and *suspended |
109 obsolete* changesets. | 114 obsolete* changesets. |
110 | 115 |
111 When you are finished amending a given changeset you will want to | 116 When you are finished amending a given changeset, you will want to |
112 declare it stable, in other words rebase its former descendants on its | 117 declare it stable, in other words rebase its former descendants on its |
113 newest version. This is not done automatically to avoid the | 118 newest version. This is not done automatically to avoid the |
114 proliferation of useless hidden changesets. | 119 proliferation of useless hidden changesets. |
115 | 120 |
116 .. warning:: ``hg stabilize`` have no --continue to use after conflict | 121 .. warning:: ``hg stabilize`` have no --continue to use after conflict |
117 resolution | 122 resolution |
118 | 123 |
119 .. warning:: stabilization does not handle deletion yet. | 124 .. warning:: stabilization does not handle deletion yet. |
120 | 125 |
121 .. warning:: obsolete currently rely on secret changeset to not exchange | 126 .. warning:: obsolete currently relies on changesets in secret phase |
122 obsolete and unstable changeset. | 127 to avoid exchanging obsolete and unstable changesets. |
123 | 128 |
124 XXX details issue here | 129 XXX details issue here |
125 | 130 |
126 | 131 |
127 Fix my history afterward: ``kill -n`` | 132 Fix my history afterward: ``kill -n`` |
128 ------------------------------------------------------------ | 133 ------------------------------------------------------------ |
129 | 134 |
130 Sometimes you need to create an obsolete marker by hand. This may happen when | 135 Sometimes you need to create an obsolete marker by hand. This may happen when |
131 upstream has applied some of you patches for example. | 136 upstream has applied some of your patches for example. |
132 | 137 |
133 you can use ``hg kill --new <new-changeset> <old-changeset>`` to add obsolete | 138 you can use ``hg kill --new <new-changeset> <old-changeset>`` to add obsolete |
134 marker. | 139 marker. |
135 | 140 |
136 export to mq: ``synchronize`` | 141 export to mq: ``synchronize`` |