mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 08:18:15 +03:00
obsolete: introduce a troubles method on context
A troubled changeset may be affected by multiple trouble at the same time. This new method returns a list of all troubles affecting a changes.
This commit is contained in:
parent
c1a745d834
commit
0571efafd8
@ -268,6 +268,23 @@ class changectx(object):
|
||||
"""True if the changeset is either unstable, bumped or divergent"""
|
||||
return self.unstable() or self.bumped() or self.divergent()
|
||||
|
||||
def troubles(self):
|
||||
"""return the list of troubles affecting this changesets.
|
||||
|
||||
Troubles are returned as strings. possible values are:
|
||||
- unstable,
|
||||
- bumped,
|
||||
- divergent.
|
||||
"""
|
||||
troubles = []
|
||||
if self.unstable():
|
||||
troubles.append('unstable')
|
||||
if self.bumped():
|
||||
troubles.append('bumped')
|
||||
if self.divergent():
|
||||
troubles.append('divergent')
|
||||
return troubles
|
||||
|
||||
def _fileinfo(self, path):
|
||||
if '_manifest' in self.__dict__:
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user