# HG changeset patch # User Anton Shestakov # Date 1573418420 -25200 # Node ID 0d1893c1044cabb7b4789bc17976ca039b7020d6 # Parent deec516b6e34e0ad9c1fb0a4c4c268ed01400200 docs: add SVG figures for sharing.rst Generated by graphviz loosely based on .dot files produced by dotgraph extension. diff -r deec516b6e34 -r 0d1893c1044c docs/figures/figure-sg01-ab.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/figures/figure-sg01-ab.svg Mon Nov 11 03:40:20 2019 +0700 @@ -0,0 +1,52 @@ + + + + + + +Mercurial graph + + +0 + +0:0dc9 + + + +1 + +1:f649 + + + +0->1 + + + + + +T0 +public + + + +T0->0 + + + + + +T1 +draft + + + +T1->1 + + + + + diff -r deec516b6e34 -r 0d1893c1044c docs/figures/figure-sg02-b.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/figures/figure-sg02-b.svg Mon Nov 11 03:40:20 2019 +0700 @@ -0,0 +1,83 @@ + + + + + + +Mercurial graph + + +0 + +0:0dc9 + + + +1 + +1:f649 + + + +0->1 + + + + + +2 + +2:96d8 + + + +0->2 + + + + + +3 + +3:522d + + + +0->3 + + + + + +1->2 + + + + + +2->3 + + + + + +T12 +obsolete (and hidden) + + + +T12->1 + + + + + +T12->2 + + + + + diff -r deec516b6e34 -r 0d1893c1044c docs/figures/figure-sg03.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/figures/figure-sg03.svg Mon Nov 11 03:40:20 2019 +0700 @@ -0,0 +1,60 @@ + + + + + + +Mercurial graph + + +0 + +0:0dc9 + + + +1 + +1:f649 + + + +0->1 + + + + + +2 + +2:522d + + + +0->2 + + + + + +1->2 + + + + + +T1 +obsolete (and hidden) +after the push + + + +T1->1 + + + + + diff -r deec516b6e34 -r 0d1893c1044c docs/figures/figure-sg04-a.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/figures/figure-sg04-a.svg Mon Nov 11 03:40:20 2019 +0700 @@ -0,0 +1,95 @@ + + + + + + +Mercurial graph + + +0 + +0:0dc9 + + + +1 + +1:f649 + + + +0->1 + + + + + +2 + +2:522d + + + +0->2 + + + + + +3 + +3:e42b + + + +0->3 + + + + + +4 + +4:7b49 + + + +0->4 + + + + + +1->2 + + + + + +2->3 + + + + + +3->4 + + + + + +T3 +not in the other repo + + + +T3->3 + + + + + diff -r deec516b6e34 -r 0d1893c1044c docs/figures/figure-sg04-b.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/figures/figure-sg04-b.svg Mon Nov 11 03:40:20 2019 +0700 @@ -0,0 +1,95 @@ + + + + + + +Mercurial graph + + +0 + +0:0dc9 + + + +1 + +1:f649 + + + +0->1 + + + + + +2 + +2:96d8 + + + +0->2 + + + + + +3 + +3:522d + + + +0->3 + + + + + +4 + +4:7b49 + + + +0->4 + + + + + +1->2 + + + + + +2->3 + + + + + +3->4 + + + + + +T2 +not in the other repo + + + +T2->2 + + + + + diff -r deec516b6e34 -r 0d1893c1044c docs/figures/figure-sg05.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/figures/figure-sg05.svg Mon Nov 11 03:40:20 2019 +0700 @@ -0,0 +1,41 @@ + + + + + + +Mercurial graph + + +0 + +0:0dc9 + + + +1 + +1:7b49 + + + +0->1 + + + + + +T1 +only the final version + + + +T1->1 + + + + + diff -r deec516b6e34 -r 0d1893c1044c docs/figures/figure-sg06.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/figures/figure-sg06.svg Mon Nov 11 03:40:20 2019 +0700 @@ -0,0 +1,60 @@ + + + + + + +Mercurial graph + + +0 + +0:0dc9 + + + +1 + +1:7b49 + + + +0->1 + + + + + +2 + +2:4e96 + + + +1->2 + + + + + +3 + +3:3363 + + + +1->3 + + + + + +2->3 + + + + + diff -r deec516b6e34 -r 0d1893c1044c docs/figures/figure-sg07-a.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/figures/figure-sg07-a.svg Mon Nov 11 03:40:20 2019 +0700 @@ -0,0 +1,108 @@ + + + + + + +Mercurial graph + + +0 + +0:0dc9 + + + +1 + +1:7b49 + + + +0->1 + + + + + +2 + +2:4e96 + + + +1->2 + + + + + +3 + +3:3363 + + + +1->3 + + + + + +4 + +4:c7ff + + + +1->4 + + + + + +5 + +5:1bb4 + + + +1->5 + + + + + +6 + +6:9d21 + + + +1->6 + + + + + +2->3 + + + + + +4->5 + + + + + +5->6 + + + + + diff -r deec516b6e34 -r 0d1893c1044c docs/figures/figure-sg07-b.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/figures/figure-sg07-b.svg Mon Nov 11 03:40:20 2019 +0700 @@ -0,0 +1,42 @@ + + + + + + +Mercurial graph + + +0 + +0:0dc9 + + + +1 + +1:7b49 + + + +0->1 + + + + + +2 + +2:9d21 + + + +1->2 + + + + + diff -r deec516b6e34 -r 0d1893c1044c docs/figures/figure-sg08-a.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/figures/figure-sg08-a.svg Mon Nov 11 03:40:20 2019 +0700 @@ -0,0 +1,126 @@ + + + + + + +Mercurial graph + + +0 + +0:0dc9 + + + +1 + +1:7b49 + + + +0->1 + + + + + +2 + +2:4e96 + + + +1->2 + + + + + +3 + +3:3363 + + + +1->3 + + + + + +4 + +4:c7ff + + + +1->4 + + + + + +5 + +5:1bb4 + + + +1->5 + + + + + +6 + +6:9d21 + + + +1->6 + + + + + +2->3 + + + + + +7 + +7:dd15 + + + +3->7 + + + + + +4->5 + + + + + +5->6 + + + + + +6->7 + + + + + diff -r deec516b6e34 -r 0d1893c1044c docs/figures/figure-sg08-b.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/figures/figure-sg08-b.svg Mon Nov 11 03:40:20 2019 +0700 @@ -0,0 +1,54 @@ + + + + + + +Mercurial graph + + +0 + +0:0dc9 + + + +1 + +1:7b49 + + + +0->1 + + + + + +2 + +2:9d21 + + + +1->2 + + + + + +3 + +3:dd15 + + + +2->3 + + + + + diff -r deec516b6e34 -r 0d1893c1044c docs/figures/figure-sg09.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/figures/figure-sg09.svg Mon Nov 11 03:40:20 2019 +0700 @@ -0,0 +1,130 @@ + + + + + + +Mercurial graph + + +0 + +0:0dc9 + + + +1 + +1:7b49 + + + +0->1 + + + + + +2 + +2:9d21 + + + +1->2 + + + + + +3 + +3:dd15 + + + +2->3 + + + + + +4 + +4:b2be + + + +3->4 + + + + + +5 + +5:541f + + + +3->5 + + + + + +6 + +6:e3a5 + + + +3->6 + + + + + +4->5 + + + + + +4->6 + + + + + +T5 +working dir + + + +T5->5 + + + + + +T56 +content-divergent + + + +T56->5 + + + + + +T56->6 + + + + + diff -r deec516b6e34 -r 0d1893c1044c docs/figures/figure-sg10.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/figures/figure-sg10.svg Mon Nov 11 03:40:20 2019 +0700 @@ -0,0 +1,138 @@ + + + + + + +Mercurial graph + + +0 + +0:0dc9 + + + +1 + +1:7b49 + + + +0->1 + + + + + +2 + +2:9d21 + + + +1->2 + + + + + +3 + +3:dd15 + + + +2->3 + + + + + +4 + +4:b2be + + + +3->4 + + + + + +5 + +5:541f + + + +3->5 + + + + + +6 + +6:e3a5 + + + +3->6 + + + + + +7 + +7:aa82 + + + +3->7 + + + + + +4->5 + + + + + +4->6 + + + + + +5->7 + + + + + +6->7 + + + + + +T7 +final, single +successor + + + +T7->7 + + + + + diff -r deec516b6e34 -r 0d1893c1044c docs/sharing.rst --- a/docs/sharing.rst Mon Nov 11 03:22:09 2019 +0700 +++ b/docs/sharing.rst Mon Nov 11 03:40:20 2019 +0700 @@ -160,7 +160,13 @@ At this point, ``dev-repo`` and ``test-repo`` have the same changesets in the same phases: - [figure SG01: rev 0:0dc9 public, rev 1:f649 draft, same on both repos] +.. figure:: figures/figure-sg01-ab.svg + + Figure 1 a: ``dev-repo`` has rev 0:0dc9 public, rev 1:f649 draft + +.. figure:: figures/figure-sg01-ab.svg + + Figure 1 b: the same exact picture in ``test-repo`` (You may notice a change in notation from the user guide: now changesets are labelled with their revision number and the first four @@ -198,7 +204,14 @@ obsolete in ``test-repo``, having been replaced by revision 2:96d8 and then by 3:522d—but ``dev-repo`` knows nothing of these recent developments. - [figure SG02: test-repo has rev 0:0dc9 public, rev 1:f649 and 2:96d8 obsolete, rev 3:522d draft; dev-repo same as in SG01] +.. figure:: figures/figure-sg01-ab.svg + + Figure 2 a: ``dev-repo`` same as in Figure 01 a + +.. figure:: figures/figure-sg02-b.svg + + Figure 2 b: ``test-repo`` has rev 0:0dc9 public, revs 1:f649 and 2:96d8 + obsolete, rev 3:522d draft Let's resynchronize:: @@ -218,7 +231,10 @@ 2:96d8, because it is hidden. Push and pull transfer obsolescence markers between repositories, but they do not transfer hidden changesets. - [figure SG03: dev-repo grows new rev 2:522d, marks 1:f649 obsolete] +.. figure:: figures/figure-sg03.svg + + Figure 3: ``dev-repo`` receives rev 2:522d, 1:f649 is now obsolete like in + ``test-repo`` Because of this deliberately incomplete synchronization, revision numbers in ``test-repo`` and ``dev-repo`` are no longer consistent. We @@ -243,7 +259,13 @@ opposite direction. Figure 4 shows the two repositories after amending in ``dev-repo`` and pushing to ``test-repo``. - [figure SG04: each repo has one temporary amend commit, but they're different in each one] +.. figure:: figures/figure-sg04-a.svg + + Figure 4 a: in ``dev-repo`` the extra amend commit is 3:e42b + +.. figure:: figures/figure-sg04-b.svg + + Figure 4 b: and in ``test-repo`` it is 2:96d8 Let's hop over to ``test-repo`` to test the more elegant fix:: @@ -269,7 +291,9 @@ ``dev-repo`` or ``test-repo``. Neither of our missteps nor our amendments are publicly visible, just the final, beautifully polished changeset: - [figure SG05: public repo with rev 0:0dc9, 1:7b49, both public] +.. figure:: figures/figure-sg05.svg + + Figure 5: in ``public`` repo with revs 0:0dc9 and 1:7b49, both public There is one important step left to do. Because we pushed from ``test-repo`` to ``public``, the pushed changeset is in *public* phase @@ -402,7 +426,10 @@ Figure 6 shows the state of the ``review`` repository at this point. - [figure SG06: rev 2:4e96 is Alice's obsolete v1, rev 3:3363 is her v2; both children of rev 1:7b49] +.. figure:: figures/figure-sg06.svg + + Figure 6: rev 2:4e96 is Alice's obsolete v1, rev 3:3363 is her v2; both + children of rev 1:7b49 After a busy morning of bug fixing, Alice stops for lunch. Let's see what Bob has been up to. @@ -466,7 +493,15 @@ Figure 7 shows the result of Bob's work in both ``review`` and ``public``. - [figure SG07: review includes Alice's draft work on bug 15, as well as Bob's v1, v2, and v3 changes for feature X: v1 and v2 obsolete, v3 public. public contains only the final, public implementation of feature X] +.. figure:: figures/figure-sg07-a.svg + + Figure 7 a: ``review`` includes Alice's draft work on bug 15, as well as + Bob's v1, v2, and v3 changes for feature X: v1 and v2 obsolete, v3 public + +.. figure:: figures/figure-sg07-b.svg + + Figure 7 b: ``public`` contains only the final, public implementation of + feature X Incidentally, it's important that Bob push to ``public`` *before* ``review``. If he pushed to ``review`` first, then revision 6:540b @@ -523,7 +558,14 @@ The result, in both ``review`` and ``public`` repositories, is shown in figure 8. - [figure SG08: review shows v1 and v2 of Alice's fix, then v1, v2, v3 of Bob's feature, finally Alice's fix rebased onto Bob's. public just shows the final public version of each changeset] +.. figure:: figures/figure-sg08-a.svg + + Figure 8 a: ``review`` shows v1 and v2 of Alice's fix, then v1, v2, v3 of + Bob's feature, finally Alice's fix rebased onto Bob's + +.. figure:: figures/figure-sg08-b.svg + + Figure 8 b: ``public`` just shows the final public version of each changeset Getting into trouble with shared mutable history ------------------------------------------------ @@ -627,7 +669,11 @@ Figure 9 shows the situation in Bob's repository. - [figure SG09: Bob's repo with 2 heads for the 2 content-divergent changesets, 5:541f and 6:e3a5; wc is at 5:541f; both are successors of obsolete 4:b2be, hence divergence] +.. figure:: figures/figure-sg09.svg + + Figure 9: Bob's repo with 2 heads for the 2 content-divergent changesets, + 5:541f and 6:e3a5; wc is at 5:541f; both are successors of obsolete 4:b2be, + hence divergence Now we need to get out of trouble. As usual, the answer is to evolve history. ::