Mercurial > public > mercurial-scm > hg-stable
diff hgext/lfs/wrapper.py @ 35509:2526579a30e0
lfs: allow non-lfs exchanges when the extension is only enabled on one side
Once the 'lfs' requirement is added, the extension must be loaded on both sides,
and changegroup3 used. But there's no reason that I can see for bailing with
cryptic errors if lfs is not required, but randomly enabled somewhere.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sun, 24 Dec 2017 01:26:36 -0500 |
parents | 5a73a0446afd |
children | fa865878a849 |
line wrap: on
line diff
--- a/hgext/lfs/wrapper.py Sat Dec 23 23:51:40 2017 -0500 +++ b/hgext/lfs/wrapper.py Sun Dec 24 01:26:36 2017 -0500 @@ -28,8 +28,9 @@ def supportedoutgoingversions(orig, repo): versions = orig(repo) - versions.discard('01') - versions.discard('02') + if 'lfs' in repo.requirements: + versions.discard('01') + versions.discard('02') versions.add('03') return versions