comparison mercurial/obsutil.py @ 35893:78f33dedadd0

obsutil: drop deprecated methods (API) .. api:: The following deprecated methods have been removed from obsutil: marker.precnode() and allprecursors(). Use marker.prednode() and allpredecessors() instead.
author Matt Harbison <matt_harbison@yahoo.com>
date Fri, 02 Feb 2018 23:52:19 -0500
parents c0a6733f7e7a
children c6061cadb400
comparison
equal deleted inserted replaced
35892:00a56c83ab64 35893:78f33dedadd0
30 30
31 def __eq__(self, other): 31 def __eq__(self, other):
32 if type(other) != type(self): 32 if type(other) != type(self):
33 return False 33 return False
34 return self._data == other._data 34 return self._data == other._data
35
36 def precnode(self):
37 msg = ("'marker.precnode' is deprecated, "
38 "use 'marker.prednode'")
39 util.nouideprecwarn(msg, '4.4')
40 return self.prednode()
41 35
42 def prednode(self): 36 def prednode(self):
43 """Predecessor changeset node identifier""" 37 """Predecessor changeset node identifier"""
44 return self._data[0] 38 return self._data[0]
45 39
103 97
104 if precnodeid in repo: 98 if precnodeid in repo:
105 yield precnodeid 99 yield precnodeid
106 else: 100 else:
107 stack.append(precnodeid) 101 stack.append(precnodeid)
108
109 def allprecursors(*args, **kwargs):
110 """ (DEPRECATED)
111 """
112 msg = ("'obsutil.allprecursors' is deprecated, "
113 "use 'obsutil.allpredecessors'")
114 util.nouideprecwarn(msg, '4.4')
115
116 return allpredecessors(*args, **kwargs)
117 102
118 def allpredecessors(obsstore, nodes, ignoreflags=0): 103 def allpredecessors(obsstore, nodes, ignoreflags=0):
119 """Yield node for every precursors of <nodes>. 104 """Yield node for every precursors of <nodes>.
120 105
121 Some precursors may be unknown locally. 106 Some precursors may be unknown locally.