##// END OF EJS Templates
dirstate: remove deprecated API...
Raphaël Gomès -
r49362:934a6213 default
parent child Browse files
Show More
@@ -321,27 +321,6 b' class dirstate(object):'
321 return util.pconvert(path)
321 return util.pconvert(path)
322 return path
322 return path
323
323
324 def __getitem__(self, key):
325 """Return the current state of key (a filename) in the dirstate.
326
327 States are:
328 n normal
329 m needs merging
330 r marked for removal
331 a marked for addition
332 ? not tracked
333
334 XXX The "state" is a bit obscure to be in the "public" API. we should
335 consider migrating all user of this to going through the dirstate entry
336 instead.
337 """
338 msg = b"don't use dirstate[file], use dirstate.get_entry(file)"
339 util.nouideprecwarn(msg, b'6.1', stacklevel=2)
340 entry = self._map.get(key)
341 if entry is not None:
342 return entry.state
343 return b'?'
344
345 def get_entry(self, path):
324 def get_entry(self, path):
346 """return a DirstateItem for the associated path"""
325 """return a DirstateItem for the associated path"""
347 entry = self._map.get(path)
326 entry = self._map.get(path)
@@ -66,17 +66,6 b' class idirstate(interfaceutil.Interface)'
66 def pathto(f, cwd=None):
66 def pathto(f, cwd=None):
67 pass
67 pass
68
68
69 def __getitem__(key):
70 """Return the current state of key (a filename) in the dirstate.
71
72 States are:
73 n normal
74 m needs merging
75 r marked for removal
76 a marked for addition
77 ? not tracked
78 """
79
80 def __contains__(key):
69 def __contains__(key):
81 """Check if bytestring `key` is known to the dirstate."""
70 """Check if bytestring `key` is known to the dirstate."""
82
71
General Comments 0
You need to be logged in to leave comments. Login now