Show More
@@ -88,11 +88,17 b' def addflagprocessor(flag, processor):' | |||||
88 | - Only one flag processor can be registered on a specific flag. |
|
88 | - Only one flag processor can be registered on a specific flag. | |
89 | - flagprocessors must be 3-tuples of functions (read, write, raw) with the |
|
89 | - flagprocessors must be 3-tuples of functions (read, write, raw) with the | |
90 | following signatures: |
|
90 | following signatures: | |
91 |
- (read) f(self, text) -> |
|
91 | - (read) f(self, rawtext) -> text, bool | |
92 |
- (write) f(self, text) -> |
|
92 | - (write) f(self, text) -> rawtext, bool | |
93 | - (raw) f(self, text) -> bool |
|
93 | - (raw) f(self, rawtext) -> bool | |
|
94 | "text" is presented to the user. "rawtext" is stored in revlog data, not | |||
|
95 | directly visible to the user. | |||
94 | The boolean returned by these transforms is used to determine whether |
|
96 | The boolean returned by these transforms is used to determine whether | |
95 |
|
|
97 | the returned text can be used for hash integrity checking. For example, | |
|
98 | if "write" returns False, then "text" is used to generate hash. If | |||
|
99 | "write" returns True, that basically means "rawtext" returned by "write" | |||
|
100 | should be used to generate hash. Usually, "write" and "read" return | |||
|
101 | different booleans. And "raw" returns a same boolean as "write". | |||
96 |
|
102 | |||
97 | Note: The 'raw' transform is used for changegroup generation and in some |
|
103 | Note: The 'raw' transform is used for changegroup generation and in some | |
98 | debug commands. In this case the transform only indicates whether the |
|
104 | debug commands. In this case the transform only indicates whether the |
General Comments 0
You need to be logged in to leave comments.
Login now