On Thu, 17 Aug 2017 16:43:11 +0200, Boris Feld wrote:
> On Wed, 2017-08-09 at 22:42 +0900, Yuya Nishihara wrote:
> > In which case, {successorsset} could populate markers by makemap(),
> > 
> >   successorssets % "{successorset} {obsmarkers}"
> >                                    ^^^^^^^^^^^^
> >                                no idea how this should be rendered,
> > but
> >                                let's revisit it later.
> 
> I tried modifying successorssets to smuggle the markers via makemap but
> it has one limitation.
> 
> In the case of pruned commits, we would have an empty successorsset but
> at least one marker (the marker for pruning). Adding markers via
> makemap would make the following condition: if(succsandmarkers, ...)
> false for pruned markers.
> 
> I propose to keep succsandmarkers but hex all node ids so we would
> never see binary information.

Good point. I have no better idea right now then, though I think
{succsandmarkers} exposes the implementation detail which a typical user
shouldn't have to understand.

> > and perhaps obsfate could take the pair explicitly or implicitly.
> > 
> >   successorsets % "{obsfate(successorset, obsmarkers)}"  # a function
> >   successorsets % "{obsfate}"  # a keyword available only in
> > successorsets
> > 
> > obsfate could be even split to verb/users/mindate/maxdate.
> > 
> >   successorsets % "{obsverb} {obsusers} ..."
> >                    ^^^^^^^^^^^^^^^^^^^^
> >                  these keyword functions may be populated by
> > makemap(), too.
> 
> I tried splitting obsfate into several functions and it looks nicer. I
> prefer functions instead of keywords because keywords feels too magic,

Perhaps that depends on how useful the function interface will be. Can we
pass another pair of successorset and obsmarkers which isn't generated by
{succsandmarkers} ?

> do we have already some keywords that are similar (not taking context
> as inputs) in core?

There are a few examples of not depending on the current context (e.g.
termwidth), but they aren't similar to the obsfate stuff.

> I have a rough series splitting obsfate(succsandmarkers) into
> obsfateverb(successorset, markers), obsfateusers(successorset,
> markers), ... Should I finish it and send a V2?

Well, since we don't seem to have any better idea, and these features are
experimental, it's probably a good move to start with that.
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to