equal
deleted
inserted
replaced
12 > git = 1 |
12 > git = 1 |
13 > [alias] |
13 > [alias] |
14 > # "-d '0 0'" means that the new commit will be at January 1st 1970. |
14 > # "-d '0 0'" means that the new commit will be at January 1st 1970. |
15 > # This is used for stable hash during test |
15 > # This is used for stable hash during test |
16 > amend = amend -d '0 0' |
16 > amend = amend -d '0 0' |
17 > [extensions] |
|
18 > hgext.graphlog= |
|
19 > EOF |
17 > EOF |
20 |
18 |
21 $ hg init local |
19 $ hg init local |
22 $ cat >> local/.hg/hgrc << EOF |
20 $ cat >> local/.hg/hgrc << EOF |
23 > [paths] |
21 > [paths] |
52 |
50 |
53 Improved git format diff: |
51 Improved git format diff: |
54 |
52 |
55 $ hg showconfig diff |
53 $ hg showconfig diff |
56 diff.git=1 |
54 diff.git=1 |
57 |
|
58 And the graphlog extension |
|
59 $ hg showconfig extensions |
|
60 extensions.hgext.graphlog= |
|
61 |
55 |
62 And of course, we enable the experimental extensions for mutable history: |
56 And of course, we enable the experimental extensions for mutable history: |
63 |
57 |
64 $ cat >> $HGRCPATH <<EOF |
58 $ cat >> $HGRCPATH <<EOF |
65 > [extensions] |
59 > [extensions] |
118 > EOF |
112 > EOF |
119 $ hg commit -m "adding fruit" |
113 $ hg commit -m "adding fruit" |
120 |
114 |
121 This history is very linear |
115 This history is very linear |
122 |
116 |
123 $ hg glog |
117 $ hg log -G |
124 @ d85de4546133 (draft): adding fruit |
118 @ d85de4546133 (draft): adding fruit |
125 | |
119 | |
126 o 4d5dc8187023 (draft): adding condiment |
120 o 4d5dc8187023 (draft): adding condiment |
127 | |
121 | |
128 o 7e82d3f3c2cb (public): Monthy Python Shopping list |
122 o 7e82d3f3c2cb (public): Monthy Python Shopping list |
151 |
145 |
152 The faulty changeset is in the "draft" phase because he was not exchanged with |
146 The faulty changeset is in the "draft" phase because he was not exchanged with |
153 the outside. The first one have been exchanged and is an immutable public |
147 the outside. The first one have been exchanged and is an immutable public |
154 changeset. |
148 changeset. |
155 |
149 |
156 $ hg glog |
150 $ hg log -G |
157 @ d85de4546133 (draft): adding fruit |
151 @ d85de4546133 (draft): adding fruit |
158 | |
152 | |
159 o 4d5dc8187023 (draft): adding condiment |
153 o 4d5dc8187023 (draft): adding condiment |
160 | |
154 | |
161 o 7e82d3f3c2cb (public): Monthy Python Shopping list |
155 o 7e82d3f3c2cb (public): Monthy Python Shopping list |
162 |
156 |
163 |
157 |
164 hopefully. I can use hg amend to rewrite my faulty changeset! |
158 hopefully. I can use `hg commit --amend` to rewrite my faulty changeset! |
165 |
159 |
166 $ sed -i'' -e s/Bananos/Banana/ shopping |
160 $ sed -i'' -e s/Bananos/Banana/ shopping |
167 $ hg diff |
161 $ hg diff |
168 diff --git a/shopping b/shopping |
162 diff --git a/shopping b/shopping |
169 --- a/shopping |
163 --- a/shopping |
178 Apple |
172 Apple |
179 $ hg amend |
173 $ hg amend |
180 |
174 |
181 A new changeset with the right diff replace the wrong one. |
175 A new changeset with the right diff replace the wrong one. |
182 |
176 |
183 $ hg glog |
177 $ hg log -G |
184 @ 0cacb48f4482 (draft): adding fruit |
178 @ 0cacb48f4482 (draft): adding fruit |
185 | |
179 | |
186 o 4d5dc8187023 (draft): adding condiment |
180 o 4d5dc8187023 (draft): adding condiment |
187 | |
181 | |
188 o 7e82d3f3c2cb (public): Monthy Python Shopping list |
182 o 7e82d3f3c2cb (public): Monthy Python Shopping list |
333 o 9ca060c80d74 (public): SPAM |
327 o 9ca060c80d74 (public): SPAM |
334 | |
328 | |
335 o 7e82d3f3c2cb (public): Monthy Python Shopping list |
329 o 7e82d3f3c2cb (public): Monthy Python Shopping list |
336 |
330 |
337 |
331 |
338 .. note: don't amend changeset 7e82d3f3c2cb or 9ca060c80d74 as they are immutable. |
332 .. note: We can't amend changeset 7e82d3f3c2cb or 9ca060c80d74 as they are immutable. |
339 |
333 |
340 I now want to push to remote all my change but the bathroom one that i'm not |
334 I now want to push to remote all my change but the bathroom one that i'm not |
341 totally happy with yet. To be able to push "SPAM SPAM" I need a version of "SPAM SPAM" not children of |
335 totally happy with yet. To be able to push "SPAM SPAM" I need a version of "SPAM SPAM" not children of |
342 "bathroom stuff" |
336 "bathroom stuff" |
343 |
337 |
362 o 7e82d3f3c2cb (public): Monthy Python Shopping list |
356 o 7e82d3f3c2cb (public): Monthy Python Shopping list |
363 |
357 |
364 |
358 |
365 We have a new SPAM SPAM version without the bathroom stuff |
359 We have a new SPAM SPAM version without the bathroom stuff |
366 |
360 |
367 $ grep Spam shopping # enouth spam |
361 $ grep Spam shopping # enough spam |
368 Spam Spam Spam Spam Spam Spam Spam Spam Spam |
362 Spam Spam Spam Spam Spam Spam Spam Spam Spam |
369 $ grep Toothbrush shopping # no Toothbrush |
363 $ grep Toothbrush shopping # no Toothbrush |
370 [1] |
364 [1] |
371 $ hg export . |
365 $ hg export . |
372 # HG changeset patch |
366 # HG changeset patch |