##// END OF EJS Templates
filelog: record what's using attributes...
Gregory Szorc -
r39819:76f92d20 default
parent child Browse files
Show More
@@ -22,10 +22,14 b' class filelog(object):'
22 self._revlog = revlog.revlog(opener,
22 self._revlog = revlog.revlog(opener,
23 '/'.join(('data', path + '.i')),
23 '/'.join(('data', path + '.i')),
24 censorable=True)
24 censorable=True)
25 # full name of the user visible file, relative to the repository root
25 # Full name of the user visible file, relative to the repository root.
26 # Used by LFS.
26 self.filename = path
27 self.filename = path
28 # Used by repo upgrade.
27 self.index = self._revlog.index
29 self.index = self._revlog.index
30 # Used by verify.
28 self.version = self._revlog.version
31 self.version = self._revlog.version
32 # Used by changegroup generation.
29 self._generaldelta = self._revlog._generaldelta
33 self._generaldelta = self._revlog._generaldelta
30
34
31 def __len__(self):
35 def __len__(self):
@@ -55,21 +59,25 b' class filelog(object):'
55 def linkrev(self, rev):
59 def linkrev(self, rev):
56 return self._revlog.linkrev(rev)
60 return self._revlog.linkrev(rev)
57
61
62 # Used by LFS, verify.
58 def flags(self, rev):
63 def flags(self, rev):
59 return self._revlog.flags(rev)
64 return self._revlog.flags(rev)
60
65
61 def commonancestorsheads(self, node1, node2):
66 def commonancestorsheads(self, node1, node2):
62 return self._revlog.commonancestorsheads(node1, node2)
67 return self._revlog.commonancestorsheads(node1, node2)
63
68
69 # Used by dagop.blockdescendants().
64 def descendants(self, revs):
70 def descendants(self, revs):
65 return self._revlog.descendants(revs)
71 return self._revlog.descendants(revs)
66
72
73 # Used by hgweb.
67 def headrevs(self):
74 def headrevs(self):
68 return self._revlog.headrevs()
75 return self._revlog.headrevs()
69
76
70 def heads(self, start=None, stop=None):
77 def heads(self, start=None, stop=None):
71 return self._revlog.heads(start, stop)
78 return self._revlog.heads(start, stop)
72
79
80 # Used by hgweb, children extension.
73 def children(self, node):
81 def children(self, node):
74 return self._revlog.children(node)
82 return self._revlog.children(node)
75
83
@@ -79,9 +87,11 b' class filelog(object):'
79 def iscensored(self, rev):
87 def iscensored(self, rev):
80 return self._revlog.iscensored(rev)
88 return self._revlog.iscensored(rev)
81
89
90 # Used by verify.
82 def rawsize(self, rev):
91 def rawsize(self, rev):
83 return self._revlog.rawsize(rev)
92 return self._revlog.rawsize(rev)
84
93
94 # Might be unused.
85 def checkhash(self, text, node, p1=None, p2=None, rev=None):
95 def checkhash(self, text, node, p1=None, p2=None, rev=None):
86 return self._revlog.checkhash(text, node, p1=p1, p2=p2, rev=rev)
96 return self._revlog.checkhash(text, node, p1=p1, p2=p2, rev=rev)
87
97
@@ -117,6 +127,7 b' class filelog(object):'
117 def files(self):
127 def files(self):
118 return self._revlog.files()
128 return self._revlog.files()
119
129
130 # Used by verify.
120 def checksize(self):
131 def checksize(self):
121 return self._revlog.checksize()
132 return self._revlog.checksize()
122
133
@@ -182,6 +193,10 b' class filelog(object):'
182
193
183 return True
194 return True
184
195
196 # TODO these aren't part of the interface and aren't internal methods.
197 # Callers should be fixed to not use them.
198
199 # Used by LFS.
185 @property
200 @property
186 def filename(self):
201 def filename(self):
187 return self._revlog.filename
202 return self._revlog.filename
@@ -190,8 +205,7 b' class filelog(object):'
190 def filename(self, value):
205 def filename(self, value):
191 self._revlog.filename = value
206 self._revlog.filename = value
192
207
193 # TODO these aren't part of the interface and aren't internal methods.
208 # Used by bundlefilelog, unionfilelog.
194 # Callers should be fixed to not use them.
195 @property
209 @property
196 def indexfile(self):
210 def indexfile(self):
197 return self._revlog.indexfile
211 return self._revlog.indexfile
@@ -200,10 +214,12 b' class filelog(object):'
200 def indexfile(self, value):
214 def indexfile(self, value):
201 self._revlog.indexfile = value
215 self._revlog.indexfile = value
202
216
217 # Used by LFS, repo upgrade.
203 @property
218 @property
204 def opener(self):
219 def opener(self):
205 return self._revlog.opener
220 return self._revlog.opener
206
221
222 # Used by repo upgrade.
207 def clone(self, tr, destrevlog, **kwargs):
223 def clone(self, tr, destrevlog, **kwargs):
208 if not isinstance(destrevlog, filelog):
224 if not isinstance(destrevlog, filelog):
209 raise error.ProgrammingError('expected filelog to clone()')
225 raise error.ProgrammingError('expected filelog to clone()')
General Comments 0
You need to be logged in to leave comments. Login now