Show More
@@ -375,23 +375,14 b' def rebase(ui, repo, **opts):' | |||||
375 | try: |
|
375 | try: | |
376 | ui.setconfig('ui', 'forcemerge', opts.get('tool', ''), |
|
376 | ui.setconfig('ui', 'forcemerge', opts.get('tool', ''), | |
377 | 'rebase') |
|
377 | 'rebase') | |
378 |
stats = rebasenode(repo, rev, p1, state, collapsef |
|
378 | stats = rebasenode(repo, rev, p1, state, collapsef, | |
|
379 | target) | |||
379 | if stats and stats[3] > 0: |
|
380 | if stats and stats[3] > 0: | |
380 | raise error.InterventionRequired( |
|
381 | raise error.InterventionRequired( | |
381 | _('unresolved conflicts (see hg ' |
|
382 | _('unresolved conflicts (see hg ' | |
382 | 'resolve, then hg rebase --continue)')) |
|
383 | 'resolve, then hg rebase --continue)')) | |
383 | finally: |
|
384 | finally: | |
384 | ui.setconfig('ui', 'forcemerge', '', 'rebase') |
|
385 | ui.setconfig('ui', 'forcemerge', '', 'rebase') | |
385 | if collapsef: |
|
|||
386 | copies.duplicatecopies(repo, rev, target) |
|
|||
387 | else: |
|
|||
388 | # If we're not using --collapse, we need to |
|
|||
389 | # duplicate copies between the revision we're |
|
|||
390 | # rebasing and its first parent, but *not* |
|
|||
391 | # duplicate any copies that have already been |
|
|||
392 | # performed in the destination. |
|
|||
393 | p1rev = repo[rev].p1().rev() |
|
|||
394 | copies.duplicatecopies(repo, rev, p1rev, skiprev=target) |
|
|||
395 | if not collapsef: |
|
386 | if not collapsef: | |
396 | merging = repo[p2].rev() != nullrev |
|
387 | merging = repo[p2].rev() != nullrev | |
397 | editform = cmdutil.mergeeditform(merging, 'rebase') |
|
388 | editform = cmdutil.mergeeditform(merging, 'rebase') | |
@@ -535,7 +526,7 b' def concludenode(repo, rev, p1, p2, comm' | |||||
535 | repo.dirstate.invalidate() |
|
526 | repo.dirstate.invalidate() | |
536 | raise |
|
527 | raise | |
537 |
|
528 | |||
538 | def rebasenode(repo, rev, p1, state, collapse): |
|
529 | def rebasenode(repo, rev, p1, state, collapse, target): | |
539 | 'Rebase a single revision' |
|
530 | 'Rebase a single revision' | |
540 | # Merge phase |
|
531 | # Merge phase | |
541 | # Update to target and merge it with local |
|
532 | # Update to target and merge it with local | |
@@ -592,8 +583,19 b' def rebasenode(repo, rev, p1, state, col' | |||||
592 | repo.ui.debug(" detach base %d:%s\n" % (repo[base].rev(), repo[base])) |
|
583 | repo.ui.debug(" detach base %d:%s\n" % (repo[base].rev(), repo[base])) | |
593 | # When collapsing in-place, the parent is the common ancestor, we |
|
584 | # When collapsing in-place, the parent is the common ancestor, we | |
594 | # have to allow merging with it. |
|
585 | # have to allow merging with it. | |
595 |
|
|
586 | stats = merge.update(repo, rev, True, True, False, base, collapse, | |
596 | labels=['dest', 'source']) |
|
587 | labels=['dest', 'source']) | |
|
588 | if collapse: | |||
|
589 | copies.duplicatecopies(repo, rev, target) | |||
|
590 | else: | |||
|
591 | # If we're not using --collapse, we need to | |||
|
592 | # duplicate copies between the revision we're | |||
|
593 | # rebasing and its first parent, but *not* | |||
|
594 | # duplicate any copies that have already been | |||
|
595 | # performed in the destination. | |||
|
596 | p1rev = repo[rev].p1().rev() | |||
|
597 | copies.duplicatecopies(repo, rev, p1rev, skiprev=target) | |||
|
598 | return stats | |||
597 |
|
599 | |||
598 | def nearestrebased(repo, rev, state): |
|
600 | def nearestrebased(repo, rev, state): | |
599 | """return the nearest ancestors of rev in the rebase result""" |
|
601 | """return the nearest ancestors of rev in the rebase result""" |
@@ -231,24 +231,18 b' ensure that we have a merge with unresol' | |||||
231 | +======= |
|
231 | +======= | |
232 | +a |
|
232 | +a | |
233 | +>>>>>>> source: 4702e8911fe0 - shelve: changes to '[mq]: second.patch' |
|
233 | +>>>>>>> source: 4702e8911fe0 - shelve: changes to '[mq]: second.patch' | |
234 |
diff --git a/b |
|
234 | diff --git a/b/b b/b.rename/b | |
235 | new file mode 100644 |
|
235 | rename from b/b | |
236 | --- /dev/null |
|
236 | rename to b.rename/b | |
237 | +++ b/b.rename/b |
|
|||
238 | @@ -0,0 +1,1 @@ |
|
|||
239 | +b |
|
|||
240 | diff --git a/b/b b/b/b |
|
237 | diff --git a/b/b b/b/b | |
241 | deleted file mode 100644 |
|
238 | deleted file mode 100644 | |
242 | --- a/b/b |
|
239 | --- a/b/b | |
243 | +++ /dev/null |
|
240 | +++ /dev/null | |
244 | @@ -1,1 +0,0 @@ |
|
241 | @@ -1,1 +0,0 @@ | |
245 | -b |
|
242 | -b | |
246 |
diff --git a/c |
|
243 | diff --git a/c b/c.copy | |
247 | new file mode 100644 |
|
244 | copy from c | |
248 | --- /dev/null |
|
245 | copy to c.copy | |
249 | +++ b/c.copy |
|
|||
250 | @@ -0,0 +1,1 @@ |
|
|||
251 | +c |
|
|||
252 | $ hg resolve -l |
|
246 | $ hg resolve -l | |
253 | U a/a |
|
247 | U a/a | |
254 |
|
248 |
General Comments 0
You need to be logged in to leave comments.
Login now