equal
deleted
inserted
replaced
30 from logilab.common.decorators import cached |
30 from logilab.common.decorators import cached |
31 from logilab.common.configuration import REQUIRED, read_old_config |
31 from logilab.common.configuration import REQUIRED, read_old_config |
32 from logilab.common.shellutils import ASK |
32 from logilab.common.shellutils import ASK |
33 from logilab.common.changelog import Version |
33 from logilab.common.changelog import Version |
34 |
34 |
35 from cubicweb import ConfigurationError, ExecutionError |
35 from cubicweb import ConfigurationError, ExecutionError, utils |
36 from cubicweb.cwconfig import CubicWebConfiguration as cwcfg |
36 from cubicweb.cwconfig import CubicWebConfiguration as cwcfg |
37 from cubicweb.toolsutils import show_diffs |
37 from cubicweb.toolsutils import show_diffs |
38 |
38 |
39 def filter_scripts(config, directory, fromversion, toversion, quiet=True): |
39 def filter_scripts(config, directory, fromversion, toversion, quiet=True): |
40 """return a list of paths of migration files to consider to upgrade |
40 """return a list of paths of migration files to consider to upgrade |
226 raise SystemExit(1) |
226 raise SystemExit(1) |
227 if answer == 'shell': |
227 if answer == 'shell': |
228 self.interactive_shell() |
228 self.interactive_shell() |
229 return self.confirm(question, shell, abort, retry, pdb, default) |
229 return self.confirm(question, shell, abort, retry, pdb, default) |
230 if answer == 'pdb': |
230 if answer == 'pdb': |
231 import pdb |
231 pdb = utils.get_pdb() |
232 pdb.set_trace() |
232 pdb.set_trace() |
233 return self.confirm(question, shell, abort, retry, pdb, default) |
233 return self.confirm(question, shell, abort, retry, pdb, default) |
234 return True |
234 return True |
235 |
235 |
236 def interactive_shell(self): |
236 def interactive_shell(self): |