Show More
@@ -225,15 +225,15 b' class DirstateItem(object):' | |||||
225 |
|
225 | |||
226 | @property |
|
226 | @property | |
227 | def mode(self): |
|
227 | def mode(self): | |
228 | return self._mode |
|
228 | return self.v1_mode() | |
229 |
|
229 | |||
230 | @property |
|
230 | @property | |
231 | def size(self): |
|
231 | def size(self): | |
232 | return self._size |
|
232 | return self.v1_size() | |
233 |
|
233 | |||
234 | @property |
|
234 | @property | |
235 | def mtime(self): |
|
235 | def mtime(self): | |
236 | return self._mtime |
|
236 | return self.v1_mtime() | |
237 |
|
237 | |||
238 | @property |
|
238 | @property | |
239 | def state(self): |
|
239 | def state(self): | |
@@ -248,17 +248,17 b' class DirstateItem(object):' | |||||
248 | dirstatev1 format. It would make sense to ultimately deprecate it in |
|
248 | dirstatev1 format. It would make sense to ultimately deprecate it in | |
249 | favor of the more "semantic" attributes. |
|
249 | favor of the more "semantic" attributes. | |
250 | """ |
|
250 | """ | |
251 | return self._state |
|
251 | return self.v1_state() | |
252 |
|
252 | |||
253 | @property |
|
253 | @property | |
254 | def tracked(self): |
|
254 | def tracked(self): | |
255 | """True is the file is tracked in the working copy""" |
|
255 | """True is the file is tracked in the working copy""" | |
256 | return self._state in b"nma" |
|
256 | return self.v1_state() in b"nma" | |
257 |
|
257 | |||
258 | @property |
|
258 | @property | |
259 | def added(self): |
|
259 | def added(self): | |
260 | """True if the file has been added""" |
|
260 | """True if the file has been added""" | |
261 | return self._state == b'a' |
|
261 | return self.v1_state() == b'a' | |
262 |
|
262 | |||
263 | @property |
|
263 | @property | |
264 | def merged(self): |
|
264 | def merged(self): | |
@@ -266,7 +266,7 b' class DirstateItem(object):' | |||||
266 |
|
266 | |||
267 | Should only be set if a merge is in progress in the dirstate |
|
267 | Should only be set if a merge is in progress in the dirstate | |
268 | """ |
|
268 | """ | |
269 | return self._state == b'm' |
|
269 | return self.v1_state() == b'm' | |
270 |
|
270 | |||
271 | @property |
|
271 | @property | |
272 | def from_p2(self): |
|
272 | def from_p2(self): | |
@@ -276,7 +276,7 b' class DirstateItem(object):' | |||||
276 |
|
276 | |||
277 | Should only be set if a merge is in progress in the dirstate |
|
277 | Should only be set if a merge is in progress in the dirstate | |
278 | """ |
|
278 | """ | |
279 | return self._state == b'n' and self._size == FROM_P2 |
|
279 | return self.v1_state() == b'n' and self.v1_size() == FROM_P2 | |
280 |
|
280 | |||
281 | @property |
|
281 | @property | |
282 | def from_p2_removed(self): |
|
282 | def from_p2_removed(self): | |
@@ -285,12 +285,12 b' class DirstateItem(object):' | |||||
285 | This property seems like an abstraction leakage and should probably be |
|
285 | This property seems like an abstraction leakage and should probably be | |
286 | dealt in this class (or maybe the dirstatemap) directly. |
|
286 | dealt in this class (or maybe the dirstatemap) directly. | |
287 | """ |
|
287 | """ | |
288 | return self._state == b'r' and self._size == FROM_P2 |
|
288 | return self.v1_state() == b'r' and self.v1_size() == FROM_P2 | |
289 |
|
289 | |||
290 | @property |
|
290 | @property | |
291 | def removed(self): |
|
291 | def removed(self): | |
292 | """True if the file has been removed""" |
|
292 | """True if the file has been removed""" | |
293 | return self._state == b'r' |
|
293 | return self.v1_state() == b'r' | |
294 |
|
294 | |||
295 | @property |
|
295 | @property | |
296 | def merged_removed(self): |
|
296 | def merged_removed(self): | |
@@ -299,7 +299,7 b' class DirstateItem(object):' | |||||
299 | This property seems like an abstraction leakage and should probably be |
|
299 | This property seems like an abstraction leakage and should probably be | |
300 | dealt in this class (or maybe the dirstatemap) directly. |
|
300 | dealt in this class (or maybe the dirstatemap) directly. | |
301 | """ |
|
301 | """ | |
302 | return self._state == b'r' and self._size == NONNORMAL |
|
302 | return self.v1_state() == b'r' and self.v1_size() == NONNORMAL | |
303 |
|
303 | |||
304 | @property |
|
304 | @property | |
305 | def dm_nonnormal(self): |
|
305 | def dm_nonnormal(self): | |
@@ -307,7 +307,7 b' class DirstateItem(object):' | |||||
307 |
|
307 | |||
308 | There is no reason for any code, but the dirstatemap one to use this. |
|
308 | There is no reason for any code, but the dirstatemap one to use this. | |
309 | """ |
|
309 | """ | |
310 | return self.state != b'n' or self.mtime == AMBIGUOUS_TIME |
|
310 | return self.v1_state() != b'n' or self.v1_mtime() == AMBIGUOUS_TIME | |
311 |
|
311 | |||
312 | @property |
|
312 | @property | |
313 | def dm_otherparent(self): |
|
313 | def dm_otherparent(self): | |
@@ -315,7 +315,7 b' class DirstateItem(object):' | |||||
315 |
|
315 | |||
316 | There is no reason for any code, but the dirstatemap one to use this. |
|
316 | There is no reason for any code, but the dirstatemap one to use this. | |
317 | """ |
|
317 | """ | |
318 | return self._size == FROM_P2 |
|
318 | return self.v1_size() == FROM_P2 | |
319 |
|
319 | |||
320 | def v1_state(self): |
|
320 | def v1_state(self): | |
321 | """return a "state" suitable for v1 serialization""" |
|
321 | """return a "state" suitable for v1 serialization""" | |
@@ -335,7 +335,7 b' class DirstateItem(object):' | |||||
335 |
|
335 | |||
336 | def need_delay(self, now): |
|
336 | def need_delay(self, now): | |
337 | """True if the stored mtime would be ambiguous with the current time""" |
|
337 | """True if the stored mtime would be ambiguous with the current time""" | |
338 | return self._state == b'n' and self._mtime == now |
|
338 | return self.v1_state() == b'n' and self.v1_mtime() == now | |
339 |
|
339 | |||
340 |
|
340 | |||
341 | def gettype(q): |
|
341 | def gettype(q): |
General Comments 0
You need to be logged in to leave comments.
Login now