代码拉取完成,页面将自动刷新
同步操作将从 dengly/depot_tools 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/usr/bin/env python3
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Explicitly set/remove/print the merge-base for the current branch.
This manually set merge base will be a stand-in for `git merge-base` for the
purposes of the chromium depot_tools git extensions. Passing no arguments will
just print the effective merge base for the current branch.
"""
import argparse
import sys
from subprocess2 import CalledProcessError
from git_common import remove_merge_base, manual_merge_base, current_branch
from git_common import get_or_create_merge_base, hash_one, upstream
def main(argv):
parser = argparse.ArgumentParser(
description=__doc__.strip().splitlines()[0],
epilog=' '.join(__doc__.strip().splitlines()[1:]))
g = parser.add_mutually_exclusive_group()
g.add_argument(
'merge_base',
nargs='?',
help='The new hash to use as the merge base for the current branch')
g.add_argument('--delete',
'-d',
action='store_true',
help='Remove the set mark.')
opts = parser.parse_args(argv)
cur = current_branch()
if opts.delete:
try:
remove_merge_base(cur)
except CalledProcessError:
print('No merge base currently exists for %s.' % cur)
return 0
if opts.merge_base:
try:
opts.merge_base = hash_one(opts.merge_base)
except CalledProcessError:
print('fatal: could not resolve %s as a commit' % opts.merge_base,
file=sys.stderr)
return 1
manual_merge_base(cur, opts.merge_base, upstream(cur))
ret = 0
actual = get_or_create_merge_base(cur)
if opts.merge_base and opts.merge_base != actual:
ret = 1
print("Invalid merge_base %s" % opts.merge_base)
print("merge_base(%s): %s" % (cur, actual))
return ret
if __name__ == '__main__':
try:
sys.exit(main(sys.argv[1:]))
except KeyboardInterrupt:
sys.stderr.write('interrupted\n')
sys.exit(1)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。