New evolve docs: sharing guide

Greg Ward greg at gerg.ca
Mon Jun 16 01:16:33 UTC 2014


On 14 June 2014, timeless at gmail.com said:
> > This time, all the tests pass, so no further /amendment/ is required.
> 
> I'd sort of favor "amending"

Yeah. Agreed and fixed.

> > /None of/ our missteps /or/ amendments are
> visible publicly, just the final, beautifully polished changeset:
> 
> Neither - nor

On grounds of clarity or grammar? I'm pretty sure both versions are
grammatically sound. There is a subtle difference in meaning, which I
assume is clear to you. ;-) I slightly prefer my version.

> 
> ---
> > 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
> > 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``::
> >
> >  $ cd ../dev-repo
> >  $ hg pull -u
> >  [...]
> >  no changes found
> > Even though no *changesets* were pulled, Mercurial still pulled
> > obsolescence markers from ``test-repo``.
> 

> I'm assuming this means my next amend attempt over my current
> version will fail.

Easily verified by modifying the test script that mimics the document
(tests/test-sharing.t):

--- a/tests/test-sharing.t
+++ b/tests/test-sharing.t
@@ -149,6 +149,11 @@
   OBSEXC: pushing 4 markers (341 bytes)
   OBSEXC: DONE
 
+Now that the fix is public, we cannot amend it any more.
+  $ hg amend -m 'fix bug 37'
+  abort: cannot amend public changesets
+  [255]
+
 Figure SG05
   $ hg -R ../public shortlog -G
   o  1:de6151c48e1c  public  fix bug 37

Yes, you are correct!

> That's surprising.

Well, if it surprised you, it'll surprise someone else. I'll document
it.

> Doesn't this argue in favor of
> telling me that my current version has changed states?  

Maybe. I'm neutral, tending to skeptical. "hg push" already prints a
lot of information. Adding another line like "changing phase of
de6151c48e1c to public" might be interesting, but most people won't
notice it. They are somewhat more likely to notice

  abort: cannot amend public changesets

when they try to amend it. With luck, some might notice that their
desired amendments are still sitting in their working directory,
scroll back, see the error message, and understand their error! ;-)

> ---
> Please be consistent about capitalizing people (when you mean the people and not their repositories) or not capitalizing them at all. 

Oops. Fixed.

Thanks!

       Greg
-- 
Greg Ward                            http://www.gerg.ca
<greg at gerg.ca>                       @gergdotca



More information about the Evolve-testers mailing list