Show More
@@ -282,6 +282,19 def rebase(ui, repo, **opts): | |||||
282 | if abortf: |
|
282 | if abortf: | |
283 | return abort(repo, originalwd, target, state, |
|
283 | return abort(repo, originalwd, target, state, | |
284 | activebookmark=activebookmark) |
|
284 | activebookmark=activebookmark) | |
|
285 | ||||
|
286 | obsoletenotrebased = {} | |||
|
287 | if ui.configbool('experimental', 'rebaseskipobsolete', | |||
|
288 | default=True): | |||
|
289 | rebaseobsrevs = set([r for r, status in state.items() | |||
|
290 | if status == revprecursor]) | |||
|
291 | rebasesetrevs = set(state.keys()) | |||
|
292 | obsoletenotrebased = _computeobsoletenotrebased(repo, | |||
|
293 | rebaseobsrevs, | |||
|
294 | target) | |||
|
295 | rebaseobsskipped = set(obsoletenotrebased) | |||
|
296 | _checkobsrebase(repo, ui, rebaseobsrevs, rebasesetrevs, | |||
|
297 | rebaseobsskipped) | |||
285 | else: |
|
298 | else: | |
286 | dest, rebaseset = _definesets(ui, repo, destf, srcf, basef, revf) |
|
299 | dest, rebaseset = _definesets(ui, repo, destf, srcf, basef, revf) | |
287 | if dest is None: |
|
300 | if dest is None: |
@@ -805,3 +805,61 With experimental.allowdivergence=True, | |||||
805 | phases: 8 draft |
|
805 | phases: 8 draft | |
806 | divergent: 2 changesets |
|
806 | divergent: 2 changesets | |
807 |
|
807 | |||
|
808 | rebase --continue + skipped rev because their successors are in destination | |||
|
809 | we make a change in trunk and work on conflicting changes to make rebase abort. | |||
|
810 | ||||
|
811 | $ hg log -G -r 17:: | |||
|
812 | @ 17:61bd55f69bc4 bar foo | |||
|
813 | | | |||
|
814 | ~ | |||
|
815 | ||||
|
816 | Create the two changes in trunk | |||
|
817 | $ printf "a" > willconflict | |||
|
818 | $ hg add willconflict | |||
|
819 | $ hg commit -m "willconflict first version" | |||
|
820 | ||||
|
821 | $ printf "dummy" > C | |||
|
822 | $ hg commit -m "dummy change successor" | |||
|
823 | ||||
|
824 | Create the changes that we will rebase | |||
|
825 | $ hg update -C 17 -q | |||
|
826 | $ printf "b" > willconflict | |||
|
827 | $ hg add willconflict | |||
|
828 | $ hg commit -m "willconflict second version" | |||
|
829 | created new head | |||
|
830 | $ printf "dummy" > K | |||
|
831 | $ hg add K | |||
|
832 | $ hg commit -m "dummy change" | |||
|
833 | $ printf "dummy" > L | |||
|
834 | $ hg add L | |||
|
835 | $ hg commit -m "dummy change" | |||
|
836 | $ hg debugobsolete `hg log -r ".^" -T '{node}'` `hg log -r 19 -T '{node}'` --config experimental.evolution=all | |||
|
837 | ||||
|
838 | $ hg log -G -r 17:: | |||
|
839 | @ 22:7bdc8a87673d dummy change | |||
|
840 | | | |||
|
841 | x 21:8b31da3c4919 dummy change | |||
|
842 | | | |||
|
843 | o 20:b82fb57ea638 willconflict second version | |||
|
844 | | | |||
|
845 | | o 19:601db7a18f51 dummy change successor | |||
|
846 | | | | |||
|
847 | | o 18:357ddf1602d5 willconflict first version | |||
|
848 | |/ | |||
|
849 | o 17:61bd55f69bc4 bar foo | |||
|
850 | | | |||
|
851 | ~ | |||
|
852 | $ hg rebase -r ".^^ + .^ + ." -d 19 | |||
|
853 | rebasing 20:b82fb57ea638 "willconflict second version" | |||
|
854 | merging willconflict | |||
|
855 | warning: conflicts while merging willconflict! (edit, then use 'hg resolve --mark') | |||
|
856 | unresolved conflicts (see hg resolve, then hg rebase --continue) | |||
|
857 | [1] | |||
|
858 | ||||
|
859 | $ hg resolve --mark willconflict | |||
|
860 | (no more unresolved files) | |||
|
861 | continue: hg rebase --continue | |||
|
862 | $ hg rebase --continue | |||
|
863 | rebasing 20:b82fb57ea638 "willconflict second version" | |||
|
864 | note: not rebasing 21:8b31da3c4919 "dummy change", already in destination as 19:601db7a18f51 "dummy change successor" | |||
|
865 | rebasing 22:7bdc8a87673d "dummy change" (tip) |
General Comments 0
You need to be logged in to leave comments.
Login now