[PATCH 3 of 5] clonebundle: use 'repo.vfs' instead of 'repo.opener'
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Wed Mar 1 21:58:43 EST 2017
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
# Date 1488421398 -3600
# Thu Mar 02 03:23:18 2017 +0100
# Node ID dc2ae1022304ad29959c52e1f549bb05472e9f43
# Parent 66df771e26f3e26aa2000b150427852fb8c88bf3
# EXP-Topic vfs.cleanup
clonebundle: use 'repo.vfs' instead of 'repo.opener'
The later is a 5 years old form.
diff --git a/hgext/clonebundles.py b/hgext/clonebundles.py
--- a/hgext/clonebundles.py
+++ b/hgext/clonebundles.py
@@ -177,7 +177,7 @@ def capabilities(orig, repo, proto):
# 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.opener.exists('clonebundles.manifest'):
+ if repo.vfs.exists('clonebundles.manifest'):
caps.append('clonebundles')
return caps
diff --git a/mercurial/wireproto.py b/mercurial/wireproto.py
--- a/mercurial/wireproto.py
+++ b/mercurial/wireproto.py
@@ -736,7 +736,7 @@ def clonebundles(repo, proto):
depending on the request. e.g. you could advertise URLs for the closest
data center given the client's IP address.
"""
- return repo.opener.tryread('clonebundles.manifest')
+ return repo.vfs.tryread('clonebundles.manifest')
wireprotocaps = ['lookup', 'changegroupsubset', 'branchmap', 'pushkey',
'known', 'getbundle', 'unbundlehash', 'batch']
More information about the Mercurial-devel
mailing list