Show More
@@ -234,25 +234,6 b' def rebase(ui, repo, **opts):' | |||||
234 | finally: |
|
234 | finally: | |
235 | release(lock, wlock) |
|
235 | release(lock, wlock) | |
236 |
|
236 | |||
237 | def rebasemerge(repo, rev, first=False): |
|
|||
238 | 'return the correct ancestor' |
|
|||
239 | oldancestor = ancestor.ancestor |
|
|||
240 |
|
||||
241 | def newancestor(a, b, pfunc): |
|
|||
242 | if b == rev: |
|
|||
243 | return repo[rev].parents()[0].rev() |
|
|||
244 | return oldancestor(a, b, pfunc) |
|
|||
245 |
|
||||
246 | if not first: |
|
|||
247 | ancestor.ancestor = newancestor |
|
|||
248 | else: |
|
|||
249 | repo.ui.debug("first revision, do not change ancestor\n") |
|
|||
250 | try: |
|
|||
251 | stats = merge.update(repo, rev, True, True, False) |
|
|||
252 | return stats |
|
|||
253 | finally: |
|
|||
254 | ancestor.ancestor = oldancestor |
|
|||
255 |
|
||||
256 | def checkexternal(repo, state, targetancestors): |
|
237 | def checkexternal(repo, state, targetancestors): | |
257 | """Check whether one or more external revisions need to be taken in |
|
238 | """Check whether one or more external revisions need to be taken in | |
258 | consideration. In the latter case, abort. |
|
239 | consideration. In the latter case, abort. | |
@@ -317,9 +298,10 b' def rebasenode(repo, rev, p1, p2, state)' | |||||
317 | repo.ui.debug(" already in target\n") |
|
298 | repo.ui.debug(" already in target\n") | |
318 | repo.dirstate.write() |
|
299 | repo.dirstate.write() | |
319 | repo.ui.debug(" merge against %d:%s\n" % (repo[rev].rev(), repo[rev])) |
|
300 | repo.ui.debug(" merge against %d:%s\n" % (repo[rev].rev(), repo[rev])) | |
320 | first = repo[rev].rev() == repo[min(state)].rev() |
|
301 | base = None | |
321 | stats = rebasemerge(repo, rev, first) |
|
302 | if repo[rev].rev() != repo[min(state)].rev(): | |
322 | return stats |
|
303 | base = repo[rev].parents()[0].node() | |
|
304 | return merge.update(repo, rev, True, True, False, base) | |||
323 |
|
305 | |||
324 | def defineparents(repo, rev, target, state, targetancestors): |
|
306 | def defineparents(repo, rev, target, state, targetancestors): | |
325 | 'Return the new parent relationship of the revision that will be rebased' |
|
307 | 'Return the new parent relationship of the revision that will be rebased' |
General Comments 0
You need to be logged in to leave comments.
Login now