##// 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 from __future__ import absolute_import
205 from __future__ import absolute_import
206
206
207 from mercurial import (
207 from mercurial import (
208 bundlecaches,
208 extensions,
209 extensions,
209 wireprotov1server,
210 wireprotov1server,
210 )
211 )
@@ -218,7 +219,7 b' def capabilities(orig, repo, proto):'
218 # Only advertise if a manifest exists. This does add some I/O to requests.
219 # Only advertise if a manifest exists. This does add some I/O to requests.
219 # But this should be cheaper than a wasted network round trip due to
220 # But this should be cheaper than a wasted network round trip due to
220 # missing file.
221 # missing file.
221 if repo.vfs.exists(b'clonebundles.manifest'):
222 if repo.vfs.exists(bundlecaches.CB_MANIFEST_FILE):
222 caps.append(b'clonebundles')
223 caps.append(b'clonebundles')
223
224
224 return caps
225 return caps
@@ -16,6 +16,8 b' from .utils import stringutil'
16
16
17 urlreq = util.urlreq
17 urlreq = util.urlreq
18
18
19 CB_MANIFEST_FILE = b'clonebundles.manifest'
20
19
21
20 @attr.s
22 @attr.s
21 class bundlespec(object):
23 class bundlespec(object):
@@ -31,6 +31,7 b' from . import ('
31 bookmarks,
31 bookmarks,
32 branchmap,
32 branchmap,
33 bundle2,
33 bundle2,
34 bundlecaches,
34 changegroup,
35 changegroup,
35 color,
36 color,
36 commit,
37 commit,
@@ -299,7 +300,7 b' class localpeer(repository.peer):'
299 return self._caps
300 return self._caps
300
301
301 def clonebundles(self):
302 def clonebundles(self):
302 return self._repo.tryread(b'clonebundles.manifest')
303 return self._repo.tryread(bundlecaches.CB_MANIFEST_FILE)
303
304
304 def debugwireargs(self, one, two, three=None, four=None, five=None):
305 def debugwireargs(self, one, two, three=None, four=None, five=None):
305 """Used to test argument passing over the wire"""
306 """Used to test argument passing over the wire"""
@@ -273,7 +273,7 b' def clonebundles(repo, proto):'
273 data center given the client's IP address.
273 data center given the client's IP address.
274 """
274 """
275 return wireprototypes.bytesresponse(
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