[PATCH] largefiles: ignore hidden changesets with 'verify --large --lfa'
mharbison72 at gmail.com
Mon Jun 8 21:55:59 CDT 2015
On Mon, 08 Jun 2015 22:16:20 -0400, Pierre-Yves David
<pierre-yves.david at ens-lyon.org> wrote:
> On 06/08/2015 05:52 PM, Matt Harbison wrote:
>> # HG changeset patch
>> # User Matt Harbison <matt_harbison at yahoo.com>
>> # Date 1433643018 14400
>> # Sat Jun 06 22:10:18 2015 -0400
>> # Node ID 7beb2d6c7bf755f83293e9780b82a2632fc2918a
>> # Parent 378a8e700e02794e991d3521423a4f581b635666
>> largefiles: ignore hidden changesets with 'verify --large --lfa'
>> Previously, if there were any hidden changesets, the --lfa argument
>> would cause
>> the command to abort with a hint about using --hidden when it tripped
>> over a
>> hidden changeset.
> do you want operation on an unfiltered repository instead?
I thought about it, but I guess there's the potential for a largefile to
be amended, and the original cset hidden. So why bother verifying the
hidden file if --hidden isn't specified? It seems that this way, both
visible and visible + --hidden are possible, depending on what the user
>> diff --git a/hgext/largefiles/lfcommands.py
>> --- a/hgext/largefiles/lfcommands.py
>> +++ b/hgext/largefiles/lfcommands.py
>> @@ -364,9 +364,7 @@
>> matches the revision ID). With --all, check every changeset in
>> this repository.'''
>> if all:
>> - # Pass a list to the function rather than an iterator because
>> we know a
>> - # list will work.
>> - revs = range(len(repo))
>> + revs = repo.revs('all()')
> (in all cases)
> revs = iter(repo.changelog) ? (not convince it is so much better)
The method 'revs' is passed to does 'len(revs)', which revset handles.
But this seems to work:
revs = list(repo.changelog)
I was thinking about a followup with repo.revs("filelog('path:.hglf/')")
to drop some of this manual processing here, but couldn't get it to work.
I can resend with the list(..) if there aren't any issues with that.
More information about the Mercurial-devel