]> scripts.mit.edu Git - wizard.git/blobdiff - wizard/command/prepare_pristine.py
prepare-pristine: stage deleted files too, and update upgrade docs.
[wizard.git] / wizard / command / prepare_pristine.py
index b628a42e05c9f9eb4c6c94f63f4584ffb99cec55..d4c92331868688ef2700f168fc2a2d98902c10fb 100644 (file)
@@ -33,7 +33,11 @@ def main(argv, baton):
             if "/.git" in dirpath: continue
             if not filenames and not dirnames:
                 open(os.path.join(dirpath, ".preserve-dir"), "w").write("")
+        # stage all changes
         shell.call("git", "add", ".")
+        for f in shell.call("git", "ls-files", "-d", "-z")[0].split("\0"):
+            if f != "":
+                shell.call("git", "rm", "--", f)
 
 def parse_args(argv, baton):
     usage = """usage: %prog prepare-pristine APP-VERSION