[PATCH 11 of 11] obsfate: add obsfate to default mapfile

Boris Feld boris.feld at octobus.net
Tue Oct 10 03:01:21 EDT 2017


On Tue, 2017-10-10 at 03:13 +0530, Pulkit Goyal wrote:
> On Tue, Oct 10, 2017 at 12:10 AM, Boris Feld <boris.feld at octobus.net>
> wrote:
> > # HG changeset patch
> > # User Boris Feld <boris.feld at octobus.net>
> > # Date 1507305216 -7200
> > #      Fri Oct 06 17:53:36 2017 +0200
> > # Node ID ab0796c0fbce5d8314511bf08ea5b6b4cf0b9dfc
> > # Parent  1943f74e8e4cb6bd1d44910898fffcaec7a56ca1
> > # EXP-Topic obsfatekeyword
> > # Available At https://bitbucket.org/octobus/mercurial-devel/
> > #              hg pull https://bitbucket.org/octobus/mercurial-deve
> > l/ -r ab0796c0fbce
> > obsfate: add obsfate to default mapfile
> 
> [snip]
> 
> > +# Obsfate templates
> > +lobsfate = '{if(obsfate, "{label('log.obsfate', '{obsfate %
> > "obsfate:     {fate}\n"}')}")}'
> > diff -r 1943f74e8e4c -r ab0796c0fbce tests/test-obsmarker-
> > template.t
> > --- a/tests/test-obsmarker-template.t   Thu Oct 05 15:25:18 2017
> > +0200
> > +++ b/tests/test-obsmarker-template.t   Fri Oct 06 17:53:36 2017
> > +0200
> > @@ -117,7 +117,27 @@
> >    | @  changeset:   1:471f378eab4c
> >    |/   user:        test
> >    |    date:        Thu Jan 01 00:00:00 1970 +0000
> > -  |    obsfate:     rewritten using amend as 3:d004c8f274b9 by
> > test2
> > +  |    obsfate:     rewritten using amend as 3:d004c8f274b9 by
> > test, test2
> 
> ^ this one
> 
> > +  |    summary:     A0
> > +  |
> > +  o  changeset:   0:ea207398892e
> > +     user:        test
> > +     date:        Thu Jan 01 00:00:00 1970 +0000
> > +     summary:     ROOT
> > +
> > +
> > +  $ hg log -G -T "default"
> > +  o  changeset:   3:d004c8f274b9
> > +  |  tag:         tip
> > +  |  parent:      0:ea207398892e
> > +  |  user:        test
> > +  |  date:        Thu Jan 01 00:00:00 1970 +0000
> > +  |  summary:     A2
> > +  |
> > +  | @  changeset:   1:471f378eab4c
> > +  |/   user:        test
> > +  |    date:        Thu Jan 01 00:00:00 1970 +0000
> > +  |    obsfate:     rewritten using amend as 3:d004c8f274b9 by
> > test, test2
> 
> ^ this one
> 
> >    |    summary:     A0
> >    |
> >    o  changeset:   0:ea207398892e
> > @@ -264,6 +284,71 @@
> >    |/     Obsfate: rewritten using amend as 2:a468dc9b3633 by test
> > (at 2009-02-13 23:31 +0000)
> >    o  ea207398892e
> 
> I am bit confused by two of the outputs above. They say `rewritten
> using amend as XXXX by test, test2`. Does that mean test did some
> amend, then test2 did some amend and the resulting changeset is XXXX.
> This more or sounds like they performed the amend together and the
> resulting changeset is XXXX.

The outputs mean that 471f378eab4c has been rewritten and it tipmost
successor is XXX. From 471f378eab4c to XXX, it has been rewritten
several times (we don't show how many times, maybe we could in verbose
mode) resulting in as many obs-markers. The set of users from these
obs-markers is {'test', 'test2'}.

The order is not significant here, we just sorted the resulting set for
display.

The output might not be precise enough as it can match all these
scenarios:
- test amended the changeset, then test2 amended the changeset
- test2 amended the changeset, then test amended the changeset
- test amended 100 times the changeset, then test2 amended once the
changeset
- test and test2 amended the changeset successively a hundred of times.

What we are sure with this output:
- test has amended at least once
- test2 has amended at least once
- no other users amended this changeset or its successors


> If this has been discussed earlier, feel free to ignore me as I
> missed
> couple of obsfate series earlier I guess.




More information about the Mercurial-devel mailing list