X-Git-Url: https://scripts.mit.edu/gitweb/wizard.git/blobdiff_plain/86062007299166fdc28688a8d61c7f45937899c0..1b75c0b4b6c16de49ce5c270ee02c8650630aae5:/wizard/deploy.py diff --git a/wizard/deploy.py b/wizard/deploy.py index d67868d..bdea87e 100644 --- a/wizard/deploy.py +++ b/wizard/deploy.py @@ -10,6 +10,7 @@ import dateutil.parser import distutils.version import tempfile import logging +import shutil import wizard from wizard import git, old_log, scripts, shell, util @@ -370,9 +371,16 @@ class Application(object): for key, value in variables.items(): if value is None: continue contents = contents.replace(key, value) - tmp = tempfile.NamedTemporaryFile(delete=False) - tmp.write(contents) - os.rename(tmp.name, fullpath) + f = open(fullpath, "w") + f.write(contents) + def resolveConflicts(self, dir): + """ + Takes a directory with conflicted files and attempts to + resolve them. Returns whether or not all conflicted + files were resolved or not. Fully resolved files are + added to the index, but no commit is made. + """ + return False def prepareConfig(self, deployment): """ Takes a deployment and replaces any explicit instances