Differences between revisions 1 and 8 (spanning 7 versions)
Revision 1 as of 2016-12-21 21:37:04
Size: 1785
Editor: JunWu
Comment:
Revision 8 as of 2016-12-21 23:27:27
Size: 2088
Editor: JunWu
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
= Rebase with changesets in rebaseset = = Rebase with obsoleted changesets in rebaseset =
Line 14: Line 14:
  Z F (F: unstable)
  |   |
  D'  D (D: replaced by D')
  |  /
  Z E # E: unstable
  | |
 D' D # D: replaced by D'
  | |
Line 26: Line 26:
  F'   E'
Line 40: Line 40:
   E
      |
    E    # E: unstable
    |
Line 49: Line 49:
 * Option 1: {{{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').  * Option 1: {{{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'). Strictly better than Option 4. Could be considered as the default behavior.
Line 52: Line 52:
   E'
      |
  D"' D" # D": replaced by D"'
    E'
    |
   D" D"' # D": replaced by D"'
Line 63: Line 63:
 * Option 2: {{{rebase -s C -d Z}}} auto rebases E' to D"', does not create D", and does not create new markers. Like running "hg evolve" after Option 1.  * Option 2: {{{rebase -s C -d Z}}} auto rebases E' to D"', does not create D", and does not create new markers. Like running "hg evolve" after Option 1. Could be considered as the behavior when --evolve is set - see "Option 3" with "--evolve" below.
Line 68: Line 68:
    D"     D"'
Line 85: Line 85:
      E       E # E: unstable
Line 96: Line 96:
  * Option 3: (Do we have other options) ?   * Option 3: {{{rebase -s C -d Z --evolve}}} rebases roots to destination and evolves others

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

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.

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 -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'). Strictly better than Option 4. Could be considered as the default behavior.

    E'
    |
   D" D"' # D": replaced by D"'
    |/
    C'
   /
  Z
  |
  ~ 
  • Option 2: rebase -s C -d Z auto rebases E' to D"', does not create D", and does not create new markers. Like running "hg evolve" after Option 1. Could be considered as the behavior when --evolve is set - see "Option 3" with "--evolve" below.

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

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

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

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