[PATCH 2 of 2] lfs: migrate most file filtering from threshold to custom filter

Matt Harbison mharbison72 at gmail.com
Tue Jan 16 21:42:33 EST 2018


On Tue, 16 Jan 2018 08:20:32 -0500, Boris Feld <boris.feld at octobus.net>  
wrote:

> On Tue, 2018-01-16 at 08:05 -0500, Matt Harbison wrote:
>> On Jan 16, 2018, at 5:26 AM, Boris Feld <boris.feld at octobus.net>
>> wrote:
>>
>> > I checked the precursors revset and the behavior is not the one
>> > expected, thank you for pointing that.
>> >
>> >
>> > I also realized that the revset is in Evolve and not in Core, which
>> > makes it a good opportunity to upstream it.
>> >
>> > I'm not sure if we should keep only the equivalent of
>> > allprecursors(),
>> > what about having a predecessor() and allpredecessors() revsets.
>> >
>> > predecessors() would returns the closests locally known
>> > predecessors,
>> > like the {predecessors} template keyword while allpredecessors()
>> > would
>> > returns all the locally known predecessors.
>> >
>> > What do you think?
>>
>> I think a dedicated revset to find the first generation, for lack of
>> a better word, of predecessors is useful.  I use it all the time to
>> ensure rebase/evolve conflict resolution didn’t drop anything, though
>> it only works if it wasn’t split or folded.
>
> I think the term we used is closest predecessor, at least we have a
> function named closestpredecessors in obsutil.py.
>
>> There was a proposal for short handing something like this, so maybe
>> a dedicated predicate won’t be needed in the future.  But it would be
>> nice if the template and revset agreed, and I don’t see an “all”
>> template as being as useful as the current one.
>>
>>
>> http://mercurial.markmail.org/thread/sjnnwa43s4eksu62
>>
>
> I was not aware of this proposal. I think a dedicated predicate would
> be usefull too to have more verbose and more readable templates.
>
> When you are speaking about an "all" tempalte, do you means that you
> don't think an "allpredecessors" template would be usefull in core?

I meant "allpredecessors", yes.

I'm not against adding it, I just can't immediately think of a use for a  
list that could encompass splits -> folds -> resplits -> etc.  I'm fine  
with Yuya's idea of a limit parameter, though that's more typing so a  
shortcut would be nice.  I tend to spell out templates/args/etc in scripts  
for clarity, but that's a tiny fraction of my usage.


More information about the Mercurial-devel mailing list