|
|
@ -65,6 +65,8 @@ def main():
|
|
|
|
'--server',
|
|
|
|
'--server',
|
|
|
|
default='http://codereview.chromium.org',
|
|
|
|
default='http://codereview.chromium.org',
|
|
|
|
help='Rietveld server')
|
|
|
|
help='Rietveld server')
|
|
|
|
|
|
|
|
parser.add_option('--no-commit', action='store_true',
|
|
|
|
|
|
|
|
help='Do not try to commit patch to SCM (git only)')
|
|
|
|
options, args = parser.parse_args()
|
|
|
|
options, args = parser.parse_args()
|
|
|
|
logging.basicConfig(
|
|
|
|
logging.basicConfig(
|
|
|
|
format='%(levelname)5s %(module)11s(%(lineno)4d): %(message)s',
|
|
|
|
format='%(levelname)5s %(module)11s(%(lineno)4d): %(message)s',
|
|
|
@ -137,12 +139,12 @@ def main():
|
|
|
|
print(patch)
|
|
|
|
print(patch)
|
|
|
|
full_dir = os.path.abspath(options.root_dir)
|
|
|
|
full_dir = os.path.abspath(options.root_dir)
|
|
|
|
scm_type = scm.determine_scm(full_dir)
|
|
|
|
scm_type = scm.determine_scm(full_dir)
|
|
|
|
if scm_type == 'svn':
|
|
|
|
if options.no_commit or scm_type is None:
|
|
|
|
|
|
|
|
scm_obj = checkout.RawCheckout(full_dir, None, None)
|
|
|
|
|
|
|
|
elif scm_type == 'svn':
|
|
|
|
scm_obj = checkout.SvnCheckout(full_dir, None, None, None, None)
|
|
|
|
scm_obj = checkout.SvnCheckout(full_dir, None, None, None, None)
|
|
|
|
elif scm_type == 'git':
|
|
|
|
elif scm_type == 'git':
|
|
|
|
scm_obj = checkout.GitCheckoutBase(full_dir, None, None)
|
|
|
|
scm_obj = checkout.GitCheckoutBase(full_dir, None, None)
|
|
|
|
elif scm_type == None:
|
|
|
|
|
|
|
|
scm_obj = checkout.RawCheckout(full_dir, None, None)
|
|
|
|
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
parser.error('Couldn\'t determine the scm')
|
|
|
|
parser.error('Couldn\'t determine the scm')
|
|
|
|
|
|
|
|
|
|
|
|