From 7a04cb12bb5f3bf11c1efe4a8b8f2f138e683cee Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Thu, 25 Feb 2010 01:05:41 -0500 Subject: [PATCH] Fix broken prepare-pristine, update docs and TODO. Signed-off-by: Edward Z. Yang --- TODO | 9 +++++++++ doc/create.rst | 4 ++-- wizard/command/prepare_pristine.py | 5 +---- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/TODO b/TODO index 6499d7a..b2ce6b9 100644 --- a/TODO +++ b/TODO @@ -2,6 +2,9 @@ The Git Autoinstaller TODO NOW: +- Add support for mypristine workflow +- Make a nicer backtrace if not in a Git working copy directory +- Fix chdir to old directory errors - Symlinked rerere to get awesomeness. Consider permissions - Wordpress needs to get rid of the siteurl hack, so that it actually has a fully-qualified URL http://foo.scripts.mit.edu/blah. This will @@ -14,6 +17,12 @@ TODO NOW: scripts and start executing there? - Write the code to make Wordpress figure out its URL from the database +- Plugin architecture + http://peak.telecommunity.com/DevCenter/setuptools#dynamic-discovery-of-services-and-plugins + http://peak.telecommunity.com/DevCenter/PkgResources#entry-points + https://xvm.mit.edu:1111/trunk/packages/invirt-base/python/invirt/authz.py + https://xvm.mit.edu:1111/trunk/packages/xvm-authz-locker/setup.py + - Remerges aren't reflected in the parent files, so `git diff` output is spurious. Not sure how to fix this w/o tree hackery. - Sometimes users remove files. Well, if those files change, they automatically diff --git a/doc/create.rst b/doc/create.rst index ed2337e..6dc2754 100644 --- a/doc/create.rst +++ b/doc/create.rst @@ -79,9 +79,9 @@ add is the :term:`pristine` branch, which contains verbatim the code from upstre folder we store this information in: :file:`/mit/scripts/sec-tools/store/versions`. For the purposes of demonstration, we'll use Wordpress 2.0.2; in reality you -should use the latest version. Try running the following command in -:file:`$WIZARD/srv/wordpress`:: +should use the latest version. Try running the following commands:: + cd "$WIZARD/srv/wordpress" wizard prepare-pristine wordpress-2.0.2 You should get an error complaining about :meth:`wizard.app.Application.download` diff --git a/wizard/command/prepare_pristine.py b/wizard/command/prepare_pristine.py index 6890676..729ebb6 100644 --- a/wizard/command/prepare_pristine.py +++ b/wizard/command/prepare_pristine.py @@ -65,11 +65,8 @@ def check_directory(options): if not options.force: if ref != "refs/heads/pristine" and os.path.exists(os.path.join(".git", ref)): raise Exception("Not on pristine branch (override with --force)") - try: - shell.call("git", "status") + if shell.eval("git", "ls-files", "-m").strip() != "": raise Exception("Working copy is dirty (override with --force)") - except shell.CallError: - pass for f in os.listdir(os.getcwd()): if f == ".git": continue try: -- 2.45.0