Mercurial > public > mercurial-scm > hg
diff hgext/lfs/wrapper.py @ 39851:1f7b3b980af8
lfs: add repository feature denoting the use of LFS
Whether LFS is enabled seems like a useful feature to expose. This
will also facilitate some future work around LFS feature compatibility.
Differential Revision: https://phab.mercurial-scm.org/D4710
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Wed, 19 Sep 2018 13:48:59 -0700 |
parents | d3d4b4b5f725 |
children | bcf72d7b1524 |
line wrap: on
line diff
--- a/hgext/lfs/wrapper.py Wed Sep 19 14:36:57 2018 -0700 +++ b/hgext/lfs/wrapper.py Wed Sep 19 13:48:59 2018 -0700 @@ -14,6 +14,7 @@ from mercurial import ( error, + repository, revlog, util, ) @@ -29,6 +30,12 @@ pointer, ) +def localrepomakefilestorage(orig, requirements, features, **kwargs): + if b'lfs' in requirements: + features.add(repository.REPO_FEATURE_LFS) + + return orig(requirements=requirements, features=features, **kwargs) + def allsupportedversions(orig, ui): versions = orig(ui) versions.add('03')