Mercurial > hg
comparison tests/test-histedit-fold-non-commute.t @ 17647:d34ba4991188
histedit: replaces patching logic by merges
The old and fragile patching logic is replaced by smart merges (as rebase and
graft do). This should prevents some conflicts and smoother human resolution.
For this purpose the "foldchanges" function is renamed to "applychanges" and
handle a single revision only.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Fri, 21 Sep 2012 19:27:22 +0200 |
parents | d44731a3adb8 |
children | 358c23e8f1c6 |
comparison
equal
deleted
inserted
replaced
17646:d44731a3adb8 | 17647:d34ba4991188 |
---|---|
86 | 86 |
87 | 87 |
88 edit the history | 88 edit the history |
89 $ HGEDITOR="cat \"$EDITED\" > " hg histedit 3 2>&1 | fixbundle | 89 $ HGEDITOR="cat \"$EDITED\" > " hg histedit 3 2>&1 | fixbundle |
90 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | 90 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
91 patching file e | 91 merging e |
92 Hunk #1 FAILED at 0 | 92 warning: conflicts during merge. |
93 1 out of 1 hunks FAILED -- saving rejects to file e.rej | 93 merging e incomplete! (edit conflicts, then use 'hg resolve --mark') |
94 abort: Fix up the change and run hg histedit --continue | 94 abort: Fix up the change and run hg histedit --continue |
95 | 95 |
96 fix up | 96 fix up |
97 $ echo a > e | 97 $ echo 'I can haz no commute' > e |
98 $ hg resolve --mark e | |
98 $ cat > cat.py <<EOF | 99 $ cat > cat.py <<EOF |
99 > import sys | 100 > import sys |
100 > print open(sys.argv[1]).read() | 101 > print open(sys.argv[1]).read() |
101 > print | 102 > print |
102 > print | 103 > print |
119 | 120 |
120 | 121 |
121 | 122 |
122 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | 123 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
123 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | 124 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
124 patching file e | 125 merging e |
125 Hunk #1 FAILED at 0 | 126 warning: conflicts during merge. |
126 1 out of 1 hunks FAILED -- saving rejects to file e.rej | 127 merging e incomplete! (edit conflicts, then use 'hg resolve --mark') |
127 abort: Fix up the change and run hg histedit --continue | 128 abort: Fix up the change and run hg histedit --continue |
128 | 129 |
129 just continue this time | 130 just continue this time |
131 $ hg revert -r 'p1()' e | |
132 $ hg resolve --mark e | |
130 $ hg histedit --continue 2>&1 | fixbundle | 133 $ hg histedit --continue 2>&1 | fixbundle |
131 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | 134 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
132 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | 135 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
133 | 136 |
134 log after edit | 137 log after edit |
135 $ hg log --graph | 138 $ hg log --graph |
136 @ changeset: 5:45bd04206744 | 139 @ changeset: 5:2696a654c663 |
137 | tag: tip | 140 | tag: tip |
138 | user: test | 141 | user: test |
139 | date: Thu Jan 01 00:00:00 1970 +0000 | 142 | date: Thu Jan 01 00:00:00 1970 +0000 |
140 | summary: f | 143 | summary: f |
141 | | 144 | |
142 o changeset: 4:abff6367c13a | 145 o changeset: 4:ec2c1cf833a8 |
143 | user: test | 146 | user: test |
144 | date: Thu Jan 01 00:00:00 1970 +0000 | 147 | date: Thu Jan 01 00:00:00 1970 +0000 |
145 | summary: d | 148 | summary: d |
146 | | 149 | |
147 o changeset: 3:65a9a84f33fd | 150 o changeset: 3:65a9a84f33fd |
165 summary: Initial commit | 168 summary: Initial commit |
166 | 169 |
167 | 170 |
168 contents of e | 171 contents of e |
169 $ hg cat e | 172 $ hg cat e |
170 a | 173 I can haz no commute |
171 | 174 |
172 manifest | 175 manifest |
173 $ hg manifest | 176 $ hg manifest |
174 a | 177 a |
175 b | 178 b |