From f64c2c7bf8086caedcdd5f85efaa06a028f97616 Mon Sep 17 00:00:00 2001
From: jim <jim@62d5b8a3-27da-0310-9561-8e5933582275>
Date: Mon, 22 Jan 2007 17:03:36 +0000
Subject: [PATCH] Updated release info.

Feature Changes
---------------

- By popular demand, added a -o command-line option that is a short
  hand for the assignment buildout:offline=true.

Bugs Fixed
----------

- When deciding whether recipe develop eggs had changed, buildout
  incorrectly considered files in .svn and CVS directories.


git-svn-id: http://svn.zope.org/repos/main/zc.buildout/trunk@72177 62d5b8a3-27da-0310-9561-8e5933582275
---
 CHANGES.txt                  |  8 ++++-
 setup.py                     |  2 +-
 src/zc/buildout/buildout.py  |  6 +++-
 src/zc/buildout/buildout.txt | 32 +++++++++++++------
 src/zc/buildout/tests.py     | 61 ++++++++++++++++++++++++++++++++++++
 5 files changed, 96 insertions(+), 13 deletions(-)

diff --git a/CHANGES.txt b/CHANGES.txt
index 81b1aeda..57c7e6b7 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -20,7 +20,7 @@ priorities include:
 Change History
 **************
 
-1.0.0b18 (2007-01-??)
+1.0.0b18 (2007-01-22)
 =====================
 
 Feature Changes
@@ -29,9 +29,15 @@ Feature Changes
 - Added documentation for some previously undocumented features of the 
   easy_install APIs.
 
+- By popular demand, added a -o command-line option that is a short
+  hand for the assignment buildout:offline=true.
+
 Bugs Fixed
 ----------
 
+- When deciding whether recipe develop eggs had changed, buildout
+  incorrectly considered files in .svn and CVS directories.
+
 1.0.0b17 (2006-12-07)
 =====================
 
