Mercurial > hg
diff hgext/lfs/wrapper.py @ 35346:9eb19b13e92a
lfs: allow to run 'debugupgraderepo' on repo with largefiles
The extensions wrap the necessary function to ensure the 'lfs' requirements
won't be dropped.
It is now possible to run `hg debugupgraderepo` on a repository with lfs.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Thu, 07 Dec 2017 21:56:18 +0100 |
parents | 8887a45e3384 |
children | b0ba1539af01 |
line wrap: on
line diff
--- a/hgext/lfs/wrapper.py Thu Dec 07 20:27:03 2017 +0100 +++ b/hgext/lfs/wrapper.py Thu Dec 07 21:56:18 2017 +0100 @@ -302,3 +302,9 @@ remoteblob = repo.svfs.lfsremoteblobstore remoteblob.writebatch(pointers, repo.svfs.lfslocalblobstore) + +def upgraderequirements(orig, repo): + reqs = orig(repo) + if 'lfs' in repo.requirements: + reqs.add('lfs') + return reqs