##// END OF EJS Templates
context: drop deprecated methods (API)...
Matt Harbison -
r35908:44bc37d2 default
parent child Browse files
Show More
@@ -206,22 +206,10 b' class basectx(object):'
206 """True if the changeset is extinct"""
206 """True if the changeset is extinct"""
207 return self.rev() in obsmod.getrevs(self._repo, 'extinct')
207 return self.rev() in obsmod.getrevs(self._repo, 'extinct')
208
208
209 def unstable(self):
210 msg = ("'context.unstable' is deprecated, "
211 "use 'context.orphan'")
212 self._repo.ui.deprecwarn(msg, '4.4')
213 return self.orphan()
214
215 def orphan(self):
209 def orphan(self):
216 """True if the changeset is not obsolete but it's ancestor are"""
210 """True if the changeset is not obsolete but it's ancestor are"""
217 return self.rev() in obsmod.getrevs(self._repo, 'orphan')
211 return self.rev() in obsmod.getrevs(self._repo, 'orphan')
218
212
219 def bumped(self):
220 msg = ("'context.bumped' is deprecated, "
221 "use 'context.phasedivergent'")
222 self._repo.ui.deprecwarn(msg, '4.4')
223 return self.phasedivergent()
224
225 def phasedivergent(self):
213 def phasedivergent(self):
226 """True if the changeset try to be a successor of a public changeset
214 """True if the changeset try to be a successor of a public changeset
227
215
@@ -229,12 +217,6 b' class basectx(object):'
229 """
217 """
230 return self.rev() in obsmod.getrevs(self._repo, 'phasedivergent')
218 return self.rev() in obsmod.getrevs(self._repo, 'phasedivergent')
231
219
232 def divergent(self):
233 msg = ("'context.divergent' is deprecated, "
234 "use 'context.contentdivergent'")
235 self._repo.ui.deprecwarn(msg, '4.4')
236 return self.contentdivergent()
237
238 def contentdivergent(self):
220 def contentdivergent(self):
239 """Is a successors of a changeset with multiple possible successors set
221 """Is a successors of a changeset with multiple possible successors set
240
222
@@ -242,33 +224,10 b' class basectx(object):'
242 """
224 """
243 return self.rev() in obsmod.getrevs(self._repo, 'contentdivergent')
225 return self.rev() in obsmod.getrevs(self._repo, 'contentdivergent')
244
226
245 def troubled(self):
246 msg = ("'context.troubled' is deprecated, "
247 "use 'context.isunstable'")
248 self._repo.ui.deprecwarn(msg, '4.4')
249 return self.isunstable()
250
251 def isunstable(self):
227 def isunstable(self):
252 """True if the changeset is either unstable, bumped or divergent"""
228 """True if the changeset is either unstable, bumped or divergent"""
253 return self.orphan() or self.phasedivergent() or self.contentdivergent()
229 return self.orphan() or self.phasedivergent() or self.contentdivergent()
254
230
255 def troubles(self):
256 """Keep the old version around in order to avoid breaking extensions
257 about different return values.
258 """
259 msg = ("'context.troubles' is deprecated, "
260 "use 'context.instabilities'")
261 self._repo.ui.deprecwarn(msg, '4.4')
262
263 troubles = []
264 if self.orphan():
265 troubles.append('orphan')
266 if self.phasedivergent():
267 troubles.append('bumped')
268 if self.contentdivergent():
269 troubles.append('divergent')
270 return troubles
271
272 def instabilities(self):
231 def instabilities(self):
273 """return the list of instabilities affecting this changeset.
232 """return the list of instabilities affecting this changeset.
274
233
General Comments 0
You need to be logged in to leave comments. Login now