Differences between revisions 11 and 13 (spanning 2 versions)
Revision 11 as of 2017-01-23 13:42:38
Size: 2917
Comment: ChangesetEvolutionDevel → CED
Revision 13 as of 2017-01-23 14:05:49
Size: 3104
Comment:
Deletions are marked like this. Additions are marked like this.
Line 7: Line 7:

It needs merging with [[ChangesetEvolutionDevel#Using_Obsolescence_Marker_during_Rebase|existing info regarding rebase on the devel page]]
Line 130: Line 132:

----
CategoryDeveloper CategoryEvolution

Rebase with obsoleted changesets in rebaseset

/!\ This page is intended for developer

This page collects situations and discussion about rebase where the rebaseset contains obsoleted changesets.

It needs merging with existing info regarding rebase on the devel page

Situations

Successor is an ancestor of dest

  Z E # E: unstable
  | |
 D' D # D: replaced by D'
  | |
  B C
  |/
  A
  • rebase -s C -d Z can just skip D

  E'
  |
  C'
  |
  Z 
  | 
  ~

Successor is also in a rebase set

This is probably the most interesting one.

    E    # E: unstable
    |
  Z D D' # D: replaced by D'
  | |/
  B C
  |/
  A
  • Option 1 (rebase markers): rebase -s C -d Z creates new markers, avoid potential merge conflicts (in case the user knows there will be a conflict and wants to edit D"' before rebase E'). Like Option 5, plus creating new markers. The main concern is marker explosion.

    E'
    |
   D" D"' # D": replaced by D"'
    |/
    C'
   /
  Z
  |
  ~ 
  • Option 2 (skip troublemakers): rebase -s C -d Z (with some flag?) skips precursors(rebaseset):: in rebaseset. In the example case, E remains at the old position. The user need to run another rebase -s E -d D"' to move E. There is no D" like Option 1 so the user cannot create divergence easily and conflict of rebasing E can be handled later. The downside is not intuitive - users may expect C to be "extinct" (i.e. not shown up in hg sl) after rebase -s C -d ....

    D"'
    |
    C'E # E: unstable
   / /
  Z D D' # D: replaced by D'; D': replaced by D"'
  | |/
  B C # C: replaced by C'
  |/
  A
  • Option 3 (evolve): rebase -s C -d Z --evolve auto rebases E' to D"', does not create D", and does not create new markers. Like running "hg evolve" after Option 1. This is consistent with the --evolve flag below.

    E'
    |
    D"'
    |
    C'
   /
  Z
  |
  ~
  • Option 4 (current behavior, not ideal): rebase -s C -d Z aborts

  • Option 5 (current behavior with experimental.allowdivergence=1, not ideal): rebase -s C -d Z creates divergence

Successor is in other places

      E # E: unstable
      |
Z D'  D # D: replaced by D'
 \|  /
  B C
  |/
  A
  • Option 1: rebase -s C -d Z aborts (current default behavior)

  • Option 2: rebase -s C -d Z creates diverange (with experimental.allowdivergence=True)

  • Option 3: rebase -s C -d Z --evolve rebases roots to destination and evolves others

C'E'
| |
Z D'
 \|
  B
  |
  A

Mostly about how to deal with the "Successor is also in a rebase set" case.


CategoryDeveloper CategoryEvolution

CEDRebase (last edited 2017-08-31 18:50:17 by JunWu)