<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,9 +1,9 @@
-*.egg-info/*
+*.egg-info
 *.pyc
 *.pyd
 *.pyo
-build/*
-dist/*
+build
+dist
 *.so
 *~
 doc/build</diff>
      <filename>.gitignore</filename>
    </modified>
    <modified>
      <diff>@@ -1,173 +1,209 @@
-# Only import this if 'paver' is being run.
-if 'options' in locals():
-
-    from textwrap import dedent
-
-    from setuptools import Extension, find_packages
-
-
-    setup_meta = Bunch(
-        name='Schevo',
-        version='3.1a2',
-        description='Next-generation DBMS',
-        long_description=dedent(&quot;&quot;&quot;
-        Schevo is a next-generation DBMS that focuses on the following:
-
-        * **Rapid Development**.
-
-          It's easy and fun to create even the most complex of
-          databases. Easily write and understand schema syntax. Quickly
-          place required initial data directly in your schema; use the
-          same syntax to create sets of sample data for development use.
-
-        * **Rich Schema Definition**.
-
-          Write database schemata using concise, easy-to-read Python
-          code. Your schema will describe not only database structure, but
-          also all transactions and rules that ensure database integrity.
-
-        * **Automated Schema Evolution**.
-
-          Deploy a Schevo database and use it to store valuable data, then
-          easily make further changes to the structure of the
-          database. Use Schevo's tools to help restructure a database and
-          safely migrate data from one schema version to the next.
-
-        * **Transaction Based**.
-
-          Schevo protects your data. Use transactions to make all changes
-          to a Schevo database (it's the only way it allows you to!), and
-          you can trust Schevo to ensure that your database is left in a
-          consistent state at all times.
-
-        * **User Interface Generation**.
-
-          User interface code takes advantage of the richness of your
-          database schema. Use a full-featured database navigator to
-          interact with your database without writing a single line of
-          code outside your database schema. Build customized UIs using
-          Schevo-aware widgets and UI tools.
-
-        You can also get the `latest development version
-        &lt;http://github.com/gldnspud/schevo/zipball/master#egg=Schevo-dev&gt;`__.
-        &quot;&quot;&quot;),
-        classifiers=[
-            'Development Status :: 4 - Beta',
-            'Environment :: Console',
-            'Intended Audience :: Developers',
-            'License :: OSI Approved :: MIT License',
-            'Operating System :: OS Independent',
-            'Programming Language :: Python',
-            'Topic :: Database :: Database Engines/Servers',
-            'Topic :: Software Development :: Libraries :: '
-                'Application Frameworks',
-        ],
-        keywords='database dbms',
-        author='ElevenCraft Inc.',
-        author_email='schevo@googlegroups.com',
-        url='http://www.schevo.org/',
-        license='MIT',
-        packages=find_packages(exclude=['doc', 'tests']),
-        include_package_data=True,
-        zip_safe=False,
-        install_requires=[
-            'Louie &gt;= 1.1',
-            'PasteScript &gt;= 1.7.3',
-            'SchevoDurus &gt;= 3.1a2',
-        ],
-        tests_require=['nose &gt;= 0.10.4'],
-        test_suite='nose.collector',
-        ext_modules=[
-            Extension('schevo.store._s_persistent',
-                      ['schevo/store/_s_persistent.c']),
-        ],
-        entry_points = &quot;&quot;&quot;
-        [console_scripts]
-        schevo = schevo.script.main:start
-        schevo_hotshot = schevo.script.main:start_hotshot
-
-        [paste.paster_create_template]
-        schevo = schevo.template:SchevoTemplate
-
-        [schevo.backend]
-        schevo.store = schevo.store.backend:SchevoStoreBackend
-
-        [schevo.schevo_command]
-        backends = schevo.script.backends:start
-        db = schevo.script.db:start
-        shell = schevo.script.shell:start
-        &quot;&quot;&quot;,
-        )
-
-
-    # Use branch name if git information is available; otherwise, use
-    # version number from setup_meta.
+from paver.easy import *
+import paver.misctasks
+import paver.setuputils
+from paver.setuputils import setup
+
+from textwrap import dedent
+
+from setuptools import Extension, find_packages
+
+
+VERSION = '3.1'
+DEVELOPMENT = True
+
+
+# Use branch name if git information is available; otherwise, use
+# version number from setup_meta.
+if DEVELOPMENT:
     try:
         git_head_path = path('.git/HEAD')
         contents = git_head_path.open('rU').readline().strip()
         name, value = contents.split()
-        branch_or_version = value.split('/')[-1]
+        BRANCH = value.split('/')[-1]
+        if BRANCH != 'master':
+            VERSION += '-' + BRANCH
     except:
-        branch_or_version = setup_meta.version
-
-
-    options(
-        cog=Bunch(
-            basdir='doc/source',
-            includedir='doc/source',
-            pattern='*.txt',
-            beginspec='&lt;==',
-            endspec='==&gt;',
-            endoutput='&lt;==end==&gt;',
-        ),
-        publish=Bunch(
-            username='schevo',
-            server='web5.webfaction.com',
-            path='/home2/schevo/schevo_docs/schevo/%s' % branch_or_version,
-        ),
-        setup=setup_meta,
-        sphinx=Bunch(
-            docroot='doc',
-            builddir='build',
-            sourcedir='source',
-        ),
+        pass
+    VERSION += '-dev'
+
+
+setup(
+    name='Schevo',
+    version=VERSION,
+    description='Next-generation DBMS',
+    long_description=dedent(&quot;&quot;&quot;
+    Schevo is a next-generation DBMS that focuses on the following:
+
+    * **Rapid Development**.
+
+      It's easy and fun to create even the most complex of
+      databases. Easily write and understand schema syntax. Quickly
+      place required initial data directly in your schema; use the
+      same syntax to create sets of sample data for development use.
+
+    * **Rich Schema Definition**.
+
+      Write database schemata using concise, easy-to-read Python
+      code. Your schema will describe not only database structure, but
+      also all transactions and rules that ensure database integrity.
+
+    * **Automated Schema Evolution**.
+
+      Deploy a Schevo database and use it to store valuable data, then
+      easily make further changes to the structure of the
+      database. Use Schevo's tools to help restructure a database and
+      safely migrate data from one schema version to the next.
+
+    * **Transaction Based**.
+
+      Schevo protects your data. Use transactions to make all changes
+      to a Schevo database (it's the only way it allows you to!), and
+      you can trust Schevo to ensure that your database is left in a
+      consistent state at all times.
+
+    * **User Interface Generation**.
+
+      User interface code takes advantage of the richness of your
+      database schema. Use a full-featured database navigator to
+      interact with your database without writing a single line of
+      code outside your database schema. Build customized UIs using
+      Schevo-aware widgets and UI tools.
+
+    You can also get the `latest development version
+    &lt;http://github.com/gldnspud/schevo/zipball/master#egg=Schevo-dev&gt;`__.
+    &quot;&quot;&quot;),
+    classifiers=[
+        'Development Status :: 4 - Beta',
+        'Environment :: Console',
+        'Intended Audience :: Developers',
+        'License :: OSI Approved :: '
+            'GNU Library or Lesser General Public License (LGPL)',
+        'Operating System :: OS Independent',
+        'Programming Language :: Python',
+        'Topic :: Database :: Database Engines/Servers',
+        'Topic :: Software Development :: Libraries :: '
+            'Application Frameworks',
+    ],
+    keywords='database dbms',
+    author='ElevenCraft Inc.',
+    author_email='schevo@googlegroups.com',
+    url='http://www.schevo.org/',
+    license='LGPL',
+    packages=find_packages(exclude=['doc', 'tests']),
+    include_package_data=True,
+    zip_safe=False,
+    install_requires=[
+        'Louie &gt;= 1.1',
+        'PasteScript &gt;= 1.7.3',
+        'SchevoDurus &gt;= 3.1a2',
+    ],
+    tests_require=['nose &gt;= 0.10.4'],
+    test_suite='nose.collector',
+    ext_modules=[
+        Extension('schevo.store._s_persistent',
+                  ['schevo/store/_s_persistent.c']),
+    ],
+    entry_points = &quot;&quot;&quot;
+    [console_scripts]
+    schevo = schevo.script.main:start
+    schevo_hotshot = schevo.script.main:start_hotshot
+
+    [paste.paster_create_template]
+    schevo = schevo.template:SchevoTemplate
+
+    [schevo.backend]
+    schevo.store = schevo.store.backend:SchevoStoreBackend
+
+    [schevo.schevo_command]
+    backends = schevo.script.backends:start
+    db = schevo.script.db:start
+    shell = schevo.script.shell:start
+    &quot;&quot;&quot;,
     )
 
 
-    try:
-        import paver.doctools
-    except ImportError:
+options(
+    cog=Bunch(
+        basdir='doc/source',
+        includedir='doc/source',
+        pattern='*.txt',
+        beginspec='&lt;==',
+        endspec='==&gt;',
+        endoutput='&lt;==end==&gt;',
+    ),
+    publish=Bunch(
+        username='schevo',
+        server='web7.webfaction.com',
+        path='/home2/schevo/schevo_docs/schevo/%s' % VERSION,
+    ),
+    sphinx=Bunch(
+        docroot='doc',
+        builddir='build',
+        sourcedir='source',
+    ),
+)
+
+
+@task
+@needs('generate_setup', 'minilib', 'setuptools.command.sdist')
+def sdist():
+    &quot;&quot;&quot;Overrides sdist to make sure that our setup.py is generated.&quot;&quot;&quot;
+    pass
+
+
+try:
+    import paver.doctools
+except ImportError:
+    pass
+else:
+    @task
+    @needs(['paver.doctools.cog', 'paver.doctools.html', 'paver.doctools.uncog'])
+    def html():
+        pass
+
+
+    @task
+    @needs('html')
+    def docs():
+        import webbrowser
+        index_file = path('doc/build/html/index.html')
+        webbrowser.open('file://' + index_file.abspath())
+
+
+    @task
+    @needs(['paver.doctools.cog', 'paver.doctools.html', 'paver.doctools.uncog'])
+    @cmdopts([(&quot;username=&quot;, &quot;u&quot;, &quot;Username for remote server&quot;),
+              (&quot;server=&quot;, &quot;s&quot;, &quot;Server to publish to&quot;),
+              (&quot;path=&quot;, &quot;p&quot;, &quot;Path to publish to&quot;)])
+    def publish():
+        src_path = path('doc/build/html') / '.'
+        dest_path = path(options.path) / '.'
+        # Create the remote directory and copy files to it.
+        if options.username:
+            server = '%s@%s' % (options.username, options.server)
+        else:
+            server = options.server
+        if sys.platform == 'win32':
+            sh('plink %s &quot;mkdir -p %s&quot;' % (server, options.path))
+            sh('pscp -r -v -batch %s %s:%s' % (src_path, server, dest_path))
+        else:
+            sh('ssh %s &quot;mkdir -p %s&quot;' % (server, options.path))
+            sh('rsync -zav --delete %s %s:%s' % (src_path, server, dest_path))
+
+
+    @task
+    def doctests():
+        from paver.doctools import _get_paths
+        import sphinx
+        options.order('sphinx', add_rest=True)
+        paths = _get_paths()
+        sphinxopts = ['', '-b', 'doctest', '-d', paths.doctrees,
+            paths.srcdir, paths.htmldir]
+        ret = dry(
+            &quot;sphinx-build %s&quot; % (&quot; &quot;.join(sphinxopts),), sphinx.main, sphinxopts)
+
+
+    @task
+    @needs(['doctests', 'nosetests'])
+    def test():
         pass
-    else:
-        if paver.doctools.has_sphinx:
-            @task
-            @needs('paver.doctools.uncog')
-            @needs('paver.doctools.html')
-            @needs('paver.doctools.cog')
-            def html():
-                pass
-
-            @task
-            @needs('paver.doctools.uncog')
-            @needs('paver.doctools.html')
-            @needs('paver.doctools.cog')
-            def openhtml():
-                index_file = path('doc/build/html/index.html')
-                sh('open ' + index_file)
-
-            @task
-            @needs('paver.doctools.uncog')
-            @needs('paver.doctools.html')
-            @needs('paver.doctools.cog')
-            @cmdopts([(&quot;username=&quot;, &quot;u&quot;, &quot;Username for remote server&quot;),
-                      (&quot;server=&quot;, &quot;s&quot;, &quot;Server to publish to&quot;),
-                      (&quot;path=&quot;, &quot;p&quot;, &quot;Path to publish to&quot;)])
-            def publish():
-                src_path = path('doc/build/html') / '.'
-                dest_path = path(options.path) / '.'
-                # First create the remote directory.
-                sh('ssh %s@%s &quot;mkdir -p %s&quot;'
-                   % (options.username, options.server, options.path))
-                # Next use rsync to copy everything there.
-                sh('rsync -zav --delete %s %s@%s:%s'
-                   % (src_path, options.username, options.server, dest_path))</diff>
      <filename>pavement.py</filename>
    </modified>
    <modified>
      <diff></diff>
      <filename>paver-minilib.zip</filename>
    </modified>
    <modified>
      <diff>@@ -54,17 +54,22 @@ class EntityClassFields(NamespaceExtension):
 
 class EntityFields(object):
 
-    __slots__ = ['_n', '_i']
+    __slots__ = ['_n', '_i', '_f']
 
     def __init__(self, name, instance):
         self._n = name
         self._i = instance
+        self._f = {}
 
     def __getattr__(self, name):
-        instance = self._i
-        FieldClass = instance._field_spec[name]
-        field = FieldClass(instance, getattr(instance, name))
-        return field
+        if name in self._f:
+            return self._f[name]
+        else:
+            instance = self._i
+            FieldClass = instance._field_spec[name]
+            field = FieldClass(instance, getattr(instance, name))
+            self._f[name] = field
+            return field
 
     __getitem__ = __getattr__
 </diff>
      <filename>schevo/entityns.py</filename>
    </modified>
    <modified>
      <diff>@@ -3,5 +3,5 @@ if os.path.exists(&quot;paver-minilib.zip&quot;):
     import sys
     sys.path.insert(0, &quot;paver-minilib.zip&quot;)
 
-import paver.command
-paver.command.main()
+import paver.tasks
+paver.tasks.main()</diff>
      <filename>setup.py</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>af2b19f817d66009cd2238619e104693d4e1b8d5</id>
    </parent>
  </parents>
  <author>
    <name>Matthew R. Scott</name>
    <email>gldnspud@gmail.com</email>
  </author>
  <url>http://github.com/11craft/schevo/commit/c8a1a9118b6022310f3b874fa46c1b0d12db7363</url>
  <id>c8a1a9118b6022310f3b874fa46c1b0d12db7363</id>
  <committed-date>2009-04-21T18:19:27-07:00</committed-date>
  <authored-date>2009-04-21T18:19:27-07:00</authored-date>
  <message>Merge from master.</message>
  <tree>bdff44f6ae451add261921bd7cbed92483f6336f</tree>
  <committer>
    <name>Matthew R. Scott</name>
    <email>gldnspud@gmail.com</email>
  </committer>
</commit>
