diff docs/sharing.rst @ 1263:eb0a1d1d499b stable

docs: sharing guide: clarify end-game of "Example 2" - push to dev-repo, rather than pulling into it (consistent with how we work the multiple developer scenario later) - explicitly demonstrate that public changesets are immutable
author Greg Ward <greg@gerg.ca>
date Tue, 14 Apr 2015 12:55:04 -0400
parents eff1acc2511c
children 33ed6119a0be
line wrap: on
line diff
--- a/docs/sharing.rst	Sun Jun 15 21:17:09 2014 -0400
+++ b/docs/sharing.rst	Tue Apr 14 12:55:04 2015 -0400
@@ -258,19 +258,28 @@
 
 There is one important step left to do. Because we pushed from
 ``test-repo`` to ``public``, the pushed changeset is in *public* phase
-in those two repositories. But ``dev-repo`` knows nothing of this:
-that changeset is still *draft* there. If we're not careful, we might
+in those two repositories. But ``dev-repo`` has been out-of-the-loop;
+changeset de61 is still *draft* there. If we're not careful, we might
 mutate history in ``dev-repo``, obsoleting a changeset that is already
-public. Let's avoid that situation for now by pulling from
-``test-repo`` down to ``dev-repo``::
+public. Let's avoid that situation for now by pushing up to
+``dev-repo``::
 
-  $ cd ../dev-repo
-  $ hg pull -u
-  [...]
+  $ hg push ../dev-repo
+  pushing to ../dev-repo
+  searching for changes
   no changes found
 
-Even though no *changesets* were pulled, Mercurial still pulled
-obsolescence markers from ``test-repo``.
+Even though no *changesets* were pushed, Mercurial still pushed
+obsolescence markers and phase changes to ``dev-repo``.
+
+A final note: since this fix is now *public*, it is immutable. It's no
+longer possible to amend it::
+
+  $ hg amend -m 'fix bug 37'
+  abort: cannot amend public changesets
+
+This is, after all, the whole point of Mercurial's phases: to prevent
+rewriting history that has already been published.
 
 Sharing with multiple developers: code review
 ---------------------------------------------