Mercurial > public > mercurial-scm > hg
comparison mercurial/changegroup.py @ 37132:a54113fcc8c9
lfs: move the 'supportedoutgoingversions' handling to changegroup.py
This handling already exists here for the narrow extension. We still need to
either figure out how to enable changegroup v3 without the extension, or figure
out how to let the server detect that the client doesn't have it loaded, and
emit a user friendly error[1]. I can't tell if D1944 is the appropriate vehicle
for the latter.
[1] https://www.mercurial-scm.org/pipermail/mercurial-devel/2018-January/109550.html
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Mon, 26 Mar 2018 23:02:50 -0400 |
parents | f0b6fbea00cf |
children | 5859800edfc5 |
comparison
equal
deleted
inserted
replaced
37131:d30810d09d6f | 37132:a54113fcc8c9 |
---|---|
33 ) | 33 ) |
34 | 34 |
35 _CHANGEGROUPV1_DELTA_HEADER = "20s20s20s20s" | 35 _CHANGEGROUPV1_DELTA_HEADER = "20s20s20s20s" |
36 _CHANGEGROUPV2_DELTA_HEADER = "20s20s20s20s20s" | 36 _CHANGEGROUPV2_DELTA_HEADER = "20s20s20s20s20s" |
37 _CHANGEGROUPV3_DELTA_HEADER = ">20s20s20s20s20sH" | 37 _CHANGEGROUPV3_DELTA_HEADER = ">20s20s20s20s20sH" |
38 | |
39 LFS_REQUIREMENT = 'lfs' | |
38 | 40 |
39 # When narrowing is finalized and no longer subject to format changes, | 41 # When narrowing is finalized and no longer subject to format changes, |
40 # we should move this to just "narrow" or similar. | 42 # we should move this to just "narrow" or similar. |
41 NARROW_REQUIREMENT = 'narrowhg-experimental' | 43 NARROW_REQUIREMENT = 'narrowhg-experimental' |
42 | 44 |
910 if NARROW_REQUIREMENT in repo.requirements: | 912 if NARROW_REQUIREMENT in repo.requirements: |
911 # Versions 01 and 02 don't support revlog flags, and we need to | 913 # Versions 01 and 02 don't support revlog flags, and we need to |
912 # support that for stripping and unbundling to work. | 914 # support that for stripping and unbundling to work. |
913 versions.discard('01') | 915 versions.discard('01') |
914 versions.discard('02') | 916 versions.discard('02') |
917 if LFS_REQUIREMENT in repo.requirements: | |
918 # Versions 01 and 02 don't support revlog flags, and we need to | |
919 # mark LFS entries with REVIDX_EXTSTORED. | |
920 versions.discard('01') | |
921 versions.discard('02') | |
922 | |
915 return versions | 923 return versions |
916 | 924 |
917 def localversion(repo): | 925 def localversion(repo): |
918 # Finds the best version to use for bundles that are meant to be used | 926 # Finds the best version to use for bundles that are meant to be used |
919 # locally, such as those from strip and shelve, and temporary bundles. | 927 # locally, such as those from strip and shelve, and temporary bundles. |