diff hgext/remotefilelog/shallowbundle.py @ 40509:ed19958dbf5d

remotefilelog: consolidate and rename bundle2 capability Bonus: we catch a spot where the shallowrepo requirement was being misused as the bundle2 capability. Differential Revision: https://phab.mercurial-scm.org/D5127
author Augie Fackler <augie@google.com>
date Tue, 16 Oct 2018 17:30:47 -0400
parents 3a333a582d7b
children fc2766860796
line wrap: on
line diff
--- a/hgext/remotefilelog/shallowbundle.py	Tue Oct 16 16:38:40 2018 -0400
+++ b/hgext/remotefilelog/shallowbundle.py	Tue Oct 16 17:30:47 2018 -0400
@@ -17,6 +17,7 @@
     pycompat,
 )
 from . import (
+    constants,
     remotefilelog,
     shallowutil,
 )
@@ -100,7 +101,7 @@
 
         caps = self._bundlecaps or []
         if source == "serve" or source == "pull":
-            if 'remotefilelog' in caps:
+            if constants.BUNDLE2_CAPABLITY in caps:
                 return LocalFiles
             else:
                 # Serving to a full repo requires us to serve everything