Make sort_actions support MigrationItems

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
This commit is contained in:
Adam D. Barratt 2011-10-22 19:25:43 +00:00
parent 4ddb92db21
commit 0fa6e4c3fb

View File

@ -2775,7 +2775,7 @@ class Britney:
so the ones with most reverse dependencies are at the end of the loop. so the ones with most reverse dependencies are at the end of the loop.
If an action depends on another one, it is put after it. If an action depends on another one, it is put after it.
""" """
upgrade_me = [x.name for x in self.excuses if x.name in self.upgrade_me] upgrade_me = [x.name for x in self.excuses if x.name in [y.uvname for y in self.upgrade_me]]
for e in self.excuses: for e in self.excuses:
if e.name not in upgrade_me: continue if e.name not in upgrade_me: continue
# try removes at the end of the loop # try removes at the end of the loop
@ -2797,7 +2797,7 @@ class Britney:
self.dependencies[e.name] = e.deps self.dependencies[e.name] = e.deps
# replace the list of actions with the new one # replace the list of actions with the new one
self.upgrade_me = upgrade_me self.upgrade_me = [ MigrationItem(x) for x in upgrade_me ]
def auto_hinter(self): def auto_hinter(self):
"""Auto-generate "easy" hints. """Auto-generate "easy" hints.