##// END OF EJS Templates
dirstate-item: deprecate tuple access on the class...
marmoute -
r48369:7a4ba68f default
parent child Browse files
Show More
@@ -63,12 +63,20 b' class DirstateItem(object):'
63
63
64 def __getitem__(self, idx):
64 def __getitem__(self, idx):
65 if idx == 0 or idx == -4:
65 if idx == 0 or idx == -4:
66 msg = b"do not use item[x], use item.state"
67 util.nouideprecwarn(msg, b'6.0', stacklevel=2)
66 return self._state
68 return self._state
67 elif idx == 1 or idx == -3:
69 elif idx == 1 or idx == -3:
70 msg = b"do not use item[x], use item.mode"
71 util.nouideprecwarn(msg, b'6.0', stacklevel=2)
68 return self._mode
72 return self._mode
69 elif idx == 2 or idx == -2:
73 elif idx == 2 or idx == -2:
74 msg = b"do not use item[x], use item.size"
75 util.nouideprecwarn(msg, b'6.0', stacklevel=2)
70 return self._size
76 return self._size
71 elif idx == 3 or idx == -1:
77 elif idx == 3 or idx == -1:
78 msg = b"do not use item[x], use item.mtime"
79 util.nouideprecwarn(msg, b'6.0', stacklevel=2)
72 return self._mtime
80 return self._mtime
73 else:
81 else:
74 raise IndexError(idx)
82 raise IndexError(idx)
General Comments 0
You need to be logged in to leave comments. Login now