From ad2762cf775a8dde508de47164d6429f3fd724f1 Mon Sep 17 00:00:00 2001 From: Jeremy Kerr Date: Sun, 24 May 2015 16:57:33 +0800 Subject: [PATCH] Move to a more recent django project structure This change updates patchwor to the newer project struture: we've moved the actual application out of the apps/ directory, and the patchwork-specific templates to under the patchwork application. This gives us the manage.py script in the top-level now. Signed-off-by: Jeremy Kerr --- apps/patchwork/templatetags/__init__.py | 0 docs/HACKING | 4 ++-- docs/INSTALL | 13 ++++++------- lib/apache2/patchwork.mod_python.conf | 2 +- lib/apache2/patchwork.wsgi | 3 +-- apps/manage.py => manage.py | 0 {apps => patchwork}/__init__.py | 0 {apps/patchwork => patchwork}/admin.py | 0 {apps/patchwork => patchwork/bin}/__init__.py | 0 {apps/patchwork => patchwork}/bin/bash_completion | 0 .../patchwork => patchwork}/bin/parsemail-batch.sh | 0 {apps/patchwork => patchwork}/bin/parsemail.py | 0 {apps/patchwork => patchwork}/bin/parsemail.sh | 6 +++--- {apps/patchwork => patchwork}/bin/patchwork-cron.py | 0 {apps/patchwork => patchwork}/bin/pwclient | 0 {apps/patchwork => patchwork}/bin/rehash.py | 0 .../bin/update-patchwork-status.py | 0 {apps/patchwork => patchwork}/context_processors.py | 0 {apps/patchwork => patchwork}/filters.py | 0 .../fixtures/default_projects.xml | 0 .../fixtures/initial_data.xml | 0 {apps/patchwork => patchwork}/forms.py | 0 {apps/patchwork => patchwork}/models.py | 0 {apps/patchwork => patchwork}/paginator.py | 0 {apps/patchwork => patchwork}/parser.py | 0 {apps/patchwork => patchwork}/requestcontext.py | 0 .../bin => patchwork/settings}/__init__.py | 0 {apps/patchwork => patchwork}/settings/base.py | 2 +- {apps/patchwork => patchwork}/settings/dev.py | 0 {apps/patchwork => patchwork}/settings/prod.py | 0 .../templates}/patchwork/activation_email.txt | 0 .../patchwork/activation_email_subject.txt | 0 .../templates}/patchwork/bundle.html | 0 .../templates}/patchwork/bundles.html | 0 .../templates}/patchwork/confirm-error.html | 0 .../templates}/patchwork/filters.html | 0 .../templates}/patchwork/help/about.html | 0 .../templates}/patchwork/help/index.html | 0 .../templates}/patchwork/help/pwclient.html | 0 .../templates}/patchwork/list.html | 0 .../templates}/patchwork/login.html | 0 .../templates}/patchwork/logout.html | 0 .../templates}/patchwork/mail-form.html | 0 .../templates}/patchwork/mail-settings.html | 0 .../templates}/patchwork/optin-request.html | 0 .../templates}/patchwork/optin-request.mail | 0 .../templates}/patchwork/optin.html | 0 .../templates}/patchwork/optout-request.html | 0 .../templates}/patchwork/optout-request.mail | 0 .../templates}/patchwork/optout.html | 0 .../templates}/patchwork/pagination.html | 0 .../patch-change-notification-subject.text | 0 .../patchwork/patch-change-notification.mail | 0 .../templates}/patchwork/patch-list.html | 0 .../templates}/patchwork/patch.html | 0 .../templates}/patchwork/profile.html | 0 .../templates}/patchwork/project.html | 0 .../templates}/patchwork/projects.html | 0 patchwork/templates/patchwork/pwclient | 1 + .../templates}/patchwork/pwclientrc | 0 .../templates}/patchwork/register.mail | 0 .../templates}/patchwork/registration-confirm.html | 0 .../templates}/patchwork/registration_form.html | 0 .../templates}/patchwork/todo-list.html | 0 .../templates}/patchwork/todo-lists.html | 0 .../templates}/patchwork/user-link-confirm.html | 0 .../templates}/patchwork/user-link.html | 0 .../templates}/patchwork/user-link.mail | 0 .../settings => patchwork/templatetags}/__init__.py | 0 .../patchwork => patchwork}/templatetags/filter.py | 0 .../patchwork => patchwork}/templatetags/listurl.py | 0 {apps/patchwork => patchwork}/templatetags/order.py | 0 {apps/patchwork => patchwork}/templatetags/patch.py | 0 .../patchwork => patchwork}/templatetags/person.py | 0 {apps/patchwork => patchwork}/templatetags/pwurl.py | 0 .../patchwork => patchwork}/templatetags/syntax.py | 0 {apps/patchwork => patchwork}/tests/__init__.py | 0 .../tests/mail/0001-git-pull-request.mbox | 0 .../tests/mail/0002-git-pull-request-wrapped.mbox | 0 .../tests/mail/0003-git-pull-request-with-diff.mbox | 0 .../tests/mail/0004-git-pull-request-git+ssh.mbox | 0 .../tests/mail/0005-git-pull-request-ssh.mbox | 0 .../tests/mail/0006-git-pull-request-http.mbox | 0 .../tests/mail/0007-cvs-format-diff.mbox | 0 .../tests/mail/0008-git-rename.mbox | 0 .../tests/mail/0009-git-rename-with-diff.mbox | 0 .../tests/mail/0010-invalid-charset.mbox | 0 .../tests/mail/0011-no-newline-at-end-of-file.mbox | 0 .../tests/patches/0001-add-line.patch | 0 .../tests/patches/0002-utf-8.patch | 0 {apps/patchwork => patchwork}/tests/test_bundles.py | 0 {apps/patchwork => patchwork}/tests/test_confirm.py | 0 .../patchwork => patchwork}/tests/test_encodings.py | 0 {apps/patchwork => patchwork}/tests/test_expiry.py | 0 {apps/patchwork => patchwork}/tests/test_filters.py | 0 {apps/patchwork => patchwork}/tests/test_list.py | 0 .../tests/test_mail_settings.py | 0 .../patchwork => patchwork}/tests/test_mboxviews.py | 0 .../tests/test_notifications.py | 0 .../tests/test_patchparser.py | 0 {apps/patchwork => patchwork}/tests/test_person.py | 0 .../tests/test_registration.py | 0 {apps/patchwork => patchwork}/tests/test_updates.py | 0 {apps/patchwork => patchwork}/tests/test_user.py | 0 {apps/patchwork => patchwork}/tests/test_xmlrpc.py | 0 {apps/patchwork => patchwork}/tests/utils.py | 0 {apps/patchwork => patchwork}/urls.py | 0 {apps/patchwork => patchwork}/utils.py | 0 {apps/patchwork => patchwork}/views/__init__.py | 0 {apps/patchwork => patchwork}/views/base.py | 0 {apps/patchwork => patchwork}/views/bundle.py | 0 {apps/patchwork => patchwork}/views/mail.py | 0 {apps/patchwork => patchwork}/views/patch.py | 0 {apps/patchwork => patchwork}/views/project.py | 0 {apps/patchwork => patchwork}/views/user.py | 0 {apps/patchwork => patchwork}/views/xmlrpc.py | 0 templates/patchwork/pwclient | 1 - tools/patchwork-update-commits | 2 +- tools/post-receive.hook | 2 +- tox.ini | 12 ++++++------ 120 files changed, 23 insertions(+), 25 deletions(-) delete mode 100644 apps/patchwork/templatetags/__init__.py rename apps/manage.py => manage.py (100%) rename {apps => patchwork}/__init__.py (100%) rename {apps/patchwork => patchwork}/admin.py (100%) rename {apps/patchwork => patchwork/bin}/__init__.py (100%) rename {apps/patchwork => patchwork}/bin/bash_completion (100%) rename {apps/patchwork => patchwork}/bin/parsemail-batch.sh (100%) rename {apps/patchwork => patchwork}/bin/parsemail.py (100%) rename {apps/patchwork => patchwork}/bin/parsemail.sh (83%) rename {apps/patchwork => patchwork}/bin/patchwork-cron.py (100%) rename {apps/patchwork => patchwork}/bin/pwclient (100%) rename {apps/patchwork => patchwork}/bin/rehash.py (100%) rename {apps/patchwork => patchwork}/bin/update-patchwork-status.py (100%) rename {apps/patchwork => patchwork}/context_processors.py (100%) rename {apps/patchwork => patchwork}/filters.py (100%) rename {apps/patchwork => patchwork}/fixtures/default_projects.xml (100%) rename {apps/patchwork => patchwork}/fixtures/initial_data.xml (100%) rename {apps/patchwork => patchwork}/forms.py (100%) rename {apps/patchwork => patchwork}/models.py (100%) rename {apps/patchwork => patchwork}/paginator.py (100%) rename {apps/patchwork => patchwork}/parser.py (100%) rename {apps/patchwork => patchwork}/requestcontext.py (100%) rename {apps/patchwork/bin => patchwork/settings}/__init__.py (100%) rename {apps/patchwork => patchwork}/settings/base.py (97%) rename {apps/patchwork => patchwork}/settings/dev.py (100%) rename {apps/patchwork => patchwork}/settings/prod.py (100%) rename {templates => patchwork/templates}/patchwork/activation_email.txt (100%) rename {templates => patchwork/templates}/patchwork/activation_email_subject.txt (100%) rename {templates => patchwork/templates}/patchwork/bundle.html (100%) rename {templates => patchwork/templates}/patchwork/bundles.html (100%) rename {templates => patchwork/templates}/patchwork/confirm-error.html (100%) rename {templates => patchwork/templates}/patchwork/filters.html (100%) rename {templates => patchwork/templates}/patchwork/help/about.html (100%) rename {templates => patchwork/templates}/patchwork/help/index.html (100%) rename {templates => patchwork/templates}/patchwork/help/pwclient.html (100%) rename {templates => patchwork/templates}/patchwork/list.html (100%) rename {templates => patchwork/templates}/patchwork/login.html (100%) rename {templates => patchwork/templates}/patchwork/logout.html (100%) rename {templates => patchwork/templates}/patchwork/mail-form.html (100%) rename {templates => patchwork/templates}/patchwork/mail-settings.html (100%) rename {templates => patchwork/templates}/patchwork/optin-request.html (100%) rename {templates => patchwork/templates}/patchwork/optin-request.mail (100%) rename {templates => patchwork/templates}/patchwork/optin.html (100%) rename {templates => patchwork/templates}/patchwork/optout-request.html (100%) rename {templates => patchwork/templates}/patchwork/optout-request.mail (100%) rename {templates => patchwork/templates}/patchwork/optout.html (100%) rename {templates => patchwork/templates}/patchwork/pagination.html (100%) rename {templates => patchwork/templates}/patchwork/patch-change-notification-subject.text (100%) rename {templates => patchwork/templates}/patchwork/patch-change-notification.mail (100%) rename {templates => patchwork/templates}/patchwork/patch-list.html (100%) rename {templates => patchwork/templates}/patchwork/patch.html (100%) rename {templates => patchwork/templates}/patchwork/profile.html (100%) rename {templates => patchwork/templates}/patchwork/project.html (100%) rename {templates => patchwork/templates}/patchwork/projects.html (100%) create mode 120000 patchwork/templates/patchwork/pwclient rename {templates => patchwork/templates}/patchwork/pwclientrc (100%) rename {templates => patchwork/templates}/patchwork/register.mail (100%) rename {templates => patchwork/templates}/patchwork/registration-confirm.html (100%) rename {templates => patchwork/templates}/patchwork/registration_form.html (100%) rename {templates => patchwork/templates}/patchwork/todo-list.html (100%) rename {templates => patchwork/templates}/patchwork/todo-lists.html (100%) rename {templates => patchwork/templates}/patchwork/user-link-confirm.html (100%) rename {templates => patchwork/templates}/patchwork/user-link.html (100%) rename {templates => patchwork/templates}/patchwork/user-link.mail (100%) rename {apps/patchwork/settings => patchwork/templatetags}/__init__.py (100%) rename {apps/patchwork => patchwork}/templatetags/filter.py (100%) rename {apps/patchwork => patchwork}/templatetags/listurl.py (100%) rename {apps/patchwork => patchwork}/templatetags/order.py (100%) rename {apps/patchwork => patchwork}/templatetags/patch.py (100%) rename {apps/patchwork => patchwork}/templatetags/person.py (100%) rename {apps/patchwork => patchwork}/templatetags/pwurl.py (100%) rename {apps/patchwork => patchwork}/templatetags/syntax.py (100%) rename {apps/patchwork => patchwork}/tests/__init__.py (100%) rename {apps/patchwork => patchwork}/tests/mail/0001-git-pull-request.mbox (100%) rename {apps/patchwork => patchwork}/tests/mail/0002-git-pull-request-wrapped.mbox (100%) rename {apps/patchwork => patchwork}/tests/mail/0003-git-pull-request-with-diff.mbox (100%) rename {apps/patchwork => patchwork}/tests/mail/0004-git-pull-request-git+ssh.mbox (100%) rename {apps/patchwork => patchwork}/tests/mail/0005-git-pull-request-ssh.mbox (100%) rename {apps/patchwork => patchwork}/tests/mail/0006-git-pull-request-http.mbox (100%) rename {apps/patchwork => patchwork}/tests/mail/0007-cvs-format-diff.mbox (100%) rename {apps/patchwork => patchwork}/tests/mail/0008-git-rename.mbox (100%) rename {apps/patchwork => patchwork}/tests/mail/0009-git-rename-with-diff.mbox (100%) rename {apps/patchwork => patchwork}/tests/mail/0010-invalid-charset.mbox (100%) rename {apps/patchwork => patchwork}/tests/mail/0011-no-newline-at-end-of-file.mbox (100%) rename {apps/patchwork => patchwork}/tests/patches/0001-add-line.patch (100%) rename {apps/patchwork => patchwork}/tests/patches/0002-utf-8.patch (100%) rename {apps/patchwork => patchwork}/tests/test_bundles.py (100%) rename {apps/patchwork => patchwork}/tests/test_confirm.py (100%) rename {apps/patchwork => patchwork}/tests/test_encodings.py (100%) rename {apps/patchwork => patchwork}/tests/test_expiry.py (100%) rename {apps/patchwork => patchwork}/tests/test_filters.py (100%) rename {apps/patchwork => patchwork}/tests/test_list.py (100%) rename {apps/patchwork => patchwork}/tests/test_mail_settings.py (100%) rename {apps/patchwork => patchwork}/tests/test_mboxviews.py (100%) rename {apps/patchwork => patchwork}/tests/test_notifications.py (100%) rename {apps/patchwork => patchwork}/tests/test_patchparser.py (100%) rename {apps/patchwork => patchwork}/tests/test_person.py (100%) rename {apps/patchwork => patchwork}/tests/test_registration.py (100%) rename {apps/patchwork => patchwork}/tests/test_updates.py (100%) rename {apps/patchwork => patchwork}/tests/test_user.py (100%) rename {apps/patchwork => patchwork}/tests/test_xmlrpc.py (100%) rename {apps/patchwork => patchwork}/tests/utils.py (100%) rename {apps/patchwork => patchwork}/urls.py (100%) rename {apps/patchwork => patchwork}/utils.py (100%) rename {apps/patchwork => patchwork}/views/__init__.py (100%) rename {apps/patchwork => patchwork}/views/base.py (100%) rename {apps/patchwork => patchwork}/views/bundle.py (100%) rename {apps/patchwork => patchwork}/views/mail.py (100%) rename {apps/patchwork => patchwork}/views/patch.py (100%) rename {apps/patchwork => patchwork}/views/project.py (100%) rename {apps/patchwork => patchwork}/views/user.py (100%) rename {apps/patchwork => patchwork}/views/xmlrpc.py (100%) delete mode 120000 templates/patchwork/pwclient diff --git a/apps/patchwork/templatetags/__init__.py b/apps/patchwork/templatetags/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/docs/HACKING b/docs/HACKING index cab59eb..c1b478e 100644 --- a/docs/HACKING +++ b/docs/HACKING @@ -43,9 +43,9 @@ It's always a good idea to use virtualenv to develop python software. 5. Now one can run patchwork within that environment - (django-1.7)$ ./apps/manage.py --version + (django-1.7)$ ./manage.py --version 1.7 - (django-1.7)$ ./apps/manage.py runserver + (django-1.7)$ ./manage.py runserver 6. To exit the virtual environment diff --git a/docs/INSTALL b/docs/INSTALL index 16ab2b5..b006178 100644 --- a/docs/INSTALL +++ b/docs/INSTALL @@ -135,8 +135,7 @@ in brackets): Then, get patchwork to create its tables in your configured database: - cd apps/ - PYTHONPATH=../lib/python ./manage.py syncdb + PYTHONPATH=lib/python ./manage.py syncdb And add privileges for your mail and web users. This is only needed if you use the ident-based approach. If you use password-based database @@ -190,7 +189,7 @@ in brackets): Once you have apache set up, you can start the fastcgi server with: - cd /srv/patchwork/apps + cd /srv/patchwork/ ./manage.py runfcgi method=prefork \ socket=/srv/patchwork/var/fcgi.sock \ pidfile=/srv/patchwork/var/fcgi.pid @@ -222,14 +221,14 @@ in brackets): directory. (Note, do not use the parsemail.py script directly). Something like this in /etc/aliases is suitable for postfix: - patchwork: "|/srv/patchwork/apps/patchwork/bin/parsemail.sh" + patchwork: "|/srv/patchwork/patchwork/bin/parsemail.sh" You may need to customise the parsemail.sh script if you haven't installed patchwork in /srv/patchwork. Test that you can deliver a patch to this script: - sudo -u nobody /srv/patchwork/apps/patchwork/bin/parsemail.sh < mail + sudo -u nobody /srv/patchwork/patchwork/bin/parsemail.sh < mail 7. Set up the patchwork cron script @@ -240,9 +239,9 @@ in brackets): Something like this in your crontab should work: # m h dom mon dow command - PYTHONPATH=apps:. + PYTHONPATH=. DJANGO_SETTINGS_MODULE=settings - */10 * * * * cd patchwork; python apps/patchwork/bin/patchwork-cron.py + */10 * * * * cd patchwork; python patchwork/bin/patchwork-cron.py - the frequency should be the same as the NOTIFICATION_DELAY_MINUTES diff --git a/lib/apache2/patchwork.mod_python.conf b/lib/apache2/patchwork.mod_python.conf index 6395738..c46f86c 100644 --- a/lib/apache2/patchwork.mod_python.conf +++ b/lib/apache2/patchwork.mod_python.conf @@ -7,7 +7,7 @@ NameVirtualHost patchwork.example.com:80 SetHandler python-program PythonHandler django.core.handlers.modpython - PythonPath "['/srv/patchwork/apps', '/srv/patchwork/lib/python'] + sys.path" + PythonPath "['/srv/patchwork', '/srv/patchwork/lib/python'] + sys.path" SetEnv DJANGO_SETTINGS_MODULE settings diff --git a/lib/apache2/patchwork.wsgi b/lib/apache2/patchwork.wsgi index 869bb9d..52feb58 100644 --- a/lib/apache2/patchwork.wsgi +++ b/lib/apache2/patchwork.wsgi @@ -12,8 +12,7 @@ import sys basedir = os.path.join( os.path.dirname(__file__), os.path.pardir, os.path.pardir) sys.path.append(basedir) -sys.path.append(os.path.join(basedir, 'apps')) -os.environ['DJANGO_SETTINGS_MODULE'] = 'apps.settings' +os.environ['DJANGO_SETTINGS_MODULE'] = 'patchwork.settings.prod' import django.core.handlers.wsgi application = django.core.handlers.wsgi.WSGIHandler() diff --git a/apps/manage.py b/manage.py similarity index 100% rename from apps/manage.py rename to manage.py diff --git a/apps/__init__.py b/patchwork/__init__.py similarity index 100% rename from apps/__init__.py rename to patchwork/__init__.py diff --git a/apps/patchwork/admin.py b/patchwork/admin.py similarity index 100% rename from apps/patchwork/admin.py rename to patchwork/admin.py diff --git a/apps/patchwork/__init__.py b/patchwork/bin/__init__.py similarity index 100% rename from apps/patchwork/__init__.py rename to patchwork/bin/__init__.py diff --git a/apps/patchwork/bin/bash_completion b/patchwork/bin/bash_completion similarity index 100% rename from apps/patchwork/bin/bash_completion rename to patchwork/bin/bash_completion diff --git a/apps/patchwork/bin/parsemail-batch.sh b/patchwork/bin/parsemail-batch.sh similarity index 100% rename from apps/patchwork/bin/parsemail-batch.sh rename to patchwork/bin/parsemail-batch.sh diff --git a/apps/patchwork/bin/parsemail.py b/patchwork/bin/parsemail.py similarity index 100% rename from apps/patchwork/bin/parsemail.py rename to patchwork/bin/parsemail.py diff --git a/apps/patchwork/bin/parsemail.sh b/patchwork/bin/parsemail.sh similarity index 83% rename from apps/patchwork/bin/parsemail.sh rename to patchwork/bin/parsemail.sh index 246c2a1..d9ad005 100755 --- a/apps/patchwork/bin/parsemail.sh +++ b/patchwork/bin/parsemail.sh @@ -20,10 +20,10 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA BIN_DIR=`dirname $0` -PATCHWORK_BASE=`readlink -e $BIN_DIR/../../..` +PATCHWORK_BASE=`readlink -e $BIN_DIR/../..` -PYTHONPATH="$PATCHWORK_BASE/apps":"$PATCHWORK_BASE/lib/python:$PYTHONPATH" \ +PYTHONPATH="$PATCHWORK_BASE":"$PATCHWORK_BASE/lib/python:$PYTHONPATH" \ DJANGO_SETTINGS_MODULE=settings \ - "$PATCHWORK_BASE/apps/patchwork/bin/parsemail.py" + "$PATCHWORK_BASE/patchwork/bin/parsemail.py" exit 0 diff --git a/apps/patchwork/bin/patchwork-cron.py b/patchwork/bin/patchwork-cron.py similarity index 100% rename from apps/patchwork/bin/patchwork-cron.py rename to patchwork/bin/patchwork-cron.py diff --git a/apps/patchwork/bin/pwclient b/patchwork/bin/pwclient similarity index 100% rename from apps/patchwork/bin/pwclient rename to patchwork/bin/pwclient diff --git a/apps/patchwork/bin/rehash.py b/patchwork/bin/rehash.py similarity index 100% rename from apps/patchwork/bin/rehash.py rename to patchwork/bin/rehash.py diff --git a/apps/patchwork/bin/update-patchwork-status.py b/patchwork/bin/update-patchwork-status.py similarity index 100% rename from apps/patchwork/bin/update-patchwork-status.py rename to patchwork/bin/update-patchwork-status.py diff --git a/apps/patchwork/context_processors.py b/patchwork/context_processors.py similarity index 100% rename from apps/patchwork/context_processors.py rename to patchwork/context_processors.py diff --git a/apps/patchwork/filters.py b/patchwork/filters.py similarity index 100% rename from apps/patchwork/filters.py rename to patchwork/filters.py diff --git a/apps/patchwork/fixtures/default_projects.xml b/patchwork/fixtures/default_projects.xml similarity index 100% rename from apps/patchwork/fixtures/default_projects.xml rename to patchwork/fixtures/default_projects.xml diff --git a/apps/patchwork/fixtures/initial_data.xml b/patchwork/fixtures/initial_data.xml similarity index 100% rename from apps/patchwork/fixtures/initial_data.xml rename to patchwork/fixtures/initial_data.xml diff --git a/apps/patchwork/forms.py b/patchwork/forms.py similarity index 100% rename from apps/patchwork/forms.py rename to patchwork/forms.py diff --git a/apps/patchwork/models.py b/patchwork/models.py similarity index 100% rename from apps/patchwork/models.py rename to patchwork/models.py diff --git a/apps/patchwork/paginator.py b/patchwork/paginator.py similarity index 100% rename from apps/patchwork/paginator.py rename to patchwork/paginator.py diff --git a/apps/patchwork/parser.py b/patchwork/parser.py similarity index 100% rename from apps/patchwork/parser.py rename to patchwork/parser.py diff --git a/apps/patchwork/requestcontext.py b/patchwork/requestcontext.py similarity index 100% rename from apps/patchwork/requestcontext.py rename to patchwork/requestcontext.py diff --git a/apps/patchwork/bin/__init__.py b/patchwork/settings/__init__.py similarity index 100% rename from apps/patchwork/bin/__init__.py rename to patchwork/settings/__init__.py diff --git a/apps/patchwork/settings/base.py b/patchwork/settings/base.py similarity index 97% rename from apps/patchwork/settings/base.py rename to patchwork/settings/base.py index 5440de6..9b52989 100644 --- a/apps/patchwork/settings/base.py +++ b/patchwork/settings/base.py @@ -7,7 +7,7 @@ import os import django ROOT_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), - os.pardir, os.pardir, os.pardir) + os.pardir, os.pardir) # # Core settings diff --git a/apps/patchwork/settings/dev.py b/patchwork/settings/dev.py similarity index 100% rename from apps/patchwork/settings/dev.py rename to patchwork/settings/dev.py diff --git a/apps/patchwork/settings/prod.py b/patchwork/settings/prod.py similarity index 100% rename from apps/patchwork/settings/prod.py rename to patchwork/settings/prod.py diff --git a/templates/patchwork/activation_email.txt b/patchwork/templates/patchwork/activation_email.txt similarity index 100% rename from templates/patchwork/activation_email.txt rename to patchwork/templates/patchwork/activation_email.txt diff --git a/templates/patchwork/activation_email_subject.txt b/patchwork/templates/patchwork/activation_email_subject.txt similarity index 100% rename from templates/patchwork/activation_email_subject.txt rename to patchwork/templates/patchwork/activation_email_subject.txt diff --git a/templates/patchwork/bundle.html b/patchwork/templates/patchwork/bundle.html similarity index 100% rename from templates/patchwork/bundle.html rename to patchwork/templates/patchwork/bundle.html diff --git a/templates/patchwork/bundles.html b/patchwork/templates/patchwork/bundles.html similarity index 100% rename from templates/patchwork/bundles.html rename to patchwork/templates/patchwork/bundles.html diff --git a/templates/patchwork/confirm-error.html b/patchwork/templates/patchwork/confirm-error.html similarity index 100% rename from templates/patchwork/confirm-error.html rename to patchwork/templates/patchwork/confirm-error.html diff --git a/templates/patchwork/filters.html b/patchwork/templates/patchwork/filters.html similarity index 100% rename from templates/patchwork/filters.html rename to patchwork/templates/patchwork/filters.html diff --git a/templates/patchwork/help/about.html b/patchwork/templates/patchwork/help/about.html similarity index 100% rename from templates/patchwork/help/about.html rename to patchwork/templates/patchwork/help/about.html diff --git a/templates/patchwork/help/index.html b/patchwork/templates/patchwork/help/index.html similarity index 100% rename from templates/patchwork/help/index.html rename to patchwork/templates/patchwork/help/index.html diff --git a/templates/patchwork/help/pwclient.html b/patchwork/templates/patchwork/help/pwclient.html similarity index 100% rename from templates/patchwork/help/pwclient.html rename to patchwork/templates/patchwork/help/pwclient.html diff --git a/templates/patchwork/list.html b/patchwork/templates/patchwork/list.html similarity index 100% rename from templates/patchwork/list.html rename to patchwork/templates/patchwork/list.html diff --git a/templates/patchwork/login.html b/patchwork/templates/patchwork/login.html similarity index 100% rename from templates/patchwork/login.html rename to patchwork/templates/patchwork/login.html diff --git a/templates/patchwork/logout.html b/patchwork/templates/patchwork/logout.html similarity index 100% rename from templates/patchwork/logout.html rename to patchwork/templates/patchwork/logout.html diff --git a/templates/patchwork/mail-form.html b/patchwork/templates/patchwork/mail-form.html similarity index 100% rename from templates/patchwork/mail-form.html rename to patchwork/templates/patchwork/mail-form.html diff --git a/templates/patchwork/mail-settings.html b/patchwork/templates/patchwork/mail-settings.html similarity index 100% rename from templates/patchwork/mail-settings.html rename to patchwork/templates/patchwork/mail-settings.html diff --git a/templates/patchwork/optin-request.html b/patchwork/templates/patchwork/optin-request.html similarity index 100% rename from templates/patchwork/optin-request.html rename to patchwork/templates/patchwork/optin-request.html diff --git a/templates/patchwork/optin-request.mail b/patchwork/templates/patchwork/optin-request.mail similarity index 100% rename from templates/patchwork/optin-request.mail rename to patchwork/templates/patchwork/optin-request.mail diff --git a/templates/patchwork/optin.html b/patchwork/templates/patchwork/optin.html similarity index 100% rename from templates/patchwork/optin.html rename to patchwork/templates/patchwork/optin.html diff --git a/templates/patchwork/optout-request.html b/patchwork/templates/patchwork/optout-request.html similarity index 100% rename from templates/patchwork/optout-request.html rename to patchwork/templates/patchwork/optout-request.html diff --git a/templates/patchwork/optout-request.mail b/patchwork/templates/patchwork/optout-request.mail similarity index 100% rename from templates/patchwork/optout-request.mail rename to patchwork/templates/patchwork/optout-request.mail diff --git a/templates/patchwork/optout.html b/patchwork/templates/patchwork/optout.html similarity index 100% rename from templates/patchwork/optout.html rename to patchwork/templates/patchwork/optout.html diff --git a/templates/patchwork/pagination.html b/patchwork/templates/patchwork/pagination.html similarity index 100% rename from templates/patchwork/pagination.html rename to patchwork/templates/patchwork/pagination.html diff --git a/templates/patchwork/patch-change-notification-subject.text b/patchwork/templates/patchwork/patch-change-notification-subject.text similarity index 100% rename from templates/patchwork/patch-change-notification-subject.text rename to patchwork/templates/patchwork/patch-change-notification-subject.text diff --git a/templates/patchwork/patch-change-notification.mail b/patchwork/templates/patchwork/patch-change-notification.mail similarity index 100% rename from templates/patchwork/patch-change-notification.mail rename to patchwork/templates/patchwork/patch-change-notification.mail diff --git a/templates/patchwork/patch-list.html b/patchwork/templates/patchwork/patch-list.html similarity index 100% rename from templates/patchwork/patch-list.html rename to patchwork/templates/patchwork/patch-list.html diff --git a/templates/patchwork/patch.html b/patchwork/templates/patchwork/patch.html similarity index 100% rename from templates/patchwork/patch.html rename to patchwork/templates/patchwork/patch.html diff --git a/templates/patchwork/profile.html b/patchwork/templates/patchwork/profile.html similarity index 100% rename from templates/patchwork/profile.html rename to patchwork/templates/patchwork/profile.html diff --git a/templates/patchwork/project.html b/patchwork/templates/patchwork/project.html similarity index 100% rename from templates/patchwork/project.html rename to patchwork/templates/patchwork/project.html diff --git a/templates/patchwork/projects.html b/patchwork/templates/patchwork/projects.html similarity index 100% rename from templates/patchwork/projects.html rename to patchwork/templates/patchwork/projects.html diff --git a/patchwork/templates/patchwork/pwclient b/patchwork/templates/patchwork/pwclient new file mode 120000 index 0000000..5ce255f --- /dev/null +++ b/patchwork/templates/patchwork/pwclient @@ -0,0 +1 @@ +../../bin/pwclient \ No newline at end of file diff --git a/templates/patchwork/pwclientrc b/patchwork/templates/patchwork/pwclientrc similarity index 100% rename from templates/patchwork/pwclientrc rename to patchwork/templates/patchwork/pwclientrc diff --git a/templates/patchwork/register.mail b/patchwork/templates/patchwork/register.mail similarity index 100% rename from templates/patchwork/register.mail rename to patchwork/templates/patchwork/register.mail diff --git a/templates/patchwork/registration-confirm.html b/patchwork/templates/patchwork/registration-confirm.html similarity index 100% rename from templates/patchwork/registration-confirm.html rename to patchwork/templates/patchwork/registration-confirm.html diff --git a/templates/patchwork/registration_form.html b/patchwork/templates/patchwork/registration_form.html similarity index 100% rename from templates/patchwork/registration_form.html rename to patchwork/templates/patchwork/registration_form.html diff --git a/templates/patchwork/todo-list.html b/patchwork/templates/patchwork/todo-list.html similarity index 100% rename from templates/patchwork/todo-list.html rename to patchwork/templates/patchwork/todo-list.html diff --git a/templates/patchwork/todo-lists.html b/patchwork/templates/patchwork/todo-lists.html similarity index 100% rename from templates/patchwork/todo-lists.html rename to patchwork/templates/patchwork/todo-lists.html diff --git a/templates/patchwork/user-link-confirm.html b/patchwork/templates/patchwork/user-link-confirm.html similarity index 100% rename from templates/patchwork/user-link-confirm.html rename to patchwork/templates/patchwork/user-link-confirm.html diff --git a/templates/patchwork/user-link.html b/patchwork/templates/patchwork/user-link.html similarity index 100% rename from templates/patchwork/user-link.html rename to patchwork/templates/patchwork/user-link.html diff --git a/templates/patchwork/user-link.mail b/patchwork/templates/patchwork/user-link.mail similarity index 100% rename from templates/patchwork/user-link.mail rename to patchwork/templates/patchwork/user-link.mail diff --git a/apps/patchwork/settings/__init__.py b/patchwork/templatetags/__init__.py similarity index 100% rename from apps/patchwork/settings/__init__.py rename to patchwork/templatetags/__init__.py diff --git a/apps/patchwork/templatetags/filter.py b/patchwork/templatetags/filter.py similarity index 100% rename from apps/patchwork/templatetags/filter.py rename to patchwork/templatetags/filter.py diff --git a/apps/patchwork/templatetags/listurl.py b/patchwork/templatetags/listurl.py similarity index 100% rename from apps/patchwork/templatetags/listurl.py rename to patchwork/templatetags/listurl.py diff --git a/apps/patchwork/templatetags/order.py b/patchwork/templatetags/order.py similarity index 100% rename from apps/patchwork/templatetags/order.py rename to patchwork/templatetags/order.py diff --git a/apps/patchwork/templatetags/patch.py b/patchwork/templatetags/patch.py similarity index 100% rename from apps/patchwork/templatetags/patch.py rename to patchwork/templatetags/patch.py diff --git a/apps/patchwork/templatetags/person.py b/patchwork/templatetags/person.py similarity index 100% rename from apps/patchwork/templatetags/person.py rename to patchwork/templatetags/person.py diff --git a/apps/patchwork/templatetags/pwurl.py b/patchwork/templatetags/pwurl.py similarity index 100% rename from apps/patchwork/templatetags/pwurl.py rename to patchwork/templatetags/pwurl.py diff --git a/apps/patchwork/templatetags/syntax.py b/patchwork/templatetags/syntax.py similarity index 100% rename from apps/patchwork/templatetags/syntax.py rename to patchwork/templatetags/syntax.py diff --git a/apps/patchwork/tests/__init__.py b/patchwork/tests/__init__.py similarity index 100% rename from apps/patchwork/tests/__init__.py rename to patchwork/tests/__init__.py diff --git a/apps/patchwork/tests/mail/0001-git-pull-request.mbox b/patchwork/tests/mail/0001-git-pull-request.mbox similarity index 100% rename from apps/patchwork/tests/mail/0001-git-pull-request.mbox rename to patchwork/tests/mail/0001-git-pull-request.mbox diff --git a/apps/patchwork/tests/mail/0002-git-pull-request-wrapped.mbox b/patchwork/tests/mail/0002-git-pull-request-wrapped.mbox similarity index 100% rename from apps/patchwork/tests/mail/0002-git-pull-request-wrapped.mbox rename to patchwork/tests/mail/0002-git-pull-request-wrapped.mbox diff --git a/apps/patchwork/tests/mail/0003-git-pull-request-with-diff.mbox b/patchwork/tests/mail/0003-git-pull-request-with-diff.mbox similarity index 100% rename from apps/patchwork/tests/mail/0003-git-pull-request-with-diff.mbox rename to patchwork/tests/mail/0003-git-pull-request-with-diff.mbox diff --git a/apps/patchwork/tests/mail/0004-git-pull-request-git+ssh.mbox b/patchwork/tests/mail/0004-git-pull-request-git+ssh.mbox similarity index 100% rename from apps/patchwork/tests/mail/0004-git-pull-request-git+ssh.mbox rename to patchwork/tests/mail/0004-git-pull-request-git+ssh.mbox diff --git a/apps/patchwork/tests/mail/0005-git-pull-request-ssh.mbox b/patchwork/tests/mail/0005-git-pull-request-ssh.mbox similarity index 100% rename from apps/patchwork/tests/mail/0005-git-pull-request-ssh.mbox rename to patchwork/tests/mail/0005-git-pull-request-ssh.mbox diff --git a/apps/patchwork/tests/mail/0006-git-pull-request-http.mbox b/patchwork/tests/mail/0006-git-pull-request-http.mbox similarity index 100% rename from apps/patchwork/tests/mail/0006-git-pull-request-http.mbox rename to patchwork/tests/mail/0006-git-pull-request-http.mbox diff --git a/apps/patchwork/tests/mail/0007-cvs-format-diff.mbox b/patchwork/tests/mail/0007-cvs-format-diff.mbox similarity index 100% rename from apps/patchwork/tests/mail/0007-cvs-format-diff.mbox rename to patchwork/tests/mail/0007-cvs-format-diff.mbox diff --git a/apps/patchwork/tests/mail/0008-git-rename.mbox b/patchwork/tests/mail/0008-git-rename.mbox similarity index 100% rename from apps/patchwork/tests/mail/0008-git-rename.mbox rename to patchwork/tests/mail/0008-git-rename.mbox diff --git a/apps/patchwork/tests/mail/0009-git-rename-with-diff.mbox b/patchwork/tests/mail/0009-git-rename-with-diff.mbox similarity index 100% rename from apps/patchwork/tests/mail/0009-git-rename-with-diff.mbox rename to patchwork/tests/mail/0009-git-rename-with-diff.mbox diff --git a/apps/patchwork/tests/mail/0010-invalid-charset.mbox b/patchwork/tests/mail/0010-invalid-charset.mbox similarity index 100% rename from apps/patchwork/tests/mail/0010-invalid-charset.mbox rename to patchwork/tests/mail/0010-invalid-charset.mbox diff --git a/apps/patchwork/tests/mail/0011-no-newline-at-end-of-file.mbox b/patchwork/tests/mail/0011-no-newline-at-end-of-file.mbox similarity index 100% rename from apps/patchwork/tests/mail/0011-no-newline-at-end-of-file.mbox rename to patchwork/tests/mail/0011-no-newline-at-end-of-file.mbox diff --git a/apps/patchwork/tests/patches/0001-add-line.patch b/patchwork/tests/patches/0001-add-line.patch similarity index 100% rename from apps/patchwork/tests/patches/0001-add-line.patch rename to patchwork/tests/patches/0001-add-line.patch diff --git a/apps/patchwork/tests/patches/0002-utf-8.patch b/patchwork/tests/patches/0002-utf-8.patch similarity index 100% rename from apps/patchwork/tests/patches/0002-utf-8.patch rename to patchwork/tests/patches/0002-utf-8.patch diff --git a/apps/patchwork/tests/test_bundles.py b/patchwork/tests/test_bundles.py similarity index 100% rename from apps/patchwork/tests/test_bundles.py rename to patchwork/tests/test_bundles.py diff --git a/apps/patchwork/tests/test_confirm.py b/patchwork/tests/test_confirm.py similarity index 100% rename from apps/patchwork/tests/test_confirm.py rename to patchwork/tests/test_confirm.py diff --git a/apps/patchwork/tests/test_encodings.py b/patchwork/tests/test_encodings.py similarity index 100% rename from apps/patchwork/tests/test_encodings.py rename to patchwork/tests/test_encodings.py diff --git a/apps/patchwork/tests/test_expiry.py b/patchwork/tests/test_expiry.py similarity index 100% rename from apps/patchwork/tests/test_expiry.py rename to patchwork/tests/test_expiry.py diff --git a/apps/patchwork/tests/test_filters.py b/patchwork/tests/test_filters.py similarity index 100% rename from apps/patchwork/tests/test_filters.py rename to patchwork/tests/test_filters.py diff --git a/apps/patchwork/tests/test_list.py b/patchwork/tests/test_list.py similarity index 100% rename from apps/patchwork/tests/test_list.py rename to patchwork/tests/test_list.py diff --git a/apps/patchwork/tests/test_mail_settings.py b/patchwork/tests/test_mail_settings.py similarity index 100% rename from apps/patchwork/tests/test_mail_settings.py rename to patchwork/tests/test_mail_settings.py diff --git a/apps/patchwork/tests/test_mboxviews.py b/patchwork/tests/test_mboxviews.py similarity index 100% rename from apps/patchwork/tests/test_mboxviews.py rename to patchwork/tests/test_mboxviews.py diff --git a/apps/patchwork/tests/test_notifications.py b/patchwork/tests/test_notifications.py similarity index 100% rename from apps/patchwork/tests/test_notifications.py rename to patchwork/tests/test_notifications.py diff --git a/apps/patchwork/tests/test_patchparser.py b/patchwork/tests/test_patchparser.py similarity index 100% rename from apps/patchwork/tests/test_patchparser.py rename to patchwork/tests/test_patchparser.py diff --git a/apps/patchwork/tests/test_person.py b/patchwork/tests/test_person.py similarity index 100% rename from apps/patchwork/tests/test_person.py rename to patchwork/tests/test_person.py diff --git a/apps/patchwork/tests/test_registration.py b/patchwork/tests/test_registration.py similarity index 100% rename from apps/patchwork/tests/test_registration.py rename to patchwork/tests/test_registration.py diff --git a/apps/patchwork/tests/test_updates.py b/patchwork/tests/test_updates.py similarity index 100% rename from apps/patchwork/tests/test_updates.py rename to patchwork/tests/test_updates.py diff --git a/apps/patchwork/tests/test_user.py b/patchwork/tests/test_user.py similarity index 100% rename from apps/patchwork/tests/test_user.py rename to patchwork/tests/test_user.py diff --git a/apps/patchwork/tests/test_xmlrpc.py b/patchwork/tests/test_xmlrpc.py similarity index 100% rename from apps/patchwork/tests/test_xmlrpc.py rename to patchwork/tests/test_xmlrpc.py diff --git a/apps/patchwork/tests/utils.py b/patchwork/tests/utils.py similarity index 100% rename from apps/patchwork/tests/utils.py rename to patchwork/tests/utils.py diff --git a/apps/patchwork/urls.py b/patchwork/urls.py similarity index 100% rename from apps/patchwork/urls.py rename to patchwork/urls.py diff --git a/apps/patchwork/utils.py b/patchwork/utils.py similarity index 100% rename from apps/patchwork/utils.py rename to patchwork/utils.py diff --git a/apps/patchwork/views/__init__.py b/patchwork/views/__init__.py similarity index 100% rename from apps/patchwork/views/__init__.py rename to patchwork/views/__init__.py diff --git a/apps/patchwork/views/base.py b/patchwork/views/base.py similarity index 100% rename from apps/patchwork/views/base.py rename to patchwork/views/base.py diff --git a/apps/patchwork/views/bundle.py b/patchwork/views/bundle.py similarity index 100% rename from apps/patchwork/views/bundle.py rename to patchwork/views/bundle.py diff --git a/apps/patchwork/views/mail.py b/patchwork/views/mail.py similarity index 100% rename from apps/patchwork/views/mail.py rename to patchwork/views/mail.py diff --git a/apps/patchwork/views/patch.py b/patchwork/views/patch.py similarity index 100% rename from apps/patchwork/views/patch.py rename to patchwork/views/patch.py diff --git a/apps/patchwork/views/project.py b/patchwork/views/project.py similarity index 100% rename from apps/patchwork/views/project.py rename to patchwork/views/project.py diff --git a/apps/patchwork/views/user.py b/patchwork/views/user.py similarity index 100% rename from apps/patchwork/views/user.py rename to patchwork/views/user.py diff --git a/apps/patchwork/views/xmlrpc.py b/patchwork/views/xmlrpc.py similarity index 100% rename from apps/patchwork/views/xmlrpc.py rename to patchwork/views/xmlrpc.py diff --git a/templates/patchwork/pwclient b/templates/patchwork/pwclient deleted file mode 120000 index ae4faf3..0000000 --- a/templates/patchwork/pwclient +++ /dev/null @@ -1 +0,0 @@ -../../apps/patchwork/bin/pwclient \ No newline at end of file diff --git a/tools/patchwork-update-commits b/tools/patchwork-update-commits index b2a658a..820fd1c 100755 --- a/tools/patchwork-update-commits +++ b/tools/patchwork-update-commits @@ -1,7 +1,7 @@ #!/bin/bash toolsdir="$(dirname "$0")" -pwpath="${toolsdir}"/../apps/patchwork +pwpath="${toolsdir}"/../patchwork if [ "$#" -lt 1 ] then diff --git a/tools/post-receive.hook b/tools/post-receive.hook index a38522e..8f05b8d 100755 --- a/tools/post-receive.hook +++ b/tools/post-receive.hook @@ -15,7 +15,7 @@ STATE_MAP="refs/heads/master:Accepted" # EXCLUDE="" -PWDIR=/srv/patchwork/apps/patchwork +PWDIR=/srv/patchwork/patchwork do_exit=0 trap "do_exit=1" INT diff --git a/tox.ini b/tox.ini index 8d99e6a..485f7c7 100644 --- a/tox.ini +++ b/tox.ini @@ -8,14 +8,14 @@ commands = flake8 {posargs} [flake8] ignore = E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E251,H405 -exclude = ./apps/patchwork/tests +exclude = ./patchwork/tests [testenv:lint] basepython = python2.7 deps = pylint -r{toxinidir}/docs/requirements-django-1.7-mysql.txt -commands = pylint apps --rcfile=pylint.rc +commands = pylint patchwork --rcfile=pylint.rc [testenv:coverage] basepython = python2.7 @@ -26,16 +26,16 @@ setenv = DJANGO_SETTINGS_MODULE = patchwork.settings.dev commands = coverage erase - {toxinidir}/apps/manage.py syncdb - coverage run --omit=*tox* --branch {toxinidir}/apps/manage.py test patchwork + {toxinidir}/manage.py syncdb + coverage run --omit=*tox* --branch {toxinidir}/manage.py test patchwork coverage report -m [testenv] basepython = py27: python2.7 commands = - {toxinidir}/apps/manage.py syncdb - {toxinidir}/apps/manage.py test patchwork + {toxinidir}/manage.py syncdb + {toxinidir}/manage.py test patchwork deps = python-dateutil==1.5 MySQL-python==1.2.5 -- 2.39.2