Differences between revisions 13 and 17 (spanning 4 versions)
Revision 13 as of 2014-01-25 01:54:04
Size: 5095
Comment:
Revision 17 as of 2014-01-29 23:53:10
Size: 7210
Comment:
Deletions are marked like this. Additions are marked like this.
Line 27: Line 27:
     ← pruned changeset      ← pruned changeset
Line 31: Line 31:
    ✕ ← changeset that does not exist locally but are pruned in marker history
Line 137: Line 138:
* `hg push` will complain about the new head
* `hg push` should complain about unstable history creation
 * `hg push` will complain about the new head
 * `hg push` should complain about unstable history creation



== A.3 new branch created ==

{{{
  B' ○⇢ø B
     | |
     \Aø⇠◔ A'
      \|/
       ● O
}}}

Marker exist from:

 * `Aø⇠○ A'`
 * `Bø⇠○ B'`

Command run:

 * hg push -r A

Expected exchange:

 * chain from A

Expected Exclude:

 * chain from B

Extra note:

 * `hg push` will complain about the new head
 * `hg push` should complain about unstable history creation

=== A.4 Push in the middle of the obsolescence chain ===

(Where we show that we should not push the marker without the successors)

{{{
  B ◔
    |
  A⇠ø⇠○ A'
    |/
    ● O
}}}

Marker exist from:

 * `Aø⇠○ A'`
 * chain from A

Command run:

 * hg push -r B

Expected exchange:

 * Chain from A

Expected Exclude:

 * `Aø⇠○ A'`
Line 145: Line 210:
     B      B
Line 168: Line 233:
     A      A
Line 189: Line 254:
   C    C
Line 217: Line 282:
   C    C
Line 238: Line 303:
=== B.5 Push of a children of changeset which successors is pruned ===

This case Mirror A.4, with pruned changeset successors.

{{{
  B ◔
    |
  A⇠ø⇠⊗ A'
    |/
    ● O
}}}

Marker exist from:

 * `Aø⇠○ A'`
 * chain from A
 * `A'`

Command run:

 * hg push -r B

Expected exchange:

 * `Aø⇠○ A'`
 * chain from A
 * `A'`

Extra Note:

  I'm not totally happy about this case and I believe some more complicated
  graph can result in behavior wuite confusing for the user (if some tool create
  prune maker in a the middle of a valid chain)
Line 243: Line 342:
   B    B
Line 245: Line 344:
   A    A
Line 268: Line 367:
  B   B
Line 293: Line 392:
  B
    |
  A ø⇠ A'
  B
    |
  A ø⇠ A'
Line 313: Line 412:
 * `A ø⇠ A'`  * `A ø⇠ A'`
Line 326: Line 425:
  B   B
Line 348: Line 447:
=== D.2 missing prune target (prune in "pushed set") ===

{{{
  A ø⇠✕ A'
    |/
    ● O
}}}

Marker exist from:

 * A' succeed to A
 * A' (prune)

Command run:

 * hg push

Expected exchange:

 * `A ø⇠o A'`
 * A' (prune)

=== D.2 missing prune target (prune Not in "pushed set") ===

(this is one of the case were is will be hard to be non-confusing)

{{{
  A ø⇠✕ A'
    | |
    | ○ B
    |/
    ● O
}}}

Marker exist from:

 * A' succeed to A
 * A' (prune)

Command run:

 * hg push -r O

