Show More
@@ -689,7 +689,7 b' def inrebase(repo, originalwd, state):' | |||||
689 |
|
689 | |||
690 | def abort(repo, originalwd, target, state): |
|
690 | def abort(repo, originalwd, target, state): | |
691 | 'Restore the repository to its original state' |
|
691 | 'Restore the repository to its original state' | |
692 |
dstates = [s for s in state.values() if s |
|
692 | dstates = [s for s in state.values() if s > nullrev] | |
693 | immutable = [d for d in dstates if not repo[d].mutable()] |
|
693 | immutable = [d for d in dstates if not repo[d].mutable()] | |
694 | cleanup = True |
|
694 | cleanup = True | |
695 | if immutable: |
|
695 | if immutable: |
@@ -185,6 +185,8 b' class phasecache(object):' | |||||
185 | # be replaced without us being notified. |
|
185 | # be replaced without us being notified. | |
186 | if rev == nullrev: |
|
186 | if rev == nullrev: | |
187 | return public |
|
187 | return public | |
|
188 | if rev < nullrev: | |||
|
189 | raise ValueError(_('cannot lookup negative revision')) | |||
188 | if self._phaserevs is None or rev >= len(self._phaserevs): |
|
190 | if self._phaserevs is None or rev >= len(self._phaserevs): | |
189 | self._phaserevs = self.getphaserevs(repo, rebuild=True) |
|
191 | self._phaserevs = self.getphaserevs(repo, rebuild=True) | |
190 | return self._phaserevs[rev] |
|
192 | return self._phaserevs[rev] |
@@ -181,3 +181,46 b' Rebase and abort without generating new ' | |||||
181 |
|
181 | |||
182 |
|
182 | |||
183 | $ cd .. |
|
183 | $ cd .. | |
|
184 | ||||
|
185 | rebase abort should not leave working copy in a merge state if tip-1 is public | |||
|
186 | (issue4082) | |||
|
187 | ||||
|
188 | $ hg init abortpublic | |||
|
189 | $ cd abortpublic | |||
|
190 | $ echo a > a && hg ci -Aqm a | |||
|
191 | $ hg book master | |||
|
192 | $ hg book foo | |||
|
193 | $ echo b > b && hg ci -Aqm b | |||
|
194 | $ hg up -q master | |||
|
195 | $ echo c > c && hg ci -Aqm c | |||
|
196 | $ hg phase -p -r . | |||
|
197 | $ hg up -q foo | |||
|
198 | $ echo C > c && hg ci -Aqm C | |||
|
199 | $ hg log -G --template "{rev} {desc} {bookmarks}" | |||
|
200 | @ 3 C foo | |||
|
201 | | | |||
|
202 | | o 2 c master | |||
|
203 | | | | |||
|
204 | o | 1 b | |||
|
205 | |/ | |||
|
206 | o 0 a | |||
|
207 | ||||
|
208 | ||||
|
209 | $ hg rebase -d master -r foo | |||
|
210 | merging c | |||
|
211 | warning: conflicts during merge. | |||
|
212 | merging c incomplete! (edit conflicts, then use 'hg resolve --mark') | |||
|
213 | unresolved conflicts (see hg resolve, then hg rebase --continue) | |||
|
214 | [1] | |||
|
215 | $ hg rebase --abort | |||
|
216 | rebase aborted | |||
|
217 | $ hg log -G --template "{rev} {desc} {bookmarks}" | |||
|
218 | @ 3 C foo | |||
|
219 | | | |||
|
220 | | o 2 c master | |||
|
221 | | | | |||
|
222 | o | 1 b | |||
|
223 | |/ | |||
|
224 | o 0 a | |||
|
225 | ||||
|
226 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now