[IMP] odoo.py git options
This commit is contained in:
parent
67bff17ecb
commit
872842ff9e
12
odoo.py
12
odoo.py
|
@ -58,7 +58,7 @@ def git_locate():
|
||||||
path = None
|
path = None
|
||||||
return path
|
return path
|
||||||
|
|
||||||
def cmd_setup_git_init():
|
def cmd_setup_git():
|
||||||
git_dir = git_locate()
|
git_dir = git_locate()
|
||||||
if git_dir:
|
if git_dir:
|
||||||
printf('git repo found at %s',git_dir)
|
printf('git repo found at %s',git_dir)
|
||||||
|
@ -67,12 +67,16 @@ def cmd_setup_git_init():
|
||||||
os.chdir('odoo')
|
os.chdir('odoo')
|
||||||
git_dir = os.getcwd()
|
git_dir = os.getcwd()
|
||||||
if git_dir:
|
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')
|
run('git','config','push.default','simple')
|
||||||
|
# alias
|
||||||
|
run('git','config','alias.st','status')
|
||||||
# merge bzr style
|
# merge bzr style
|
||||||
run('git','config','merge.ff','no')
|
run('git','config','merge.ff','no')
|
||||||
run('git','config','merge.commit','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')
|
pre_push_path = os.path.join(git_dir, '.git/hooks/pre-push')
|
||||||
open(pre_push_path,'w').write(GIT_HOOKS_PRE_PUSH.strip())
|
open(pre_push_path,'w').write(GIT_HOOKS_PRE_PUSH.strip())
|
||||||
os.chmod(pre_push_path, 0755)
|
os.chmod(pre_push_path, 0755)
|
||||||
|
@ -137,7 +141,7 @@ def cmd_setup_pg():
|
||||||
setup_pg_debian(git_dir)
|
setup_pg_debian(git_dir)
|
||||||
|
|
||||||
def cmd_setup():
|
def cmd_setup():
|
||||||
cmd_setup_git_init()
|
cmd_setup_git()
|
||||||
cmd_setup_deps()
|
cmd_setup_deps()
|
||||||
cmd_setup_pg()
|
cmd_setup_pg()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue