##// END OF EJS Templates
clonebundle: move the manifest filename to a constant...
marmoute -
r46370:80f32ec8 default
parent child Browse files
Show More
@@ -205,6 +205,7 b' Mercurial server when the bundle hosting'
205 205 from __future__ import absolute_import
206 206
207 207 from mercurial import (
208 bundlecaches,
208 209 extensions,
209 210 wireprotov1server,
210 211 )
@@ -218,7 +219,7 b' def capabilities(orig, repo, proto):'
218 219 # Only advertise if a manifest exists. This does add some I/O to requests.
219 220 # But this should be cheaper than a wasted network round trip due to
220 221 # missing file.
221 if repo.vfs.exists(b'clonebundles.manifest'):
222 if repo.vfs.exists(bundlecaches.CB_MANIFEST_FILE):
222 223 caps.append(b'clonebundles')
223 224
224 225 return caps
@@ -16,6 +16,8 b' from .utils import stringutil'
16 16
17 17 urlreq = util.urlreq
18 18
19 CB_MANIFEST_FILE = b'clonebundles.manifest'
20
19 21
20 22 @attr.s
21 23 class bundlespec(object):
@@ -31,6 +31,7 b' from . import ('
31 31 bookmarks,
32 32 branchmap,
33 33 bundle2,
34 bundlecaches,
34 35 changegroup,
35 36 color,
36 37 commit,
@@ -299,7 +300,7 b' class localpeer(repository.peer):'
299 300 return self._caps
300 301
301 302 def clonebundles(self):
302 return self._repo.tryread(b'clonebundles.manifest')
303 return self._repo.tryread(bundlecaches.CB_MANIFEST_FILE)
303 304
304 305 def debugwireargs(self, one, two, three=None, four=None, five=None):
305 306 """Used to test argument passing over the wire"""
@@ -273,7 +273,7 b' def clonebundles(repo, proto):'
273 273 data center given the client's IP address.
274 274 """
275 275 return wireprototypes.bytesresponse(
276 repo.vfs.tryread(b'clonebundles.manifest')
276 repo.vfs.tryread(bundlecaches.CB_MANIFEST_FILE)
277 277 )
278 278
279 279
General Comments 0
You need to be logged in to leave comments. Login now