(shall we account for a secret B?

Expected exchange:

 * nothing?
Line 354: Line 501:
=== Z.1 partial push of split=== === Z.1 partial push of split ===

List of case and expected behavior when exchanging obsolesence marker

/!\ This page is intended for developer

1. Definition

1. You want all markers relevant changeset common between source and destination to be exchanged 2. Marker relevant to a changeset are:

  • marker that use this changeset as successors
  • prune marker of direct children on this changeset.
  • recursive application of the two rules on successors store in those marker

?. What shall we do on partial split push…

    ○ ← a changeset,
    ● ← a changeset that exist remotly before the push.
    ⊗ ← pruned changeset
    ø ← obsolete changeset with a precursors
    ◔ ← changeset being pushed
    ◌ ← changeset that does not exist locally but are present in marker history
    ✕ ← changeset that does not exist locally but are pruned in marker history
    ⇠ ← obsolescence marker from that point (if not poiting to anything this mean we do not care about what is point to)

2. A. Simple Case

2.1. A.1 pushing a single heads

2.1.1. A.1.1 pushing a single head

    ⇠◔ A
     |
     ●  O

Marker exist from:

  • A

Command run:

  • hg push -r A
  • hg push

Expected exchange:

  • chain from A

2.1.2. A.1.2 pushing a multiple changeset into a single head

     ◔ B
     |
    ⇠◔ A
     |
     ● O

Marker exist from:

  • A

Command run:

  • hg push -r B
  • hg push

Expected exchange:

  • chain from A

2.2. A.2 Two heads

     ○ B
  ⇠◔ | A
   |/
   ● O

Marker exist from:

  • A

Command run:

  • hg push -r A

Expected exchange:

  • chain from A

Expected Exclude:

  • chain from B

3. A.3 new branch created

  B' ○⇢ø B
     | |
     \Aø⇠◔ A'
      \|/
       ● O

Marker exist from:

  • Aø⇠○ A'

  • Bø⇠○ B'

Command run:

  • hg push -r A

Expected exchange:

  • chain from A

Expected Exclude:

  • chain from B

Extra node:

  • hg push will complain about the new head

  • hg push should complain about unstable history creation

4. A.3 new branch created

  B' ○⇢ø B
     | |
     \Aø⇠◔ A'
      \|/
       ● O

Marker exist from:

  • Aø⇠○ A'

  • Bø⇠○ B'

Command run:

  • hg push -r A

Expected exchange:

  • chain from A

Expected Exclude:

  • chain from B

Extra note:

  • hg push will complain about the new head

  • hg push should complain about unstable history creation

4.1. A.4 Push in the middle of the obsolescence chain

(Where we show that we should not push the marker without the successors)

  B ◔
    |
  A⇠ø⇠○ A'
    |/
    ● O

Marker exist from:

  • Aø⇠○ A'

  • chain from A

Command run:

  • hg push -r B

Expected exchange:

  • Chain from A

Expected Exclude:

  • Aø⇠○ A'

5. B. Deletion Case

5.1. B.1 Pruned changeset atop the pushed set

    ⊗ B
    |
    ◔ A
    |
    ● O

Marker exist from:

  • B (prune)

Command run:

  • hg push -r A
  • hg push

Expected exchange:

  • prune marker for B

5.2. B.2 Pruned changeset on head. nothing pushed

    ⊗ A
    |
    ● O

Marker exist from:

  • A (prune)

Command run:

  • hg push -r O
  • hg push

Expected exchange:

  • prune marker for A

5.3. B.3 Pruned changeset on non-pushed part of the history

  ⊗ C
  |
  ○ B
  | ◔ A
  |/
  ● O

Marker exist from:

  • C (prune)

Command run:

  • hg push -r A
  • hg push

Expected exchange:

  • ø

Expected Exclude:

  • chain from B

5.4. B.4 Pruned changeset on common part of history

  ⊗ C
  | ● B
  | |
  | ● A
  |/
  ● O

Marker exist from:

  • C (prune)

Command run:

  • hg push -r B
  • hg push

Expected exchange:

  • prune for C

5.5. B.5 Push of a children of changeset which successors is pruned

This case Mirror A.4, with pruned changeset successors.

  B ◔
    |
  A⇠ø⇠⊗ A'
    |/
    ● O

Marker exist from:

  • Aø⇠○ A'

  • chain from A
  • A'

Command run:

  • hg push -r B

Expected exchange:

  • Aø⇠○ A'

  • chain from A
  • A'

Extra Note:

  • I'm not totally happy about this case and I believe some more complicated graph can result in behavior wuite confusing for the user (if some tool create prune maker in a the middle of a valid chain)

6. C. Advance Case

6.1. C.1 Multiple pruned changeset atop each other

  ⊗ B
  |
  ⊗ A
  |
  ● O

Marker exist from:

  • A (prune)
  • B (prune)

Command run:

  • hg push -r O
  • hg push

Expected exchange:

  • A (prune)
  • B (prune)

6.2. C.2 Pruned changeset on precursors

  B ⊗
    |
  A ø⇠◔ A'
    |/
    ● O

Marker exist from:

  • A' succeed to A
  • B (prune)

Command run:

  • hg push -r A'
  • hg push

Expected exchange:

  • A ø⇠o A'

  • B (prune)

6.3. C.3 Pruned changeset on precursors of another pruned one

  B ⊗
    |
  A ø⇠⊗ A'
    |/
    ● O

Marker exist from:

  • A' succeed to A
  • A' (prune
  • B (prune)

Command run:

  • hg push -r A'
  • hg push

Expected exchange:

  • A ø⇠⊗ A'

  • A (prune)
  • B (prune)

7. D. Partial Information Case

From then we have changeset missing from the repo but still referenced in obsolescence marker. This has an impact on the knowledge we have from the graph topology.

7.1. D.1 Pruned changeset based on a missing precursors of something we miss

  B ⊗
    |
  A ◌⇠◔ A'
    |/
    ● O

Marker exist from:

  • A' succeed to A
  • B (prune)

Command run:

  • hg push -r A'
  • hg push

Expected exchange:

  • A ø⇠o A'

  • B (prune)

7.2. D.2 missing prune target (prune in "pushed set")

  A ø⇠✕ A'
    |/
    ● O

Marker exist from:

  • A' succeed to A
  • A' (prune)

Command run:

  • hg push

Expected exchange:

  • A ø⇠o A'

  • A' (prune)

7.3. D.2 missing prune target (prune Not in "pushed set")

(this is one of the case were is will be hard to be non-confusing)

  A ø⇠✕ A'
    | |
    | ○ B
    |/
    ● O

Marker exist from:

  • A' succeed to A
  • A' (prune)

Command run:

  • hg push -r O

(shall we account for a secret B?

Expected exchange:

  • nothing?

8. Z. Crazy case

When I'm note very sure about what we should do

8.1. Z.1 partial push of split

   D'○⇢ø D
     | | A
   B ○⇢ø⇠◔ C
      \|/
       ● O

Marker exist from:

  • A ø⇠⚭ (B,C) (split)

  • D ø⇠○ D'

Command run:

  • hg push -r C

Expected exchange:

  • We should probably send the whole marker anyway. But what about things related to B children
  • A ø⇠⚭ (B,C) (split)

Expected exclude:

  • D ø⇠○ D'

CEDObsmarkersExchange (last edited 2018-03-04 20:25:36 by BorisFeld)