# Path: oroboros/core/cfg.py
# def load():
# def save():
# def _test():
# 
# Path: oroboros/core/hgrepo.py
# def init(path=None, allow=['*'], deny=[], ssl=False):
# def commit(path=None):
# def clone(src=None, dest=None, user=None, pswd=None):
# def make_dest_url(dest, user, pswd):
# def pull(src=None, dest=None, user=None, pswd=None):
# def push(src=None, dest=None, user=None, pswd=None):


import sys
from oroboros.core import cfg
from oroboros.core import hgrepo
  --push[=src]      push changes from charts dir to repo, default %s
  -h, --help        print this text

see also: hg
""" % (cfg.charts_dir, cfg.hg_repo, cfg.hg_repo, cfg.charts_dir)

cmd = sys.argv[1]

def getarg(opt):
	"""Get option argument.
	
	:type opt: str
	:rtype: str or None
	"""
	try:
		cmd, arg = opt.split('=')
	except ValueError:
		arg = None
	return arg

if cmd in ('-h', '--help'):
	sys.exit(help_text)
elif cmd.startswith('--init'):
	arg = getarg(cmd)
	hgrepo.init(arg)
elif cmd.startswith('--clone'):
	arg = getarg(cmd)
	hgrepo.clone(arg)
elif cmd.startswith('--pull'):
	arg = getarg(cmd)

# Path: oroboros/core/cfg.py
# def load():
# def save():
# def _test():
# 
# Path: oroboros/core/hgrepo.py
# def init(path=None, allow=['*'], deny=[], ssl=False):
# def commit(path=None):
# def clone(src=None, dest=None, user=None, pswd=None):
# def make_dest_url(dest, user, pswd):
# def pull(src=None, dest=None, user=None, pswd=None):
# def push(src=None, dest=None, user=None, pswd=None):


# Path: oroboros/cli/hgrepo.py
import sys
from oroboros.core import cfg
from oroboros.core import hgrepo

  --push[=src]      push changes from charts dir to repo, default %s
  -h, --help        print this text

see also: hg
""" % (cfg.charts_dir, cfg.hg_repo, cfg.hg_repo, cfg.charts_dir)

cmd = sys.argv[1]

def getarg(opt):
	"""Get option argument.
	
	:type opt: str
	:rtype: str or None
	"""
	try:
		cmd, arg = opt.split('=')
	except ValueError:
		arg = None
	return arg

if cmd in ('-h', '--help'):
	sys.exit(help_text)
elif cmd.startswith('--init'):
	arg = getarg(cmd)
	hgrepo.init(arg)
elif cmd.startswith('--clone'):
	arg = getarg(cmd)
	hgrepo.clone(arg)
elif cmd.startswith('--pull'):
	arg = getarg(cmd)

	hgrepo.pull(arg)