[PATCH 2 of 2 RFC V2] largefiles: abort push on server when file fit largefiles (issue3245)

Yuya Nishihara yuya at tcha.org
Tue Aug 30 13:29:58 UTC 2016


On Fri, 26 Aug 2016 08:23:13 +0200, liscju wrote:
> # HG changeset patch
> # User liscju <piotr.listkiewicz at gmail.com>
> # Date 1472122627 -7200
> #      Thu Aug 25 12:57:07 2016 +0200
> # Node ID cc9384381d9f7995947b7294df1d7f8b5188237d
> # Parent  7fa71874c771a76bcc0e04d77e435242b9b3ad12
> largefiles: abort push on server when file fit largefiles  (issue3245)

> +def _checkhook(ui, repo, node):
> +    # Get revisions to check
> +    revs = set()
> +    for rev in xrange(repo[node].rev(), len(repo)):
> +        revs.add(rev)

Better to use node_last value. See d6d3cf5fda6f for why. And we'll need to
skip hidden revs by e.g. repo.changelog.revs().



More information about the Mercurial-devel mailing list