clonebundle: use 'repo.vfs' instead of 'repo.opener'
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Thu, 02 Mar 2017 03:23:18 +0100
changeset 31146 16d8bec0177d
parent 31145 11a97785f75c
child 31147 e04ab2a5bf90
clonebundle: use 'repo.vfs' instead of 'repo.opener' The later is a 5 years old form.
hgext/clonebundles.py
mercurial/wireproto.py
--- a/hgext/clonebundles.py	Fri Aug 05 13:53:45 2016 +0200
+++ b/hgext/clonebundles.py	Thu Mar 02 03:23:18 2017 +0100
@@ -177,7 +177,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.opener.exists('clonebundles.manifest'):
+    if repo.vfs.exists('clonebundles.manifest'):
         caps.append('clonebundles')
 
     return caps
--- a/mercurial/wireproto.py	Fri Aug 05 13:53:45 2016 +0200
+++ b/mercurial/wireproto.py	Thu Mar 02 03:23:18 2017 +0100
@@ -736,7 +736,7 @@
     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']