|
|
|
@ -169,10 +169,14 @@ def calculate_roll(full_dir, dependency, roll_to):
|
|
|
|
if not head:
|
|
|
|
if not head:
|
|
|
|
raise Error('%s is unpinned.' % dependency)
|
|
|
|
raise Error('%s is unpinned.' % dependency)
|
|
|
|
check_call(['git', 'fetch', 'origin', '--quiet'], cwd=full_dir)
|
|
|
|
check_call(['git', 'fetch', 'origin', '--quiet'], cwd=full_dir)
|
|
|
|
|
|
|
|
if roll_to == 'origin/HEAD':
|
|
|
|
|
|
|
|
check_output(['git', 'remote', 'set-head', 'origin', '-a'], cwd=full_dir)
|
|
|
|
|
|
|
|
|
|
|
|
roll_to = check_output(['git', 'rev-parse', roll_to], cwd=full_dir).strip()
|
|
|
|
roll_to = check_output(['git', 'rev-parse', roll_to], cwd=full_dir).strip()
|
|
|
|
return head, roll_to
|
|
|
|
return head, roll_to
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def gen_commit_msg(logs, cmdline, reviewers, bug):
|
|
|
|
def gen_commit_msg(logs, cmdline, reviewers, bug):
|
|
|
|
"""Returns the final commit message."""
|
|
|
|
"""Returns the final commit message."""
|
|
|
|
commit_msg = ''
|
|
|
|
commit_msg = ''
|
|
|
|
@ -218,7 +222,7 @@ def main():
|
|
|
|
'--log-limit', type=int, default=100,
|
|
|
|
'--log-limit', type=int, default=100,
|
|
|
|
help='Trim log after N commits (default: %(default)s)')
|
|
|
|
help='Trim log after N commits (default: %(default)s)')
|
|
|
|
parser.add_argument(
|
|
|
|
parser.add_argument(
|
|
|
|
'--roll-to', default='origin/master',
|
|
|
|
'--roll-to', default='origin/HEAD',
|
|
|
|
help='Specify the new commit to roll to (default: %(default)s)')
|
|
|
|
help='Specify the new commit to roll to (default: %(default)s)')
|
|
|
|
parser.add_argument(
|
|
|
|
parser.add_argument(
|
|
|
|
'--key', action='append', default=[],
|
|
|
|
'--key', action='append', default=[],
|
|
|
|
@ -227,7 +231,7 @@ def main():
|
|
|
|
args = parser.parse_args()
|
|
|
|
args = parser.parse_args()
|
|
|
|
|
|
|
|
|
|
|
|
if len(args.dep_path) > 1:
|
|
|
|
if len(args.dep_path) > 1:
|
|
|
|
if args.roll_to != 'origin/master':
|
|
|
|
if args.roll_to != 'origin/HEAD':
|
|
|
|
parser.error(
|
|
|
|
parser.error(
|
|
|
|
'Can\'t use multiple paths to roll simultaneously and --roll-to')
|
|
|
|
'Can\'t use multiple paths to roll simultaneously and --roll-to')
|
|
|
|
if args.key:
|
|
|
|
if args.key:
|
|
|
|
|