diff --git a/setup.py b/setup.py
index 321880a0..4fa262e3 100644
--- a/setup.py
+++ b/setup.py
@@ -7,7 +7,7 @@ def read(*rnames):
 name = "zc.buildout"
 setup(
     name = name,
-    version = "1.0.0b17",
+    version = "1.0.0b18",
     author = "Jim Fulton",
     author_email = "jim@zope.com",
     description = "System for managing development buildouts",
diff --git a/src/zc/buildout/buildout.py b/src/zc/buildout/buildout.py
index 65e88938..a7585081 100644
--- a/src/zc/buildout/buildout.py
+++ b/src/zc/buildout/buildout.py
@@ -889,9 +889,11 @@ def _open(base, filename, seen):
     return result
     
 
+ignore_directories = '.svn', 'CVS'
 def _dir_hash(dir):
     hash = md5.new()
     for (dirpath, dirnames, filenames) in os.walk(dir):
+        dirnames[:] = [n for n in dirnames if n not in ignore_directories]
         filenames[:] = [f for f in filenames
                         if not (f.endswith('pyc') or f.endswith('pyo'))
                         ]
@@ -998,7 +1000,7 @@ def main(args=None):
         if args[0][0] == '-':
             op = orig_op = args.pop(0)
             op = op[1:]
-            while op and op[0] in 'vqhWU':
+            while op and op[0] in 'vqhWUo':
                 if op[0] == 'v':
                     verbosity += 10
                 elif op[0] == 'q':
@@ -1007,6 +1009,8 @@ def main(args=None):
                     windows_restart = True
                 elif op[0] == 'U':
                     user_defaults = False
+                elif op[0] == 'o':
+                    options.append(('buildout', 'offline', 'true'))
                 else:
                     _help()
                 op = op[1:]
diff --git a/src/zc/buildout/buildout.txt b/src/zc/buildout/buildout.txt
index 35ff4bd6..e689e44f 100644
--- a/src/zc/buildout/buildout.txt
+++ b/src/zc/buildout/buildout.txt
@@ -1159,20 +1159,32 @@ Command-line usage
 A number of arguments can be given on the buildout command line.  The
 command usage is::
 
-  buildout [-h] [-c file] [-q] [-v] [-U] [assignments] [command [command arguments]]
+  buildout [options and assignments] [command [command arguments]]
 
-The -h (or --help) option causes basic usage information to be
-printed.  If this option is used, then all other options are ignored.
+The following options are supported:
 
-The -c option can be used to specify a configuration file, rather than
-buildout.cfg in the current directory.  
+-h (or --help)
+    Print basic usage information.  If this option is used, then all
+    other options are ignored.
 
-The -q and -v decrement and increment the verbosity by 10.  The
-verbosity is used to adjust the logging level.  The verbosity is
-subtracted from the numeric value of the log-level option specified in
-the configuration file.
+-c filename
+    The -c option can be used to specify a configuration file, rather than
+    buildout.cfg in the current directory.  
 
-The -U option suppresses reading user defaults.
+-v
+    Increment the verbosity by 10.  The verbosity is used to adjust
+    the logging level.  The verbosity is subtracted from the numeric
+    value of the log-level option specified in the configuration file.
+
+-q
+    Decrement the verbosity by 10.
+
+-U
+    Don't read user-default configuration.
+
+-o
+    Run in off-line mode.  This is equivalent to the assignment 
+    buildout:offline=true.
 
 Assignments are of the form::
 
diff --git a/src/zc/buildout/tests.py b/src/zc/buildout/tests.py
index f03ccb20..694e9be5 100644
--- a/src/zc/buildout/tests.py
+++ b/src/zc/buildout/tests.py
@@ -864,6 +864,67 @@ def extensions_installed_as_eggs_work_in_offline_mode():
 
     '''
 
+def changes_in_svn_or_CVS_dont_affect_sig():
+    """
+    
+If we have a develop recipe, it's signature shouldn't be affected to
+changes in .svn or CVS directories.
+
+    >>> mkdir('recipe')
+    >>> write('recipe', 'setup.py',
+    ... '''
+    ... from setuptools import setup
+    ... setup(name='recipe',
+    ...       entry_points={'zc.buildout': ['default=foo:Foo']})
+    ... ''')
+    >>> write('recipe', 'foo.py',
+    ... '''
+    ... class Foo:
+    ...     def __init__(*args): pass
+    ...     def install(*args): return ()
+    ...     update = install
+    ... ''')
+    
+    >>> write('buildout.cfg',
+    ... '''
+    ... [buildout]
+    ... develop = recipe
+    ... parts = foo
+    ... 
+    ... [foo]
+    ... recipe = recipe
+    ... ''')
+
+
+    >>> print system(join(sample_buildout, 'bin', 'buildout')),
+    buildout: Develop: /sample-buildout/recipe
+    buildout: Installing foo
+
+    >>> mkdir('recipe', '.svn')
+    >>> mkdir('recipe', 'CVS')
+    >>> print system(join(sample_buildout, 'bin', 'buildout')),
+    buildout: Develop: /sample-buildout/recipe
+    buildout: Updating foo
+
+    >>> write('recipe', '.svn', 'x', '1')
+    >>> write('recipe', 'CVS', 'x', '1')
+
+    >>> print system(join(sample_buildout, 'bin', 'buildout')),
+    buildout: Develop: /sample-buildout/recipe
+    buildout: Updating foo
+
+    """
+
+def o_option_sets_offline():
+    """
+    >>> print system(join(sample_buildout, 'bin', 'buildout')+' -vvo'),
+    ... # doctest: +ELLIPSIS
+    <BLANKLINE>
+    ...
+    offline = true
+    ...
+    """
+
 ######################################################################
     
 def create_sample_eggs(test, executable=sys.executable):
-- 
2.30.9