docs/sharing.rst
branchstable
changeset 4937 0d1893c1044c
parent 4936 deec516b6e34
child 4973 f3faafa1e064
--- 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. ::