Size: 3358
Comment:
|
Size: 5004
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 25: | Line 25: |
o ← a changeset, * ← a changeset that exist remotly before the push. x ← pruned changeset |
○ ← a changeset, ● ← a changeset that exist remotly before the push. ✕ ← pruned changeset |
Line 29: | Line 29: |
@ ← changeset being pushed | ◔ ← changeset being pushed ◌ ← changeset that does not exist locally but are present in marker history ⇠ ← obsolescence marker from that point |
Line 39: | Line 41: |
@ A | * O |
⇠◔ A | ● O |
Line 60: | Line 62: |
@ B | @ A | * O |
◔ B | ⇠◔ A | ● O |
Line 84: | Line 86: |
o B | @ A |
○ B ⇠◔ | A |/ ● O }}} Marker exist from: * A Command run: * hg push -r A Expected exchange: * chain from A Expected Exclude: * chain from B == 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 == B. Deletion Case == === 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 === 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 === B.3 Pruned changeset on non-pushed part of the history === {{{ ✕ C | ○ B | ◔ A |
Line 87: | Line 194: |
* O }}} Marker exist from: * A Command run: * hg push -r A Expected exchange: * chain from A |
● O }}} Marker exist from: * C (prune) Command run: * hg push -r A * hg push Expected exchange: * ø |
Line 106: | Line 214: |
== B. Deletion Case == === B.1 Pruned changeset atop the pushed set === {{{ x B | @ A | * O }}} Marker exist from: * B (prune) Command run: * hg push -r A * hg push Expected exchange: * prune marker for B === B.2 Pruned changeset on head. nothing pushed === {{{ x A | * O |
=== 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 == C. Advance Case == === C.1 Multiple pruned changeset atop each other === {{{ ✕ B | ✕ A | ● O |
Line 142: | Line 253: |
* B (prune) | |
Line 150: | Line 262: |
* prune marker for A === B.3 Pruned changeset on non-pushed part of the history === {{{ x C | o B | @ A |/ * O }}} Marker exist from: * C (prune) Command run: * hg push -r A * hg push Expected exchange: * ø Expected Exclude: * chain from B === B.4 Pruned changeset on common part of history === {{{ x C | * B | | | * A |/ * O }}} Marker exist from: * C (prune) Command run: * hg push -r B * hg push Expected exchange: * prune for C == C. Advance Case == === C.1 Multiple pruned changeset atop each other === {{{ x B | x A | * O }}} Marker exist from: |
|
Line 221: | Line 265: |
Command run: * hg push -r O * hg push Expected exchange: * A (prune) * B (prune) |
|
Line 234: | Line 268: |
B x | A ø⇠@ A' |
B ✕ | A ø⇠◔ A' |
Line 238: | Line 272: |
* O | ● O |
Line 259: | Line 293: |
B x | A ø⇠x A' |
B ✕ | A ø⇠✕ A' |
Line 263: | Line 297: |
* O | ● O |
Line 274: | Line 308: |
* hg push -r O | * hg push -r A' * hg push Expected exchange: * `A ø⇠✕ A'` * A (prune) * B (prune) == 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. === 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' |
Line 282: | Line 346: |
== D. Partial Information Case == | == Z. Crazy case == When I'm note very sure about what we should do === 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'` |
List of case and expected behavior when exchanging obsolesence marker
This page is intended for developer
Contents
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 ⇠ ← obsolescence marker from that point
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. B. Deletion Case
4.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
4.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
4.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
4.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. C. Advance Case
5.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)
5.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)
5.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)
6. 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.
6.1. D.1 Pruned changeset based on a missing precursors of something we miss
- B ✕
- |
- |/ ● 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. Z. Crazy case
When I'm note very sure about what we should do
=== 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'