[Updated] D9209: clonebundle: move the manifest filename to a constant
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Thu Oct 29 02:00:07 UTC 2020
Closed by commit rHG80f32ec8653a: clonebundle: move the manifest filename to a constant (authored by marmoute).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D9209?vs=23210&id=23339
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D9209/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D9209
AFFECTED FILES
hgext/clonebundles.py
mercurial/bundlecaches.py
mercurial/localrepo.py
mercurial/wireprotov1server.py
CHANGE DETAILS
diff --git a/mercurial/wireprotov1server.py b/mercurial/wireprotov1server.py
--- a/mercurial/wireprotov1server.py
+++ b/mercurial/wireprotov1server.py
@@ -273,7 +273,7 @@
data center given the client's IP address.
"""
return wireprototypes.bytesresponse(
- repo.vfs.tryread(b'clonebundles.manifest')
+ repo.vfs.tryread(bundlecaches.CB_MANIFEST_FILE)
)
diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -31,6 +31,7 @@
bookmarks,
branchmap,
bundle2,
+ bundlecaches,
changegroup,
color,
commit,
@@ -299,7 +300,7 @@
return self._caps
def clonebundles(self):
- return self._repo.tryread(b'clonebundles.manifest')
+ return self._repo.tryread(bundlecaches.CB_MANIFEST_FILE)
def debugwireargs(self, one, two, three=None, four=None, five=None):
"""Used to test argument passing over the wire"""
diff --git a/mercurial/bundlecaches.py b/mercurial/bundlecaches.py
--- a/mercurial/bundlecaches.py
+++ b/mercurial/bundlecaches.py
@@ -16,6 +16,8 @@
urlreq = util.urlreq
+CB_MANIFEST_FILE = b'clonebundles.manifest'
+
@attr.s
class bundlespec(object):
diff --git a/hgext/clonebundles.py b/hgext/clonebundles.py
--- a/hgext/clonebundles.py
+++ b/hgext/clonebundles.py
@@ -205,6 +205,7 @@
from __future__ import absolute_import
from mercurial import (
+ bundlecaches,
extensions,
wireprotov1server,
)
@@ -218,7 +219,7 @@
# Only advertise if a manifest exists. This does add some I/O to requests.
# But this should be cheaper than a wasted network round trip due to
# missing file.
- if repo.vfs.exists(b'clonebundles.manifest'):
+ if repo.vfs.exists(bundlecaches.CB_MANIFEST_FILE):
caps.append(b'clonebundles')
return caps
To: marmoute, #hg-reviewers
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20201029/128ebf55/attachment-0002.html>
More information about the Mercurial-patches
mailing list