author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
Wed, 24 Oct 2012 15:37:32 +0200 | |
branch | stable |
changeset 17863 | 034e55bbf7c0 |
parent 17811 | a8aba2921456 |
child 17924 | 45bd0cd7ca04 |
permissions | -rw-r--r-- |
16458
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
1 |
$ hg init |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
2 |
|
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
3 |
Setup: |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
4 |
|
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
5 |
$ echo a >> a |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
6 |
$ hg ci -Am 'base' |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
7 |
adding a |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
8 |
|
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
9 |
Refuse to amend public csets: |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
10 |
|
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
11 |
$ hg phase -r . -p |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
12 |
$ hg ci --amend |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
13 |
abort: cannot amend public changesets |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
14 |
[255] |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
15 |
$ hg phase -r . -f -d |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
16 |
|
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
17 |
$ echo a >> a |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
18 |
$ hg ci -Am 'base1' |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
19 |
|
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
20 |
Nothing to amend: |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
21 |
|
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
22 |
$ hg ci --amend |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
23 |
nothing changed |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
24 |
[1] |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
25 |
|
17060
69fa0459dd3b
test-commit-amend: adapt for Windows after fba17a64fa49
Adrian Buehlmann <adrian@cadifra.com>
parents:
17059
diff
changeset
|
26 |
$ cat >> $HGRCPATH <<EOF |
69fa0459dd3b
test-commit-amend: adapt for Windows after fba17a64fa49
Adrian Buehlmann <adrian@cadifra.com>
parents:
17059
diff
changeset
|
27 |
> [hooks] |
17462
8085fed2bf0a
tests: correct quoting of double quotes in here documents used to write hooks
Jim Hague <jim.hague@acm.org>
parents:
17461
diff
changeset
|
28 |
> pretxncommit.foo = sh -c "echo \\"pretxncommit \$HG_NODE\\"; hg id -r \$HG_NODE" |
17060
69fa0459dd3b
test-commit-amend: adapt for Windows after fba17a64fa49
Adrian Buehlmann <adrian@cadifra.com>
parents:
17059
diff
changeset
|
29 |
> EOF |
17049
2440822446ce
amend: disable hooks when creating intermediate commit (issue3501)
Idan Kamara <idankk86@gmail.com>
parents:
16630
diff
changeset
|
30 |
|
16458
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
31 |
Amending changeset with changes in working dir: |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
32 |
|
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
33 |
$ echo a >> a |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
34 |
$ hg ci --amend -m 'amend base1' |
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
35 |
pretxncommit 43f1ba15f28a50abf0aae529cf8a16bfced7b149 |
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
36 |
43f1ba15f28a tip |
17060
69fa0459dd3b
test-commit-amend: adapt for Windows after fba17a64fa49
Adrian Buehlmann <adrian@cadifra.com>
parents:
17059
diff
changeset
|
37 |
saved backup bundle to $TESTTMP/.hg/strip-backup/489edb5b847d-amend-backup.hg (glob) |
17049
2440822446ce
amend: disable hooks when creating intermediate commit (issue3501)
Idan Kamara <idankk86@gmail.com>
parents:
16630
diff
changeset
|
38 |
$ echo 'pretxncommit.foo = ' >> $HGRCPATH |
16458
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
39 |
$ hg diff -c . |
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
40 |
diff -r ad120869acf0 -r 43f1ba15f28a a |
16458
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
41 |
--- a/a Thu Jan 01 00:00:00 1970 +0000 |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
42 |
+++ b/a Thu Jan 01 00:00:00 1970 +0000 |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
43 |
@@ -1,1 +1,3 @@ |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
44 |
a |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
45 |
+a |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
46 |
+a |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
47 |
$ hg log |
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
48 |
changeset: 1:43f1ba15f28a |
16458
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
49 |
tag: tip |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
50 |
user: test |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
51 |
date: Thu Jan 01 00:00:00 1970 +0000 |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
52 |
summary: amend base1 |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
53 |
|
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
54 |
changeset: 0:ad120869acf0 |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
55 |
user: test |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
56 |
date: Thu Jan 01 00:00:00 1970 +0000 |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
57 |
summary: base |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
58 |
|
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
59 |
|
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
60 |
Add new file: |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
61 |
|
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
62 |
$ echo b > b |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
63 |
$ hg ci --amend -Am 'amend base1 new file' |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
64 |
adding b |
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
65 |
saved backup bundle to $TESTTMP/.hg/strip-backup/43f1ba15f28a-amend-backup.hg (glob) |
16458
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
66 |
|
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
67 |
Remove file that was added in amended commit: |
17863
034e55bbf7c0
amend: fix incompatibity between logfile and message option (issue3675)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17811
diff
changeset
|
68 |
(and test logfile option) |
16458
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
69 |
|
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
70 |
$ hg rm b |
17863
034e55bbf7c0
amend: fix incompatibity between logfile and message option (issue3675)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17811
diff
changeset
|
71 |
$ echo 'amend base1 remove new file' > ../logfile |
034e55bbf7c0
amend: fix incompatibity between logfile and message option (issue3675)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17811
diff
changeset
|
72 |
$ hg ci --amend -l ../logfile |
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
73 |
saved backup bundle to $TESTTMP/.hg/strip-backup/b8e3cb2b3882-amend-backup.hg (glob) |
16458
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
74 |
|
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
75 |
$ hg cat b |
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
76 |
b: no such file in rev 74609c7f506e |
16458
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
77 |
[1] |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
78 |
|
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
79 |
No changes, just a different message: |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
80 |
|
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
81 |
$ hg ci -v --amend -m 'no changes, new message' |
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
82 |
amending changeset 74609c7f506e |
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
83 |
copying changeset 74609c7f506e to ad120869acf0 |
16458
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
84 |
a |
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
85 |
stripping amended changeset 74609c7f506e |
16458
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
86 |
1 changesets found |
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
87 |
saved backup bundle to $TESTTMP/.hg/strip-backup/74609c7f506e-amend-backup.hg (glob) |
16458
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
88 |
1 changesets found |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
89 |
adding branch |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
90 |
adding changesets |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
91 |
adding manifests |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
92 |
adding file changes |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
93 |
added 1 changesets with 1 changes to 1 files |
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
94 |
committed changeset 1:1cd866679df8 |
16458
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
95 |
$ hg diff -c . |
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
96 |
diff -r ad120869acf0 -r 1cd866679df8 a |
16458
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
97 |
--- a/a Thu Jan 01 00:00:00 1970 +0000 |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
98 |
+++ b/a Thu Jan 01 00:00:00 1970 +0000 |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
99 |
@@ -1,1 +1,3 @@ |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
100 |
a |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
101 |
+a |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
102 |
+a |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
103 |
$ hg log |
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
104 |
changeset: 1:1cd866679df8 |
16458
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
105 |
tag: tip |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
106 |
user: test |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
107 |
date: Thu Jan 01 00:00:00 1970 +0000 |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
108 |
summary: no changes, new message |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
109 |
|
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
110 |
changeset: 0:ad120869acf0 |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
111 |
user: test |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
112 |
date: Thu Jan 01 00:00:00 1970 +0000 |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
113 |
summary: base |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
114 |
|
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
115 |
|
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
116 |
Disable default date on commit so when -d isn't given, the old date is preserved: |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
117 |
|
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
118 |
$ echo '[defaults]' >> $HGRCPATH |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
119 |
$ echo 'commit=' >> $HGRCPATH |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
120 |
|
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
121 |
Test -u/-d: |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
122 |
|
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
123 |
$ hg ci --amend -u foo -d '1 0' |
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
124 |
saved backup bundle to $TESTTMP/.hg/strip-backup/1cd866679df8-amend-backup.hg (glob) |
16458
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
125 |
$ echo a >> a |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
126 |
$ hg ci --amend -u foo -d '1 0' |
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
127 |
saved backup bundle to $TESTTMP/.hg/strip-backup/780e6f23e03d-amend-backup.hg (glob) |
16458
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
128 |
$ hg log -r . |
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
129 |
changeset: 1:5f357c7560ab |
16458
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
130 |
tag: tip |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
131 |
user: foo |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
132 |
date: Thu Jan 01 00:00:01 1970 +0000 |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
133 |
summary: no changes, new message |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
134 |
|
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
135 |
|
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
136 |
Open editor with old commit message if a message isn't given otherwise: |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
137 |
|
16901
5b89700cce30
tests: consistently use a HGEDITOR pattern that works with msys on windows
Mads Kiilerich <mads@kiilerich.com>
parents:
16900
diff
changeset
|
138 |
$ cat > editor.sh << '__EOF__' |
16458
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
139 |
> #!/bin/sh |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
140 |
> cat $1 |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
141 |
> echo "another precious commit message" > "$1" |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
142 |
> __EOF__ |
16901
5b89700cce30
tests: consistently use a HGEDITOR pattern that works with msys on windows
Mads Kiilerich <mads@kiilerich.com>
parents:
16900
diff
changeset
|
143 |
$ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend -v |
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
144 |
amending changeset 5f357c7560ab |
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
145 |
copying changeset 5f357c7560ab to ad120869acf0 |
16458
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
146 |
no changes, new message |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
147 |
|
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
148 |
|
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
149 |
HG: Enter commit message. Lines beginning with 'HG:' are removed. |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
150 |
HG: Leave message empty to abort commit. |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
151 |
HG: -- |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
152 |
HG: user: foo |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
153 |
HG: branch 'default' |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
154 |
HG: changed a |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
155 |
a |
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
156 |
stripping amended changeset 5f357c7560ab |
16458
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
157 |
1 changesets found |
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
158 |
saved backup bundle to $TESTTMP/.hg/strip-backup/5f357c7560ab-amend-backup.hg (glob) |
16458
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
159 |
1 changesets found |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
160 |
adding branch |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
161 |
adding changesets |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
162 |
adding manifests |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
163 |
adding file changes |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
164 |
added 1 changesets with 1 changes to 1 files |
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
165 |
committed changeset 1:7ab3bf440b54 |
16458
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
166 |
|
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
167 |
Same, but with changes in working dir (different code path): |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
168 |
|
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
169 |
$ echo a >> a |
16901
5b89700cce30
tests: consistently use a HGEDITOR pattern that works with msys on windows
Mads Kiilerich <mads@kiilerich.com>
parents:
16900
diff
changeset
|
170 |
$ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend -v |
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
171 |
amending changeset 7ab3bf440b54 |
17473
9732473aa24b
amend: use an explicit commit message for temporary amending commit
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17462
diff
changeset
|
172 |
a |
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
173 |
copying changeset a0ea9b1a4c8c to ad120869acf0 |
16458
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
174 |
another precious commit message |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
175 |
|
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
176 |
|
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
177 |
HG: Enter commit message. Lines beginning with 'HG:' are removed. |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
178 |
HG: Leave message empty to abort commit. |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
179 |
HG: -- |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
180 |
HG: user: foo |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
181 |
HG: branch 'default' |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
182 |
HG: changed a |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
183 |
a |
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
184 |
stripping intermediate changeset a0ea9b1a4c8c |
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
185 |
stripping amended changeset 7ab3bf440b54 |
16458
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
186 |
2 changesets found |
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
187 |
saved backup bundle to $TESTTMP/.hg/strip-backup/7ab3bf440b54-amend-backup.hg (glob) |
16458
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
188 |
1 changesets found |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
189 |
adding branch |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
190 |
adding changesets |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
191 |
adding manifests |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
192 |
adding file changes |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
193 |
added 1 changesets with 1 changes to 1 files |
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
194 |
committed changeset 1:ea22a388757c |
16458
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
195 |
|
16901
5b89700cce30
tests: consistently use a HGEDITOR pattern that works with msys on windows
Mads Kiilerich <mads@kiilerich.com>
parents:
16900
diff
changeset
|
196 |
$ rm editor.sh |
16458
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
197 |
$ hg log -r . |
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
198 |
changeset: 1:ea22a388757c |
16458
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
199 |
tag: tip |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
200 |
user: foo |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
201 |
date: Thu Jan 01 00:00:01 1970 +0000 |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
202 |
summary: another precious commit message |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
203 |
|
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
204 |
|
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
205 |
Moving bookmarks, preserve active bookmark: |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
206 |
|
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
207 |
$ hg book book1 |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
208 |
$ hg book book2 |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
209 |
$ hg ci --amend -m 'move bookmarks' |
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
210 |
saved backup bundle to $TESTTMP/.hg/strip-backup/ea22a388757c-amend-backup.hg (glob) |
16458
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
211 |
$ hg book |
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
212 |
book1 1:6cec5aa930e2 |
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
213 |
* book2 1:6cec5aa930e2 |
16458
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
214 |
$ echo a >> a |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
215 |
$ hg ci --amend -m 'move bookmarks' |
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
216 |
saved backup bundle to $TESTTMP/.hg/strip-backup/6cec5aa930e2-amend-backup.hg (glob) |
16458
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
217 |
$ hg book |
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
218 |
book1 1:48bb6e53a15f |
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
219 |
* book2 1:48bb6e53a15f |
16458
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
220 |
|
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
221 |
$ echo '[defaults]' >> $HGRCPATH |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
222 |
$ echo "commit=-d '0 0'" >> $HGRCPATH |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
223 |
|
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
224 |
Moving branches: |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
225 |
|
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
226 |
$ hg branch foo |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
227 |
marked working directory as branch foo |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
228 |
(branches are permanent and global, did you want a bookmark?) |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
229 |
$ echo a >> a |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
230 |
$ hg ci -m 'branch foo' |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
231 |
$ hg branch default -f |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
232 |
marked working directory as branch default |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
233 |
(branches are permanent and global, did you want a bookmark?) |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
234 |
$ hg ci --amend -m 'back to default' |
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
235 |
saved backup bundle to $TESTTMP/.hg/strip-backup/8ac881fbf49d-amend-backup.hg (glob) |
16458
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
236 |
$ hg branches |
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
237 |
default 2:ce12b0b57d46 |
16458
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
238 |
|
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
239 |
Close branch: |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
240 |
|
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
241 |
$ hg up -q 0 |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
242 |
$ echo b >> b |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
243 |
$ hg branch foo |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
244 |
marked working directory as branch foo |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
245 |
(branches are permanent and global, did you want a bookmark?) |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
246 |
$ hg ci -Am 'fork' |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
247 |
adding b |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
248 |
$ echo b >> b |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
249 |
$ hg ci -mb |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
250 |
$ hg ci --amend --close-branch -m 'closing branch foo' |
16900
3f1a153daadb
tests: glob the remaining 'saved backup bundle to' to prepare for windows
Mads Kiilerich <mads@kiilerich.com>
parents:
16745
diff
changeset
|
251 |
saved backup bundle to $TESTTMP/.hg/strip-backup/c962248fa264-amend-backup.hg (glob) |
16458
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
252 |
|
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
253 |
Same thing, different code path: |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
254 |
|
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
255 |
$ echo b >> b |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
256 |
$ hg ci -m 'reopen branch' |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
257 |
reopening closed branch head 4 |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
258 |
$ echo b >> b |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
259 |
$ hg ci --amend --close-branch |
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
260 |
saved backup bundle to $TESTTMP/.hg/strip-backup/027371728205-amend-backup.hg (glob) |
16458
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
261 |
$ hg branches |
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
262 |
default 2:ce12b0b57d46 |
16458
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
263 |
|
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
264 |
Refuse to amend merges: |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
265 |
|
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
266 |
$ hg up -q default |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
267 |
$ hg merge foo |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
268 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
269 |
(branch merge, don't forget to commit) |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
270 |
$ hg ci --amend |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
271 |
abort: cannot amend while merging |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
272 |
[255] |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
273 |
$ hg ci -m 'merge' |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
274 |
$ hg ci --amend |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
275 |
abort: cannot amend merge changesets |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
276 |
[255] |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
277 |
|
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
278 |
Follow copies/renames: |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
279 |
|
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
280 |
$ hg mv b c |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
281 |
$ hg ci -m 'b -> c' |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
282 |
$ hg mv c d |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
283 |
$ hg ci --amend -m 'b -> d' |
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
284 |
saved backup bundle to $TESTTMP/.hg/strip-backup/b8c6eac7f12e-amend-backup.hg (glob) |
16483
3c4910364797
tests: ^ must be quoted when used on solaris sh
Mads Kiilerich <mads@kiilerich.com>
parents:
16458
diff
changeset
|
285 |
$ hg st --rev '.^' --copies d |
16458
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
286 |
A d |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
287 |
b |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
288 |
$ hg cp d e |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
289 |
$ hg ci -m 'e = d' |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
290 |
$ hg cp e f |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
291 |
$ hg ci --amend -m 'f = d' |
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
292 |
saved backup bundle to $TESTTMP/.hg/strip-backup/7f9761d65613-amend-backup.hg (glob) |
16483
3c4910364797
tests: ^ must be quoted when used on solaris sh
Mads Kiilerich <mads@kiilerich.com>
parents:
16458
diff
changeset
|
293 |
$ hg st --rev '.^' --copies f |
16458
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
294 |
A f |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
295 |
d |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
296 |
|
16552
90ca344a7c55
test-commit-amend: exhibit an --amend weirdness
Patrick Mezard <patrick@mezard.eu>
parents:
16539
diff
changeset
|
297 |
$ mv f f.orig |
90ca344a7c55
test-commit-amend: exhibit an --amend weirdness
Patrick Mezard <patrick@mezard.eu>
parents:
16539
diff
changeset
|
298 |
$ hg rm -A f |
90ca344a7c55
test-commit-amend: exhibit an --amend weirdness
Patrick Mezard <patrick@mezard.eu>
parents:
16539
diff
changeset
|
299 |
$ hg ci -m removef |
90ca344a7c55
test-commit-amend: exhibit an --amend weirdness
Patrick Mezard <patrick@mezard.eu>
parents:
16539
diff
changeset
|
300 |
$ hg cp a f |
90ca344a7c55
test-commit-amend: exhibit an --amend weirdness
Patrick Mezard <patrick@mezard.eu>
parents:
16539
diff
changeset
|
301 |
$ mv f.orig f |
90ca344a7c55
test-commit-amend: exhibit an --amend weirdness
Patrick Mezard <patrick@mezard.eu>
parents:
16539
diff
changeset
|
302 |
$ hg ci --amend -m replacef |
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
303 |
saved backup bundle to $TESTTMP/.hg/strip-backup/9e8c5f7e3d95-amend-backup.hg (glob) |
16552
90ca344a7c55
test-commit-amend: exhibit an --amend weirdness
Patrick Mezard <patrick@mezard.eu>
parents:
16539
diff
changeset
|
304 |
$ hg st --change . --copies |
90ca344a7c55
test-commit-amend: exhibit an --amend weirdness
Patrick Mezard <patrick@mezard.eu>
parents:
16539
diff
changeset
|
305 |
$ hg log -r . --template "{file_copies}\n" |
16553
9224cc2e99cc
amend: fix copy records handling (issue3410)
Patrick Mezard <patrick@mezard.eu>
parents:
16552
diff
changeset
|
306 |
|
9224cc2e99cc
amend: fix copy records handling (issue3410)
Patrick Mezard <patrick@mezard.eu>
parents:
16552
diff
changeset
|
307 |
|
9224cc2e99cc
amend: fix copy records handling (issue3410)
Patrick Mezard <patrick@mezard.eu>
parents:
16552
diff
changeset
|
308 |
Move added file (issue3410): |
9224cc2e99cc
amend: fix copy records handling (issue3410)
Patrick Mezard <patrick@mezard.eu>
parents:
16552
diff
changeset
|
309 |
|
9224cc2e99cc
amend: fix copy records handling (issue3410)
Patrick Mezard <patrick@mezard.eu>
parents:
16552
diff
changeset
|
310 |
$ echo g >> g |
9224cc2e99cc
amend: fix copy records handling (issue3410)
Patrick Mezard <patrick@mezard.eu>
parents:
16552
diff
changeset
|
311 |
$ hg ci -Am g |
9224cc2e99cc
amend: fix copy records handling (issue3410)
Patrick Mezard <patrick@mezard.eu>
parents:
16552
diff
changeset
|
312 |
adding g |
9224cc2e99cc
amend: fix copy records handling (issue3410)
Patrick Mezard <patrick@mezard.eu>
parents:
16552
diff
changeset
|
313 |
$ hg mv g h |
9224cc2e99cc
amend: fix copy records handling (issue3410)
Patrick Mezard <patrick@mezard.eu>
parents:
16552
diff
changeset
|
314 |
$ hg ci --amend |
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
315 |
saved backup bundle to $TESTTMP/.hg/strip-backup/24aa8eacce2b-amend-backup.hg (glob) |
16553
9224cc2e99cc
amend: fix copy records handling (issue3410)
Patrick Mezard <patrick@mezard.eu>
parents:
16552
diff
changeset
|
316 |
$ hg st --change . --copies h |
9224cc2e99cc
amend: fix copy records handling (issue3410)
Patrick Mezard <patrick@mezard.eu>
parents:
16552
diff
changeset
|
317 |
A h |
9224cc2e99cc
amend: fix copy records handling (issue3410)
Patrick Mezard <patrick@mezard.eu>
parents:
16552
diff
changeset
|
318 |
$ hg log -r . --template "{file_copies}\n" |
9224cc2e99cc
amend: fix copy records handling (issue3410)
Patrick Mezard <patrick@mezard.eu>
parents:
16552
diff
changeset
|
319 |
|
16552
90ca344a7c55
test-commit-amend: exhibit an --amend weirdness
Patrick Mezard <patrick@mezard.eu>
parents:
16539
diff
changeset
|
320 |
|
16458
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
321 |
Can't rollback an amend: |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
322 |
|
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
323 |
$ hg rollback |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
324 |
no rollback information available |
55982f62651f
commit: add option to amend the working dir parent
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
325 |
[1] |
16630
f30226b1a46a
amend: preserve extra dict (issue3430)
Idan Kamara <idankk86@gmail.com>
parents:
16553
diff
changeset
|
326 |
|
f30226b1a46a
amend: preserve extra dict (issue3430)
Idan Kamara <idankk86@gmail.com>
parents:
16553
diff
changeset
|
327 |
Preserve extra dict (issue3430): |
f30226b1a46a
amend: preserve extra dict (issue3430)
Idan Kamara <idankk86@gmail.com>
parents:
16553
diff
changeset
|
328 |
|
f30226b1a46a
amend: preserve extra dict (issue3430)
Idan Kamara <idankk86@gmail.com>
parents:
16553
diff
changeset
|
329 |
$ hg branch a |
f30226b1a46a
amend: preserve extra dict (issue3430)
Idan Kamara <idankk86@gmail.com>
parents:
16553
diff
changeset
|
330 |
marked working directory as branch a |
f30226b1a46a
amend: preserve extra dict (issue3430)
Idan Kamara <idankk86@gmail.com>
parents:
16553
diff
changeset
|
331 |
(branches are permanent and global, did you want a bookmark?) |
f30226b1a46a
amend: preserve extra dict (issue3430)
Idan Kamara <idankk86@gmail.com>
parents:
16553
diff
changeset
|
332 |
$ echo a >> a |
f30226b1a46a
amend: preserve extra dict (issue3430)
Idan Kamara <idankk86@gmail.com>
parents:
16553
diff
changeset
|
333 |
$ hg ci -ma |
f30226b1a46a
amend: preserve extra dict (issue3430)
Idan Kamara <idankk86@gmail.com>
parents:
16553
diff
changeset
|
334 |
$ hg ci --amend -m "a'" |
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
335 |
saved backup bundle to $TESTTMP/.hg/strip-backup/3837aa2a2fdb-amend-backup.hg (glob) |
16630
f30226b1a46a
amend: preserve extra dict (issue3430)
Idan Kamara <idankk86@gmail.com>
parents:
16553
diff
changeset
|
336 |
$ hg log -r . --template "{branch}\n" |
f30226b1a46a
amend: preserve extra dict (issue3430)
Idan Kamara <idankk86@gmail.com>
parents:
16553
diff
changeset
|
337 |
a |
f30226b1a46a
amend: preserve extra dict (issue3430)
Idan Kamara <idankk86@gmail.com>
parents:
16553
diff
changeset
|
338 |
$ hg ci --amend -m "a''" |
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
339 |
saved backup bundle to $TESTTMP/.hg/strip-backup/c05c06be7514-amend-backup.hg (glob) |
16630
f30226b1a46a
amend: preserve extra dict (issue3430)
Idan Kamara <idankk86@gmail.com>
parents:
16553
diff
changeset
|
340 |
$ hg log -r . --template "{branch}\n" |
f30226b1a46a
amend: preserve extra dict (issue3430)
Idan Kamara <idankk86@gmail.com>
parents:
16553
diff
changeset
|
341 |
a |
f30226b1a46a
amend: preserve extra dict (issue3430)
Idan Kamara <idankk86@gmail.com>
parents:
16553
diff
changeset
|
342 |
|
f30226b1a46a
amend: preserve extra dict (issue3430)
Idan Kamara <idankk86@gmail.com>
parents:
16553
diff
changeset
|
343 |
Also preserve other entries in the dict that are in the old commit, |
f30226b1a46a
amend: preserve extra dict (issue3430)
Idan Kamara <idankk86@gmail.com>
parents:
16553
diff
changeset
|
344 |
first graft something so there's an additional entry: |
f30226b1a46a
amend: preserve extra dict (issue3430)
Idan Kamara <idankk86@gmail.com>
parents:
16553
diff
changeset
|
345 |
|
f30226b1a46a
amend: preserve extra dict (issue3430)
Idan Kamara <idankk86@gmail.com>
parents:
16553
diff
changeset
|
346 |
$ hg up 0 -q |
f30226b1a46a
amend: preserve extra dict (issue3430)
Idan Kamara <idankk86@gmail.com>
parents:
16553
diff
changeset
|
347 |
$ echo z > z |
f30226b1a46a
amend: preserve extra dict (issue3430)
Idan Kamara <idankk86@gmail.com>
parents:
16553
diff
changeset
|
348 |
$ hg ci -Am 'fork' |
f30226b1a46a
amend: preserve extra dict (issue3430)
Idan Kamara <idankk86@gmail.com>
parents:
16553
diff
changeset
|
349 |
adding z |
f30226b1a46a
amend: preserve extra dict (issue3430)
Idan Kamara <idankk86@gmail.com>
parents:
16553
diff
changeset
|
350 |
created new head |
f30226b1a46a
amend: preserve extra dict (issue3430)
Idan Kamara <idankk86@gmail.com>
parents:
16553
diff
changeset
|
351 |
$ hg up 11 |
f30226b1a46a
amend: preserve extra dict (issue3430)
Idan Kamara <idankk86@gmail.com>
parents:
16553
diff
changeset
|
352 |
5 files updated, 0 files merged, 1 files removed, 0 files unresolved |
f30226b1a46a
amend: preserve extra dict (issue3430)
Idan Kamara <idankk86@gmail.com>
parents:
16553
diff
changeset
|
353 |
$ hg graft 12 |
f30226b1a46a
amend: preserve extra dict (issue3430)
Idan Kamara <idankk86@gmail.com>
parents:
16553
diff
changeset
|
354 |
grafting revision 12 |
f30226b1a46a
amend: preserve extra dict (issue3430)
Idan Kamara <idankk86@gmail.com>
parents:
16553
diff
changeset
|
355 |
$ hg ci --amend -m 'graft amend' |
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
356 |
saved backup bundle to $TESTTMP/.hg/strip-backup/bd010aea3f39-amend-backup.hg (glob) |
16630
f30226b1a46a
amend: preserve extra dict (issue3430)
Idan Kamara <idankk86@gmail.com>
parents:
16553
diff
changeset
|
357 |
$ hg log -r . --debug | grep extra |
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
358 |
extra: amend_source=bd010aea3f39f3fb2a2f884b9ccb0471cd77398e |
16630
f30226b1a46a
amend: preserve extra dict (issue3430)
Idan Kamara <idankk86@gmail.com>
parents:
16553
diff
changeset
|
359 |
extra: branch=a |
f30226b1a46a
amend: preserve extra dict (issue3430)
Idan Kamara <idankk86@gmail.com>
parents:
16553
diff
changeset
|
360 |
extra: source=2647734878ef0236dda712fae9c1651cf694ea8a |
17461
bacde764fba0
amend: preserve phase of amended revision (issue3602)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17060
diff
changeset
|
361 |
|
bacde764fba0
amend: preserve phase of amended revision (issue3602)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17060
diff
changeset
|
362 |
Preserve phase |
bacde764fba0
amend: preserve phase of amended revision (issue3602)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17060
diff
changeset
|
363 |
|
bacde764fba0
amend: preserve phase of amended revision (issue3602)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17060
diff
changeset
|
364 |
$ hg phase '.^::.' |
bacde764fba0
amend: preserve phase of amended revision (issue3602)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17060
diff
changeset
|
365 |
11: draft |
bacde764fba0
amend: preserve phase of amended revision (issue3602)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17060
diff
changeset
|
366 |
13: draft |
bacde764fba0
amend: preserve phase of amended revision (issue3602)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17060
diff
changeset
|
367 |
$ hg phase --secret --force . |
bacde764fba0
amend: preserve phase of amended revision (issue3602)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17060
diff
changeset
|
368 |
$ hg phase '.^::.' |
bacde764fba0
amend: preserve phase of amended revision (issue3602)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17060
diff
changeset
|
369 |
11: draft |
bacde764fba0
amend: preserve phase of amended revision (issue3602)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17060
diff
changeset
|
370 |
13: secret |
bacde764fba0
amend: preserve phase of amended revision (issue3602)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17060
diff
changeset
|
371 |
$ hg commit --amend -m 'amend for phase' -q |
bacde764fba0
amend: preserve phase of amended revision (issue3602)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17060
diff
changeset
|
372 |
$ hg phase '.^::.' |
bacde764fba0
amend: preserve phase of amended revision (issue3602)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17060
diff
changeset
|
373 |
11: draft |
bacde764fba0
amend: preserve phase of amended revision (issue3602)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17060
diff
changeset
|
374 |
13: secret |
bacde764fba0
amend: preserve phase of amended revision (issue3602)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17060
diff
changeset
|
375 |
|
17475
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
376 |
Test amend with obsolete |
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
377 |
--------------------------- |
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
378 |
|
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
379 |
Enable obsolete |
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
380 |
|
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
381 |
$ cat > ${TESTTMP}/obs.py << EOF |
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
382 |
> import mercurial.obsolete |
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
383 |
> mercurial.obsolete._enabled = True |
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
384 |
> EOF |
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
385 |
$ echo '[extensions]' >> $HGRCPATH |
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
386 |
$ echo "obs=${TESTTMP}/obs.py" >> $HGRCPATH |
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
387 |
|
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
388 |
|
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
389 |
Amend with no files changes |
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
390 |
|
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
391 |
$ hg id -n |
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
392 |
13 |
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
393 |
$ hg ci --amend -m 'babar' |
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
394 |
$ hg id -n |
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
395 |
14 |
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
396 |
$ hg log -Gl 3 --style=compact |
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
397 |
@ 14[tip]:11 b650e6ee8614 1970-01-01 00:00 +0000 test |
17475
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
398 |
| babar |
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
399 |
| |
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
400 |
| o 12:0 2647734878ef 1970-01-01 00:00 +0000 test |
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
401 |
| | fork |
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
402 |
| | |
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
403 |
o | 11 3334b7925910 1970-01-01 00:00 +0000 test |
17475
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
404 |
| | a'' |
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
405 |
| | |
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
406 |
$ hg log -Gl 4 --hidden --style=compact |
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
407 |
@ 14[tip]:11 b650e6ee8614 1970-01-01 00:00 +0000 test |
17475
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
408 |
| babar |
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
409 |
| |
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
410 |
| x 13:11 68ff8ff97044 1970-01-01 00:00 +0000 test |
17475
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
411 |
|/ amend for phase |
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
412 |
| |
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
413 |
| o 12:0 2647734878ef 1970-01-01 00:00 +0000 test |
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
414 |
| | fork |
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
415 |
| | |
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
416 |
o | 11 3334b7925910 1970-01-01 00:00 +0000 test |
17475
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
417 |
| | a'' |
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
418 |
| | |
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
419 |
|
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
420 |
Amend with files changes |
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
421 |
|
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
422 |
(note: the extra commit over 15 is a temporary junk I would be happy to get |
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
423 |
ride of) |
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
424 |
|
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
425 |
$ echo 'babar' >> a |
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
426 |
$ hg commit --amend |
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
427 |
$ hg log -Gl 6 --hidden --style=compact |
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
428 |
@ 16[tip]:11 9f9e9bccf56c 1970-01-01 00:00 +0000 test |
17475
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
429 |
| babar |
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
430 |
| |
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
431 |
| x 15 90fef497c56f 1970-01-01 00:00 +0000 test |
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
432 |
| | temporary amend commit for b650e6ee8614 |
17475
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
433 |
| | |
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
434 |
| x 14:11 b650e6ee8614 1970-01-01 00:00 +0000 test |
17475
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
435 |
|/ babar |
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
436 |
| |
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
437 |
| x 13:11 68ff8ff97044 1970-01-01 00:00 +0000 test |
17475
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
438 |
|/ amend for phase |
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
439 |
| |
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
440 |
| o 12:0 2647734878ef 1970-01-01 00:00 +0000 test |
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
441 |
| | fork |
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
442 |
| | |
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
443 |
o | 11 3334b7925910 1970-01-01 00:00 +0000 test |
17475
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
444 |
| | a'' |
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
445 |
| | |
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
446 |
|
63e45aee46d4
amend: add obsolete support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17473
diff
changeset
|
447 |
|
17811
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
448 |
Test that amend does not make it easy to create obsoletescence cycle |
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
449 |
--------------------------------------------------------------------- |
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
450 |
|
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
451 |
|
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
452 |
$ hg id -r 14 |
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
453 |
b650e6ee8614 (a) |
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
454 |
$ hg revert -ar 14 |
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
455 |
reverting a |
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
456 |
$ hg commit --amend |
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
457 |
$ hg id |
a8aba2921456
amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17475
diff
changeset
|
458 |
b99e5df575f7 (a) tip |