##// END OF EJS Templates
lfs: fix various signature mismatches for vfs subclasses...
Matt Harbison -
r52774:d6288776 default
parent child Browse files
Show More
@@ -15,6 +15,10 import os
15 15 import re
16 16 import socket
17 17
18 from typing import (
19 Optional,
20 )
21
18 22 from mercurial.i18n import _
19 23 from mercurial.node import hex
20 24
@@ -42,11 +46,11 from ..largefiles import lfutil
42 46
43 47
44 48 class lfsvfs(vfsmod.vfs):
45 def join(self, path):
49 def join(self, path: Optional[bytes], *insidef: bytes) -> bytes:
46 50 """split the path at first two characters, like: XX/XXXXX..."""
47 51 if not _lfsre.match(path):
48 52 raise error.ProgrammingError(b'unexpected lfs path: %s' % path)
49 return super(lfsvfs, self).join(path[0:2], path[2:])
53 return super(lfsvfs, self).join(path[0:2], path[2:], *insidef)
50 54
51 55 def walk(self, path=None, onerror=None):
52 56 """Yield (dirpath, [], oids) tuple for blobs under path
@@ -77,7 +81,7 class nullvfs(lfsvfs):
77 81 def __init__(self):
78 82 pass
79 83
80 def exists(self, oid):
84 def exists(self, path: Optional[bytes] = None) -> bool:
81 85 return False
82 86
83 87 def read(self, oid):
@@ -93,8 +97,8 class nullvfs(lfsvfs):
93 97 def walk(self, path=None, onerror=None):
94 98 return (b'', [], [])
95 99
96 def write(self, oid, data):
97 pass
100 def write(self, *args, **kwargs) -> int:
101 return 0
98 102
99 103
100 104 class lfsuploadfile(httpconnectionmod.httpsendfile):
General Comments 0
You need to be logged in to leave comments. Login now