##// END OF EJS Templates
flagprocessors: directly duplicate the deprecated layer back into revlog...
marmoute -
r43263:01304095 default
parent child Browse files
Show More
@@ -22,6 +22,7 b' from mercurial import ('
22 22 error,
23 23 mdiff,
24 24 revlog,
25 util,
25 26 )
26 27 from mercurial.utils import storageutil
27 28 from mercurial.revlogutils import flagutil
@@ -307,6 +308,17 b' class remotefilelog(flagutil.flagprocess'
307 308 'remotefilelog does not convert integer rev to node')
308 309 return rev
309 310
311 def _processflags(self, text, flags, operation, raw=False):
312 """deprecated entry point to access flag processors"""
313 msg = ('_processflag(...) use the specialized variant')
314 util.nouideprecwarn(msg, '5.2', stacklevel=2)
315 if raw:
316 return text, flagutil.processflagsraw(self, text, flags)
317 elif operation == 'read':
318 return flagutil.processflagsread(self, text, flags)
319 else: # write operation
320 return flagutil.processflagswrite(self, text, flags)
321
310 322 def revision(self, node, raw=False):
311 323 """returns the revlog contents at this node.
312 324 this includes the meta data traditionally included in file revlogs.
@@ -1601,6 +1601,17 b' class revlog(flagutil.flagprocessorsmixi'
1601 1601 return mdiff.textdiff(self.rawdata(rev1),
1602 1602 self.rawdata(rev2))
1603 1603
1604 def _processflags(self, text, flags, operation, raw=False):
1605 """deprecated entry point to access flag processors"""
1606 msg = ('_processflag(...) use the specialized variant')
1607 util.nouideprecwarn(msg, '5.2', stacklevel=2)
1608 if raw:
1609 return text, flagutil.processflagsraw(self, text, flags)
1610 elif operation == 'read':
1611 return flagutil.processflagsread(self, text, flags)
1612 else: # write operation
1613 return flagutil.processflagswrite(self, text, flags)
1614
1604 1615 def revision(self, nodeorrev, _df=None, raw=False):
1605 1616 """return an uncompressed revision of a given node or revision
1606 1617 number.
@@ -89,17 +89,6 b' class flagprocessorsmixin(object):'
89 89
90 90 _flagserrorclass = error.RevlogError
91 91
92 def _processflags(self, text, flags, operation, raw=False):
93 """deprecated entry point to access flag processors"""
94 msg = ('_processflag(...) use the specialized variant')
95 util.nouideprecwarn(msg, '5.2', stacklevel=2)
96 if raw:
97 return text, processflagsraw(self, text, flags)
98 elif operation == 'read':
99 return processflagsread(self, text, flags)
100 else: # write operation
101 return processflagswrite(self, text, flags)
102
103 92 def processflagswrite(revlog, text, flags, sidedata):
104 93 """Inspect revision data flags and applies write transformations defined
105 94 by registered flag processors.
General Comments 0
You need to be logged in to leave comments. Login now