We will then nop update some installs, but this will prevent
us from having to migrate and update concurrently.
+- summary and info are still not using loggers. Maybe they should,
+ maybe they shouldn't
+
OVERALL PLAN:
* Some parts of the infrastructure will not be touched, although I plan
default=False, help="Turns on verbose output")
def parse_all(self, argv, logger):
options, numeric_args = self.parse_args(argv)
- return options, numeric_args, makeLogger(options)
+ return options, numeric_args, logger and logger or makeLogger(options)
base_args = []
if options.verbose: base_args.append("--verbose")
if options.dry_run: base_args.append("--dry-run")
- logger.info(app)
- raise NotImplementedError
+ deploys = []
+ for line in wd.getInstallLines(global_options):
+ try:
+ deploy = wd.Deployment.parse(line)
+ except wd.DeploymentParseError, wd.NoSuchApplication:
+ continue
+ name = deploy.getApplication().name
+ if name != app: continue
+ deploys.append(deploy)
+ # parallelization code would go here
+ for deploy in deploys:
+ sub_argv = base_args + [deploy.location]
+ logger.info("$ wizard migrate " + " ".join(sub_argv))
+ migrate.migrate(sub_argv, global_options, logger)
else:
if os.path.isdir(".git"):
logger.warning("Force removing .git directory")
- shutil.rmtree(".git")
+ if not options.dry_run: shutil.rmtree(".git")
if os.path.isdir(".scripts"):
logger.warning("Force removing .scripts directory")
- shutil.rmtree(".scripts")
+ if not options.dry_run: shutil.rmtree(".scripts")
try:
deploy = wd.Deployment.fromDir(".")
version = deploy.getAppVersion()
import wizard.deploy as wd
import sys
+# XXX: Migrate this to use logger
class Printer(object):
def __init__(self, quiet, verbose):
self.i = 0