Show More
@@ -144,6 +144,22 b' def _mtimehash(paths):' | |||||
144 | pass |
|
144 | pass | |
145 | return _hashlist(map(trystat, paths))[:12] |
|
145 | return _hashlist(map(trystat, paths))[:12] | |
146 |
|
146 | |||
|
147 | class hashstate(object): | |||
|
148 | """a structure storing confighash, mtimehash, paths used for mtimehash""" | |||
|
149 | def __init__(self, confighash, mtimehash, mtimepaths): | |||
|
150 | self.confighash = confighash | |||
|
151 | self.mtimehash = mtimehash | |||
|
152 | self.mtimepaths = mtimepaths | |||
|
153 | ||||
|
154 | @staticmethod | |||
|
155 | def fromui(ui, mtimepaths=None): | |||
|
156 | if mtimepaths is None: | |||
|
157 | mtimepaths = _getmtimepaths(ui) | |||
|
158 | confighash = _confighash(ui) | |||
|
159 | mtimehash = _mtimehash(mtimepaths) | |||
|
160 | _log('confighash = %s mtimehash = %s\n' % (confighash, mtimehash)) | |||
|
161 | return hashstate(confighash, mtimehash, mtimepaths) | |||
|
162 | ||||
147 | # copied from hgext/pager.py:uisetup() |
|
163 | # copied from hgext/pager.py:uisetup() | |
148 | def _setuppagercmd(ui, options, cmd): |
|
164 | def _setuppagercmd(ui, options, cmd): | |
149 | if not ui.formatted(): |
|
165 | if not ui.formatted(): |
General Comments 0
You need to be logged in to leave comments.
Login now