Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/revlogutils/flagutil.py @ 42987:bd5858c28bbe
flagprocessors: have the read transform function return side data (API)
This makes it possible for flag processors to -read- flag data.
Differential Revision: https://phab.mercurial-scm.org/D6813
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 04 Sep 2019 00:34:03 +0200 |
parents | 66dc5a522f37 |
children | 36a0a1951d64 |
comparison
equal
deleted
inserted
replaced
42986:66dc5a522f37 | 42987:bd5858c28bbe |
---|---|
190 readtransform, writetransform, rawtransform = processor | 190 readtransform, writetransform, rawtransform = processor |
191 | 191 |
192 if operation == 'raw': | 192 if operation == 'raw': |
193 vhash = rawtransform(self, text) | 193 vhash = rawtransform(self, text) |
194 elif operation == 'read': | 194 elif operation == 'read': |
195 text, vhash = readtransform(self, text) | 195 text, vhash, s = readtransform(self, text) |
196 outsidedata.update(s) | |
196 else: # write operation | 197 else: # write operation |
197 text, vhash = writetransform(self, text) | 198 text, vhash = writetransform(self, text) |
198 validatehash = validatehash and vhash | 199 validatehash = validatehash and vhash |
199 | 200 |
200 return text, validatehash, outsidedata | 201 return text, validatehash, outsidedata |