diff -r d30810d09d6f -r a54113fcc8c9 mercurial/changegroup.py --- a/mercurial/changegroup.py Sun Mar 04 09:58:57 2018 -0500 +++ b/mercurial/changegroup.py Mon Mar 26 23:02:50 2018 -0400 @@ -36,6 +36,8 @@ _CHANGEGROUPV2_DELTA_HEADER = "20s20s20s20s20s" _CHANGEGROUPV3_DELTA_HEADER = ">20s20s20s20s20sH" +LFS_REQUIREMENT = 'lfs' + # When narrowing is finalized and no longer subject to format changes, # we should move this to just "narrow" or similar. NARROW_REQUIREMENT = 'narrowhg-experimental' @@ -912,6 +914,12 @@ # support that for stripping and unbundling to work. versions.discard('01') versions.discard('02') + if LFS_REQUIREMENT in repo.requirements: + # Versions 01 and 02 don't support revlog flags, and we need to + # mark LFS entries with REVIDX_EXTSTORED. + versions.discard('01') + versions.discard('02') + return versions def localversion(repo):