Skip to content

Commit

Permalink
[IMP] odoo.py git options
Browse files Browse the repository at this point in the history
  • Loading branch information
antonylesuisse committed Jun 2, 2014
1 parent 67bff17 commit 872842f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions odoo.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def git_locate():
path = None
return path

def cmd_setup_git_init():
def cmd_setup_git():
git_dir = git_locate()
if git_dir:
printf('git repo found at %s',git_dir)
Expand All @@ -67,12 +67,16 @@ def cmd_setup_git_init():
os.chdir('odoo')
git_dir = os.getcwd()
if git_dir:
# sane push config for git < 2.0
# push sane config for git < 2.0, and hooks
run('git','config','push.default','simple')
# alias
run('git','config','alias.st','status')
# merge bzr style
run('git','config','merge.ff','no')
run('git','config','merge.commit','no')
# push hooks
# pull let me choose between merge or rebase only works in git > 2.0, use an alias for 1
run('git','config','pull.ff','only')
run('git','config','alias.pl','pull --ff-only')
pre_push_path = os.path.join(git_dir, '.git/hooks/pre-push')
open(pre_push_path,'w').write(GIT_HOOKS_PRE_PUSH.strip())
os.chmod(pre_push_path, 0755)
Expand Down Expand Up @@ -137,7 +141,7 @@ def cmd_setup_pg():
setup_pg_debian(git_dir)

def cmd_setup():
cmd_setup_git_init()
cmd_setup_git()
cmd_setup_deps()
cmd_setup_pg()

Expand Down

0 comments on commit 872842f

Please sign in to comment.