Show More
@@ -11,6 +11,7 b' import os, sys, errno, re, tempfile' | |||||
11 | import util, scmutil, templater, patch, error, templatekw, revlog, copies |
|
11 | import util, scmutil, templater, patch, error, templatekw, revlog, copies | |
12 | import match as matchmod |
|
12 | import match as matchmod | |
13 | import subrepo, context, repair, bookmarks, graphmod, revset, phases, obsolete |
|
13 | import subrepo, context, repair, bookmarks, graphmod, revset, phases, obsolete | |
|
14 | import changelog | |||
14 | import lock as lockmod |
|
15 | import lock as lockmod | |
15 |
|
16 | |||
16 | def parsealiases(cmd): |
|
17 | def parsealiases(cmd): | |
@@ -1696,6 +1697,9 b' def amend(ui, repo, commitfunc, old, ext' | |||||
1696 | if not message: |
|
1697 | if not message: | |
1697 | message = old.description() |
|
1698 | message = old.description() | |
1698 |
|
1699 | |||
|
1700 | pureextra = extra.copy() | |||
|
1701 | extra['amend_source'] = old.hex() | |||
|
1702 | ||||
1699 | new = context.memctx(repo, |
|
1703 | new = context.memctx(repo, | |
1700 | parents=[base.node(), nullid], |
|
1704 | parents=[base.node(), nullid], | |
1701 | text=message, |
|
1705 | text=message, | |
@@ -1705,6 +1709,19 b' def amend(ui, repo, commitfunc, old, ext' | |||||
1705 | date=date, |
|
1709 | date=date, | |
1706 | extra=extra) |
|
1710 | extra=extra) | |
1707 | new._text = commitforceeditor(repo, new, []) |
|
1711 | new._text = commitforceeditor(repo, new, []) | |
|
1712 | ||||
|
1713 | newdesc = changelog.stripdesc(new.description()) | |||
|
1714 | if ((not node) | |||
|
1715 | and newdesc == old.description() | |||
|
1716 | and user == old.user() | |||
|
1717 | and date == old.date() | |||
|
1718 | and pureextra == old.extra()): | |||
|
1719 | # nothing changed. continuing here would create a new node | |||
|
1720 | # anyway because of the amend_source noise. | |||
|
1721 | # | |||
|
1722 | # This not what we expect from amend. | |||
|
1723 | return old.node() | |||
|
1724 | ||||
1708 | ph = repo.ui.config('phases', 'new-commit', phases.draft) |
|
1725 | ph = repo.ui.config('phases', 'new-commit', phases.draft) | |
1709 | try: |
|
1726 | try: | |
1710 | repo.ui.setconfig('phases', 'new-commit', old.phase()) |
|
1727 | repo.ui.setconfig('phases', 'new-commit', old.phase()) |
@@ -32,12 +32,12 b' Amending changeset with changes in worki' | |||||
32 |
|
32 | |||
33 | $ echo a >> a |
|
33 | $ echo a >> a | |
34 | $ hg ci --amend -m 'amend base1' |
|
34 | $ hg ci --amend -m 'amend base1' | |
35 | pretxncommit 9cd25b479c51be2f4ed2c38e7abdf7ce67d8e0dc |
|
35 | pretxncommit 43f1ba15f28a50abf0aae529cf8a16bfced7b149 | |
36 | 9cd25b479c51 tip |
|
36 | 43f1ba15f28a tip | |
37 | saved backup bundle to $TESTTMP/.hg/strip-backup/489edb5b847d-amend-backup.hg (glob) |
|
37 | saved backup bundle to $TESTTMP/.hg/strip-backup/489edb5b847d-amend-backup.hg (glob) | |
38 | $ echo 'pretxncommit.foo = ' >> $HGRCPATH |
|
38 | $ echo 'pretxncommit.foo = ' >> $HGRCPATH | |
39 | $ hg diff -c . |
|
39 | $ hg diff -c . | |
40 |
diff -r ad120869acf0 -r |
|
40 | diff -r ad120869acf0 -r 43f1ba15f28a a | |
41 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
41 | --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
42 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
42 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 | |
43 | @@ -1,1 +1,3 @@ |
|
43 | @@ -1,1 +1,3 @@ | |
@@ -45,7 +45,7 b' Amending changeset with changes in worki' | |||||
45 | +a |
|
45 | +a | |
46 | +a |
|
46 | +a | |
47 | $ hg log |
|
47 | $ hg log | |
48 |
changeset: 1: |
|
48 | changeset: 1:43f1ba15f28a | |
49 | tag: tip |
|
49 | tag: tip | |
50 | user: test |
|
50 | user: test | |
51 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
51 | date: Thu Jan 01 00:00:00 1970 +0000 | |
@@ -62,36 +62,36 b' Add new file:' | |||||
62 | $ echo b > b |
|
62 | $ echo b > b | |
63 | $ hg ci --amend -Am 'amend base1 new file' |
|
63 | $ hg ci --amend -Am 'amend base1 new file' | |
64 | adding b |
|
64 | adding b | |
65 |
saved backup bundle to $TESTTMP/.hg/strip-backup/ |
|
65 | saved backup bundle to $TESTTMP/.hg/strip-backup/43f1ba15f28a-amend-backup.hg (glob) | |
66 |
|
66 | |||
67 | Remove file that was added in amended commit: |
|
67 | Remove file that was added in amended commit: | |
68 |
|
68 | |||
69 | $ hg rm b |
|
69 | $ hg rm b | |
70 | $ hg ci --amend -m 'amend base1 remove new file' |
|
70 | $ hg ci --amend -m 'amend base1 remove new file' | |
71 |
saved backup bundle to $TESTTMP/.hg/strip-backup/ |
|
71 | saved backup bundle to $TESTTMP/.hg/strip-backup/b8e3cb2b3882-amend-backup.hg (glob) | |
72 |
|
72 | |||
73 | $ hg cat b |
|
73 | $ hg cat b | |
74 |
b: no such file in rev |
|
74 | b: no such file in rev 74609c7f506e | |
75 | [1] |
|
75 | [1] | |
76 |
|
76 | |||
77 | No changes, just a different message: |
|
77 | No changes, just a different message: | |
78 |
|
78 | |||
79 | $ hg ci -v --amend -m 'no changes, new message' |
|
79 | $ hg ci -v --amend -m 'no changes, new message' | |
80 |
amending changeset |
|
80 | amending changeset 74609c7f506e | |
81 |
copying changeset |
|
81 | copying changeset 74609c7f506e to ad120869acf0 | |
82 | a |
|
82 | a | |
83 |
stripping amended changeset |
|
83 | stripping amended changeset 74609c7f506e | |
84 | 1 changesets found |
|
84 | 1 changesets found | |
85 |
saved backup bundle to $TESTTMP/.hg/strip-backup/ |
|
85 | saved backup bundle to $TESTTMP/.hg/strip-backup/74609c7f506e-amend-backup.hg (glob) | |
86 | 1 changesets found |
|
86 | 1 changesets found | |
87 | adding branch |
|
87 | adding branch | |
88 | adding changesets |
|
88 | adding changesets | |
89 | adding manifests |
|
89 | adding manifests | |
90 | adding file changes |
|
90 | adding file changes | |
91 | added 1 changesets with 1 changes to 1 files |
|
91 | added 1 changesets with 1 changes to 1 files | |
92 |
committed changeset 1: |
|
92 | committed changeset 1:1cd866679df8 | |
93 | $ hg diff -c . |
|
93 | $ hg diff -c . | |
94 |
diff -r ad120869acf0 -r |
|
94 | diff -r ad120869acf0 -r 1cd866679df8 a | |
95 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
95 | --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
96 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
96 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 | |
97 | @@ -1,1 +1,3 @@ |
|
97 | @@ -1,1 +1,3 @@ | |
@@ -99,7 +99,7 b' No changes, just a different message:' | |||||
99 | +a |
|
99 | +a | |
100 | +a |
|
100 | +a | |
101 | $ hg log |
|
101 | $ hg log | |
102 |
changeset: 1: |
|
102 | changeset: 1:1cd866679df8 | |
103 | tag: tip |
|
103 | tag: tip | |
104 | user: test |
|
104 | user: test | |
105 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
105 | date: Thu Jan 01 00:00:00 1970 +0000 | |
@@ -119,12 +119,12 b' Disable default date on commit so when -' | |||||
119 | Test -u/-d: |
|
119 | Test -u/-d: | |
120 |
|
120 | |||
121 | $ hg ci --amend -u foo -d '1 0' |
|
121 | $ hg ci --amend -u foo -d '1 0' | |
122 |
saved backup bundle to $TESTTMP/.hg/strip-backup/ |
|
122 | saved backup bundle to $TESTTMP/.hg/strip-backup/1cd866679df8-amend-backup.hg (glob) | |
123 | $ echo a >> a |
|
123 | $ echo a >> a | |
124 | $ hg ci --amend -u foo -d '1 0' |
|
124 | $ hg ci --amend -u foo -d '1 0' | |
125 |
saved backup bundle to $TESTTMP/.hg/strip-backup/ |
|
125 | saved backup bundle to $TESTTMP/.hg/strip-backup/780e6f23e03d-amend-backup.hg (glob) | |
126 | $ hg log -r . |
|
126 | $ hg log -r . | |
127 |
changeset: 1: |
|
127 | changeset: 1:5f357c7560ab | |
128 | tag: tip |
|
128 | tag: tip | |
129 | user: foo |
|
129 | user: foo | |
130 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
130 | date: Thu Jan 01 00:00:01 1970 +0000 | |
@@ -139,8 +139,8 b' Open editor with old commit message if a' | |||||
139 | > echo "another precious commit message" > "$1" |
|
139 | > echo "another precious commit message" > "$1" | |
140 | > __EOF__ |
|
140 | > __EOF__ | |
141 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend -v |
|
141 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend -v | |
142 |
amending changeset |
|
142 | amending changeset 5f357c7560ab | |
143 |
copying changeset |
|
143 | copying changeset 5f357c7560ab to ad120869acf0 | |
144 | no changes, new message |
|
144 | no changes, new message | |
145 |
|
145 | |||
146 |
|
146 | |||
@@ -151,24 +151,24 b' Open editor with old commit message if a' | |||||
151 | HG: branch 'default' |
|
151 | HG: branch 'default' | |
152 | HG: changed a |
|
152 | HG: changed a | |
153 | a |
|
153 | a | |
154 |
stripping amended changeset |
|
154 | stripping amended changeset 5f357c7560ab | |
155 | 1 changesets found |
|
155 | 1 changesets found | |
156 |
saved backup bundle to $TESTTMP/.hg/strip-backup/ |
|
156 | saved backup bundle to $TESTTMP/.hg/strip-backup/5f357c7560ab-amend-backup.hg (glob) | |
157 | 1 changesets found |
|
157 | 1 changesets found | |
158 | adding branch |
|
158 | adding branch | |
159 | adding changesets |
|
159 | adding changesets | |
160 | adding manifests |
|
160 | adding manifests | |
161 | adding file changes |
|
161 | adding file changes | |
162 | added 1 changesets with 1 changes to 1 files |
|
162 | added 1 changesets with 1 changes to 1 files | |
163 |
committed changeset 1: |
|
163 | committed changeset 1:7ab3bf440b54 | |
164 |
|
164 | |||
165 | Same, but with changes in working dir (different code path): |
|
165 | Same, but with changes in working dir (different code path): | |
166 |
|
166 | |||
167 | $ echo a >> a |
|
167 | $ echo a >> a | |
168 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend -v |
|
168 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend -v | |
169 |
amending changeset |
|
169 | amending changeset 7ab3bf440b54 | |
170 | a |
|
170 | a | |
171 |
copying changeset a |
|
171 | copying changeset a0ea9b1a4c8c to ad120869acf0 | |
172 | another precious commit message |
|
172 | another precious commit message | |
173 |
|
173 | |||
174 |
|
174 | |||
@@ -179,21 +179,21 b' Same, but with changes in working dir (d' | |||||
179 | HG: branch 'default' |
|
179 | HG: branch 'default' | |
180 | HG: changed a |
|
180 | HG: changed a | |
181 | a |
|
181 | a | |
182 |
stripping intermediate changeset a |
|
182 | stripping intermediate changeset a0ea9b1a4c8c | |
183 |
stripping amended changeset |
|
183 | stripping amended changeset 7ab3bf440b54 | |
184 | 2 changesets found |
|
184 | 2 changesets found | |
185 |
saved backup bundle to $TESTTMP/.hg/strip-backup/ |
|
185 | saved backup bundle to $TESTTMP/.hg/strip-backup/7ab3bf440b54-amend-backup.hg (glob) | |
186 | 1 changesets found |
|
186 | 1 changesets found | |
187 | adding branch |
|
187 | adding branch | |
188 | adding changesets |
|
188 | adding changesets | |
189 | adding manifests |
|
189 | adding manifests | |
190 | adding file changes |
|
190 | adding file changes | |
191 | added 1 changesets with 1 changes to 1 files |
|
191 | added 1 changesets with 1 changes to 1 files | |
192 |
committed changeset 1: |
|
192 | committed changeset 1:ea22a388757c | |
193 |
|
193 | |||
194 | $ rm editor.sh |
|
194 | $ rm editor.sh | |
195 | $ hg log -r . |
|
195 | $ hg log -r . | |
196 |
changeset: 1: |
|
196 | changeset: 1:ea22a388757c | |
197 | tag: tip |
|
197 | tag: tip | |
198 | user: foo |
|
198 | user: foo | |
199 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
199 | date: Thu Jan 01 00:00:01 1970 +0000 | |
@@ -205,16 +205,16 b' Moving bookmarks, preserve active bookma' | |||||
205 | $ hg book book1 |
|
205 | $ hg book book1 | |
206 | $ hg book book2 |
|
206 | $ hg book book2 | |
207 | $ hg ci --amend -m 'move bookmarks' |
|
207 | $ hg ci --amend -m 'move bookmarks' | |
208 |
saved backup bundle to $TESTTMP/.hg/strip-backup/ |
|
208 | saved backup bundle to $TESTTMP/.hg/strip-backup/ea22a388757c-amend-backup.hg (glob) | |
209 | $ hg book |
|
209 | $ hg book | |
210 |
book1 1: |
|
210 | book1 1:6cec5aa930e2 | |
211 |
* book2 1: |
|
211 | * book2 1:6cec5aa930e2 | |
212 | $ echo a >> a |
|
212 | $ echo a >> a | |
213 | $ hg ci --amend -m 'move bookmarks' |
|
213 | $ hg ci --amend -m 'move bookmarks' | |
214 |
saved backup bundle to $TESTTMP/.hg/strip-backup/ |
|
214 | saved backup bundle to $TESTTMP/.hg/strip-backup/6cec5aa930e2-amend-backup.hg (glob) | |
215 | $ hg book |
|
215 | $ hg book | |
216 |
book1 1: |
|
216 | book1 1:48bb6e53a15f | |
217 |
* book2 1: |
|
217 | * book2 1:48bb6e53a15f | |
218 |
|
218 | |||
219 | $ echo '[defaults]' >> $HGRCPATH |
|
219 | $ echo '[defaults]' >> $HGRCPATH | |
220 | $ echo "commit=-d '0 0'" >> $HGRCPATH |
|
220 | $ echo "commit=-d '0 0'" >> $HGRCPATH | |
@@ -230,9 +230,9 b' Moving branches:' | |||||
230 | marked working directory as branch default |
|
230 | marked working directory as branch default | |
231 | (branches are permanent and global, did you want a bookmark?) |
|
231 | (branches are permanent and global, did you want a bookmark?) | |
232 | $ hg ci --amend -m 'back to default' |
|
232 | $ hg ci --amend -m 'back to default' | |
233 |
saved backup bundle to $TESTTMP/.hg/strip-backup/ |
|
233 | saved backup bundle to $TESTTMP/.hg/strip-backup/8ac881fbf49d-amend-backup.hg (glob) | |
234 | $ hg branches |
|
234 | $ hg branches | |
235 |
default 2: |
|
235 | default 2:ce12b0b57d46 | |
236 |
|
236 | |||
237 | Close branch: |
|
237 | Close branch: | |
238 |
|
238 | |||
@@ -255,9 +255,9 b' Same thing, different code path:' | |||||
255 | reopening closed branch head 4 |
|
255 | reopening closed branch head 4 | |
256 | $ echo b >> b |
|
256 | $ echo b >> b | |
257 | $ hg ci --amend --close-branch |
|
257 | $ hg ci --amend --close-branch | |
258 |
saved backup bundle to $TESTTMP/.hg/strip-backup/ |
|
258 | saved backup bundle to $TESTTMP/.hg/strip-backup/027371728205-amend-backup.hg (glob) | |
259 | $ hg branches |
|
259 | $ hg branches | |
260 |
default 2: |
|
260 | default 2:ce12b0b57d46 | |
261 |
|
261 | |||
262 | Refuse to amend merges: |
|
262 | Refuse to amend merges: | |
263 |
|
263 | |||
@@ -279,7 +279,7 b' Follow copies/renames:' | |||||
279 | $ hg ci -m 'b -> c' |
|
279 | $ hg ci -m 'b -> c' | |
280 | $ hg mv c d |
|
280 | $ hg mv c d | |
281 | $ hg ci --amend -m 'b -> d' |
|
281 | $ hg ci --amend -m 'b -> d' | |
282 |
saved backup bundle to $TESTTMP/.hg/strip-backup/ |
|
282 | saved backup bundle to $TESTTMP/.hg/strip-backup/b8c6eac7f12e-amend-backup.hg (glob) | |
283 | $ hg st --rev '.^' --copies d |
|
283 | $ hg st --rev '.^' --copies d | |
284 | A d |
|
284 | A d | |
285 | b |
|
285 | b | |
@@ -287,7 +287,7 b' Follow copies/renames:' | |||||
287 | $ hg ci -m 'e = d' |
|
287 | $ hg ci -m 'e = d' | |
288 | $ hg cp e f |
|
288 | $ hg cp e f | |
289 | $ hg ci --amend -m 'f = d' |
|
289 | $ hg ci --amend -m 'f = d' | |
290 |
saved backup bundle to $TESTTMP/.hg/strip-backup/ |
|
290 | saved backup bundle to $TESTTMP/.hg/strip-backup/7f9761d65613-amend-backup.hg (glob) | |
291 | $ hg st --rev '.^' --copies f |
|
291 | $ hg st --rev '.^' --copies f | |
292 | A f |
|
292 | A f | |
293 | d |
|
293 | d | |
@@ -298,7 +298,7 b' Follow copies/renames:' | |||||
298 | $ hg cp a f |
|
298 | $ hg cp a f | |
299 | $ mv f.orig f |
|
299 | $ mv f.orig f | |
300 | $ hg ci --amend -m replacef |
|
300 | $ hg ci --amend -m replacef | |
301 |
saved backup bundle to $TESTTMP/.hg/strip-backup/ |
|
301 | saved backup bundle to $TESTTMP/.hg/strip-backup/9e8c5f7e3d95-amend-backup.hg (glob) | |
302 | $ hg st --change . --copies |
|
302 | $ hg st --change . --copies | |
303 | $ hg log -r . --template "{file_copies}\n" |
|
303 | $ hg log -r . --template "{file_copies}\n" | |
304 |
|
304 | |||
@@ -310,7 +310,7 b' Move added file (issue3410):' | |||||
310 | adding g |
|
310 | adding g | |
311 | $ hg mv g h |
|
311 | $ hg mv g h | |
312 | $ hg ci --amend |
|
312 | $ hg ci --amend | |
313 |
saved backup bundle to $TESTTMP/.hg/strip-backup/ |
|
313 | saved backup bundle to $TESTTMP/.hg/strip-backup/24aa8eacce2b-amend-backup.hg (glob) | |
314 | $ hg st --change . --copies h |
|
314 | $ hg st --change . --copies h | |
315 | A h |
|
315 | A h | |
316 | $ hg log -r . --template "{file_copies}\n" |
|
316 | $ hg log -r . --template "{file_copies}\n" | |
@@ -330,11 +330,11 b' Preserve extra dict (issue3430):' | |||||
330 | $ echo a >> a |
|
330 | $ echo a >> a | |
331 | $ hg ci -ma |
|
331 | $ hg ci -ma | |
332 | $ hg ci --amend -m "a'" |
|
332 | $ hg ci --amend -m "a'" | |
333 |
saved backup bundle to $TESTTMP/.hg/strip-backup/ |
|
333 | saved backup bundle to $TESTTMP/.hg/strip-backup/3837aa2a2fdb-amend-backup.hg (glob) | |
334 | $ hg log -r . --template "{branch}\n" |
|
334 | $ hg log -r . --template "{branch}\n" | |
335 | a |
|
335 | a | |
336 | $ hg ci --amend -m "a''" |
|
336 | $ hg ci --amend -m "a''" | |
337 |
saved backup bundle to $TESTTMP/.hg/strip-backup/c |
|
337 | saved backup bundle to $TESTTMP/.hg/strip-backup/c05c06be7514-amend-backup.hg (glob) | |
338 | $ hg log -r . --template "{branch}\n" |
|
338 | $ hg log -r . --template "{branch}\n" | |
339 | a |
|
339 | a | |
340 |
|
340 | |||
@@ -351,8 +351,9 b" first graft something so there's an addi" | |||||
351 | $ hg graft 12 |
|
351 | $ hg graft 12 | |
352 | grafting revision 12 |
|
352 | grafting revision 12 | |
353 | $ hg ci --amend -m 'graft amend' |
|
353 | $ hg ci --amend -m 'graft amend' | |
354 |
saved backup bundle to $TESTTMP/.hg/strip-backup/ |
|
354 | saved backup bundle to $TESTTMP/.hg/strip-backup/bd010aea3f39-amend-backup.hg (glob) | |
355 | $ hg log -r . --debug | grep extra |
|
355 | $ hg log -r . --debug | grep extra | |
|
356 | extra: amend_source=bd010aea3f39f3fb2a2f884b9ccb0471cd77398e | |||
356 | extra: branch=a |
|
357 | extra: branch=a | |
357 | extra: source=2647734878ef0236dda712fae9c1651cf694ea8a |
|
358 | extra: source=2647734878ef0236dda712fae9c1651cf694ea8a | |
358 |
|
359 | |||
@@ -391,26 +392,26 b' Amend with no files changes' | |||||
391 | $ hg id -n |
|
392 | $ hg id -n | |
392 | 14 |
|
393 | 14 | |
393 | $ hg log -Gl 3 --style=compact |
|
394 | $ hg log -Gl 3 --style=compact | |
394 |
@ 14[tip]:11 |
|
395 | @ 14[tip]:11 b650e6ee8614 1970-01-01 00:00 +0000 test | |
395 | | babar |
|
396 | | babar | |
396 | | |
|
397 | | | |
397 | | o 12:0 2647734878ef 1970-01-01 00:00 +0000 test |
|
398 | | o 12:0 2647734878ef 1970-01-01 00:00 +0000 test | |
398 | | | fork |
|
399 | | | fork | |
399 | | | |
|
400 | | | | |
400 |
o | 11 |
|
401 | o | 11 3334b7925910 1970-01-01 00:00 +0000 test | |
401 | | | a'' |
|
402 | | | a'' | |
402 | | | |
|
403 | | | | |
403 | $ hg log -Gl 4 --hidden --style=compact |
|
404 | $ hg log -Gl 4 --hidden --style=compact | |
404 |
@ 14[tip]:11 |
|
405 | @ 14[tip]:11 b650e6ee8614 1970-01-01 00:00 +0000 test | |
405 | | babar |
|
406 | | babar | |
406 | | |
|
407 | | | |
407 |
| x 13:11 |
|
408 | | x 13:11 68ff8ff97044 1970-01-01 00:00 +0000 test | |
408 | |/ amend for phase |
|
409 | |/ amend for phase | |
409 | | |
|
410 | | | |
410 | | o 12:0 2647734878ef 1970-01-01 00:00 +0000 test |
|
411 | | o 12:0 2647734878ef 1970-01-01 00:00 +0000 test | |
411 | | | fork |
|
412 | | | fork | |
412 | | | |
|
413 | | | | |
413 |
o | 11 |
|
414 | o | 11 3334b7925910 1970-01-01 00:00 +0000 test | |
414 | | | a'' |
|
415 | | | a'' | |
415 | | | |
|
416 | | | | |
416 |
|
417 | |||
@@ -422,23 +423,34 b' ride of)' | |||||
422 | $ echo 'babar' >> a |
|
423 | $ echo 'babar' >> a | |
423 | $ hg commit --amend |
|
424 | $ hg commit --amend | |
424 | $ hg log -Gl 6 --hidden --style=compact |
|
425 | $ hg log -Gl 6 --hidden --style=compact | |
425 |
@ 16[tip]:11 |
|
426 | @ 16[tip]:11 9f9e9bccf56c 1970-01-01 00:00 +0000 test | |
426 | | babar |
|
427 | | babar | |
427 | | |
|
428 | | | |
428 |
| x 15 |
|
429 | | x 15 90fef497c56f 1970-01-01 00:00 +0000 test | |
429 |
| | temporary amend commit for |
|
430 | | | temporary amend commit for b650e6ee8614 | |
430 | | | |
|
431 | | | | |
431 |
| x 14:11 |
|
432 | | x 14:11 b650e6ee8614 1970-01-01 00:00 +0000 test | |
432 | |/ babar |
|
433 | |/ babar | |
433 | | |
|
434 | | | |
434 |
| x 13:11 |
|
435 | | x 13:11 68ff8ff97044 1970-01-01 00:00 +0000 test | |
435 | |/ amend for phase |
|
436 | |/ amend for phase | |
436 | | |
|
437 | | | |
437 | | o 12:0 2647734878ef 1970-01-01 00:00 +0000 test |
|
438 | | o 12:0 2647734878ef 1970-01-01 00:00 +0000 test | |
438 | | | fork |
|
439 | | | fork | |
439 | | | |
|
440 | | | | |
440 |
o | 11 |
|
441 | o | 11 3334b7925910 1970-01-01 00:00 +0000 test | |
441 | | | a'' |
|
442 | | | a'' | |
442 | | | |
|
443 | | | | |
443 |
|
444 | |||
444 |
|
445 | |||
|
446 | Test that amend does not make it easy to create obsoletescence cycle | |||
|
447 | --------------------------------------------------------------------- | |||
|
448 | ||||
|
449 | ||||
|
450 | $ hg id -r 14 | |||
|
451 | b650e6ee8614 (a) | |||
|
452 | $ hg revert -ar 14 | |||
|
453 | reverting a | |||
|
454 | $ hg commit --amend | |||
|
455 | $ hg id | |||
|
456 | b99e5df575f7 (a) tip |
@@ -509,9 +509,9 b' amend' | |||||
509 | $ hg --debug commit --amend -d '15 1' -m 'amend without changes' | grep keywords |
|
509 | $ hg --debug commit --amend -d '15 1' -m 'amend without changes' | grep keywords | |
510 | overwriting a expanding keywords |
|
510 | overwriting a expanding keywords | |
511 | $ hg -q id |
|
511 | $ hg -q id | |
512 | 577e60613a88 |
|
512 | 67d8c481a6be | |
513 | $ head -1 a |
|
513 | $ head -1 a | |
514 |
expand $Id: a,v |
|
514 | expand $Id: a,v 67d8c481a6be 1970/01/01 00:00:15 test $ | |
515 |
|
515 | |||
516 | $ hg -q strip -n tip |
|
516 | $ hg -q strip -n tip | |
517 |
|
517 |
General Comments 0
You need to be logged in to leave comments.
Login now