Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

code cleanup

  • Loading branch information...
commit 94ae8621db33c37ad092f6a4b712459b3e9f6d28 1 parent fe00125
Harley Bussell authored
View
2  djangofab/api.py
@@ -1,7 +1,7 @@
from fabric.api import *
from fabric.context_managers import *
from fabric.operations import _handle_failure
-from djangofab.vcs.git import update_remote, update_local, push, commit, add
+#from djangofab.vcs.git import update_remote, update_local, push, commit, add
from djangofab.decorator import user_settings
from djangofab.util import local as local, apply_settings
from djangofab.django import get_remote_db, put_local_db, change_ownership, touch_wsgi
View
6 djangofab/decorator.py
@@ -1,11 +1,7 @@
-import os
-import sys
-import ConfigParser
-import subprocess
-from djangofab.util import apply_settings
def user_settings(file='fab.cfg', group='default'):
"Decorator to load user settings from a config file into the env"
+ from djangofab.util import apply_settings
def wrap(f=None):
def wrapped_f(*args):
f(*args)
View
3  djangofab/django.py
@@ -61,7 +61,8 @@ def change_ownership():
def touch_wsgi():
"Touch the wsgi file to trigger wsgi to reload the processes."
with cd(env.path):
- run("touch bin/django.wsgi")
+ #run("touch bin/django.wsgi")
+ run("touch %s" % env.wsgi)
def syncdb():
"Sync database and run"
View
6 djangofab/util.py
@@ -1,8 +1,8 @@
import os
-import sys
import ConfigParser
-import subprocess
-from djangofab.api import *
+#from djangofab.api import *
+from fabric.api import *
+from fabric.operations import local as _local
def local(cmd):
if hasattr(env,'capture_default'):
View
9 djangofab/vcs/git.py
@@ -1,5 +1,6 @@
from __future__ import with_statement
from djangofab.api import *
+import os
def update_remote():
"Update remote checkout to the latest version"
@@ -7,6 +8,14 @@ def update_remote():
run('git reset --hard')
run('git pull')
+def update_app():
+ "Update remote checkout to the latest version"
+ app = prompt('app name?')
+ #with cd(os.path.join(os.path.dirname(env.path),'src',app)):
+ with cd(os.path.join(env.virtualenv,'src',app)):
+ run('git reset --hard')
+ run('git pull origin master')
+
def push():
"Pull changes from version control"
local('git push')
Please sign in to comment.
Something went wrong with that request. Please try again.