mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-10 18:21:28 +00:00
fail gracefully if git reparent-branch is called in cog
Bug: 339231299 Change-Id: I395095bbdf4d097ff1ab236eb07cf308cef04799 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5540929 Reviewed-by: Josip Sokcevic <sokcevic@chromium.org> Commit-Queue: Josip Sokcevic <sokcevic@chromium.org> Auto-Submit: Yiwei Zhang <yiwzhang@google.com>
This commit is contained in:
@@ -13,12 +13,18 @@ from git_common import upstream, current_branch, run, tags, set_branch_config
|
||||
from git_common import get_or_create_merge_base, root, manual_merge_base
|
||||
from git_common import get_branch_tree, topo_iter
|
||||
|
||||
import gclient_utils
|
||||
import git_rebase_update
|
||||
import metrics
|
||||
|
||||
|
||||
@metrics.collector.collect_metrics('git reparent-branch')
|
||||
def main(args):
|
||||
if gclient_utils.IsEnvCog():
|
||||
print(
|
||||
'reparent-branch command is not supported in non-git environment.',
|
||||
file=sys.stderr)
|
||||
return 1
|
||||
root_ref = root()
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
|
||||
Reference in New Issue
Block a user