Mercurial > hg > config
changeset 467:980584d34134
python/hgrc.py
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Sat, 10 Aug 2013 18:50:44 -0700 |
parents | 3ffcbffb6fb4 |
children | 4853551536d6 |
files | python/hgrc.py |
diffstat | 1 files changed, 13 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/python/hgrc.py Sat Aug 10 18:46:53 2013 -0700 +++ b/python/hgrc.py Sat Aug 10 18:50:44 2013 -0700 @@ -13,6 +13,15 @@ import sys from ConfigParser import RawConfigParser as ConfigParser +def set_default_push(parser, default_push): + """ + set [paths]:default_push to `default_push` + """ + pass + +def set_default_push_to_ssh(): + pass + def main(args=sys.argv[1:]): # parse command line arguments @@ -28,6 +37,10 @@ help="set [paths] default-push location") options, args = parser.parse_args(args) + # sanitization + if options.default_push and options.default_push_ssh: + parser.error("Cannot set --push and --ssh") + # if not specified, use repo from `hg root` if not args: args = [subprocess.check_output(['hg', 'root']).strip()]