Modified run-server for trunk.

Fixed URL generation (stripping leading and trailing dashes).
Dynamically add revision number to version in setup.py.
This commit is contained in:
Raoul Snyman 2010-01-22 23:59:17 +02:00
parent f6761bc2a6
commit 9b8bdce543
3 changed files with 15 additions and 3 deletions

View File

@ -1 +1 @@
/home/raoul/VirtualEnv/ScribeEngine/tags/bin/paster serve development.ini --reload /home/raoul/VirtualEnv/ScribeEngine/trunk/bin/paster serve development.ini --reload

View File

@ -67,7 +67,7 @@ def generate_url(title):
``title`` ``title``
The title of the blog post. The title of the blog post.
""" """
return re.sub(r'[^a-zA-Z0-9]+', u'-', title.lower()).strip() return re.sub(r'[^a-zA-Z0-9]+', u'-', title.lower()).strip('-')
def hash_password(password): def hash_password(password):
""" """

View File

@ -5,9 +5,21 @@ except ImportError:
use_setuptools() use_setuptools()
from setuptools import setup, find_packages from setuptools import setup, find_packages
try:
from bzrlib.branch import Branch
b = Branch.open_containing('.')[0]
b.lock_read()
try:
revno = b.revno()
finally:
b.unlock()
except:
revno = 0
setup( setup(
name='ScribeEngine', name='ScribeEngine',
version='0.1', version='0.1.%s' % str(revno),
description='', description='',
author='', author='',
author_email='', author_email='',