[PATCH 5 of 5 v4] changegroup3: enable on 'lfs' repo requirements
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Tue Nov 29 01:59:11 EST 2016
[cc martin because I've a question about some code mentioning 'treemanifest'
On 11/23/2016 06:39 PM, Remi Chaintron wrote:
> # HG changeset patch
> # User Remi Chaintron <remi at fb.com>
> # Date 1479916365 0
> # Wed Nov 23 15:52:45 2016 +0000
> # Branch stable
> # Node ID b421c16161aed491fec20b600df5f1278b07bc1a
> # Parent 75ee4746c198f039a39400e855e9335afc34f1dd
> changegroup3: enable on 'lfs' repo requirements
>
> `changegroup3` is required by the `lfs` extension in order to send flags for
> revlog objects over the wire.
It seems like the commit message needs to be updated too.
> diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py
> --- a/mercurial/changegroup.py
> +++ b/mercurial/changegroup.py
> @@ -879,14 +879,16 @@
> # Changegroup versions that can be applied to the repo
> def supportedincomingversions(repo):
> versions = allsupportedversions(repo.ui)
> - if 'treemanifest' in repo.requirements:
> + if ('treemanifest' in repo.requirements or
> + 'lfs' in repo.requirements):
> versions.add('03')
I've not seen 'lfs' used anywhere yet so this changeset seems a bit
premature. Given the code in this series I would expect the next step to
be a minimal usage of the new code (either by porting some of censor or
by using a test extension). Then we can start working on exchanging
these flagged changesets.
In addition, this piece of code is suspicious. If we have a changelog
'03' available, we should be using it. I'm not sure why we only consider
it when treemanifest is used. Martin: is this the remain of a period
where the '03' format was experimental? Did we actually tested the new
format now? Can we drop this special case?
> return versions
>
> # Changegroup versions that can be created from the repo
> def supportedoutgoingversions(repo):
> versions = allsupportedversions(repo.ui)
> - if 'treemanifest' in repo.requirements:
> + if ('treemanifest' in repo.requirements or
> + 'lfs' in repo.requirements):
> # Versions 01 and 02 support only flat manifests and it's just too
> # expensive to convert between the flat manifest and tree manifest on
> # the fly. Since tree manifests are hashed differently, all of history
> diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
> --- a/mercurial/localrepo.py
> +++ b/mercurial/localrepo.py
> @@ -238,7 +238,7 @@
> class localrepository(object):
>
> supportedformats = set(('revlogv1', 'generaldelta', 'treemanifest',
> - 'manifestv2'))
> + 'manifestv2', 'lfs'))
> _basesupported = supportedformats | set(('store', 'fncache', 'shared',
> 'dotencode'))
> openerreqs = set(('revlogv1', 'generaldelta', 'treemanifest', 'manifestv2'))
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>
--
Pierre-Yves David
More information about the Mercurial-devel
mailing list