def on_success(stdout, stderr):
if stderr:
logging.warning("Warnings [%04d] %s:\n%s" % (i, d.location, stderr))
- runtime.write("warning", i, d.location)
+ runtime.write("warnings", i, d.location)
runtime.write("success", i, d.location)
def on_error(e):
if e.name == "wizard.command.migrate.AlreadyMigratedError" or \
attempting anything.
"""
options = self.options
- while True:
+ for i in range(0,2):
self.prod = deploy.ProductionCopy(".")
self.prod.verify()
self.repo = self.prod.application.repository(options.srv_path)
shell.call("git", "merge", "--strategy=ours", self.prod.application.makeVersion(str(e.real_version)).scripts_tag)
continue
break
+ else:
+ raise VersionRematchFailed
self.prod.verifyWeb()
self.preflightAlreadyUpgraded()
self.preflightQuota()
copy is missing essential metadata, or you've attempt to continue
from a production copy that does not have any pending upgrades.
"""
+
+class VersionRematchFailed(Error):
+ def __str__(self):
+ return """
+
+ERROR: Your Git version information was not consistent with your
+files on the system, and we were unable to create a fake merge
+to make the two consistent. Please contact scripts@mit.edu.
+"""
if not os.path.join(root, name).startswith(dir + excluded_dir):
file = os.path.join(root, name)
try:
+ if os.path.islink(file): continue
sum_sizes += os.path.getsize(file)
except OSError as e:
if e.errno == errno.ENOENT: