fail gracefully if git nav-downstream is called in cog

Bug: 339231299
Change-Id: If4d5dcc0ee0606acd8b539d19b29106f5152bba3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5540889
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Auto-Submit: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
changes/89/5540889/4
Yiwei Zhang 11 months ago committed by LUCI CQ
parent 5773197a10
commit 60997ea745

@ -11,13 +11,18 @@ which branch.
import argparse
import sys
import gclient_utils
from git_common import current_branch, branches, upstream, run, hash_one
import gclient_utils
import metrics
@metrics.collector.collect_metrics('git nav-downstream')
def main(args):
if gclient_utils.IsEnvCog():
print('nav-downstream command is not supported in non-git environment.',
file=sys.stderr)
return 1
parser = argparse.ArgumentParser()
parser.add_argument('--pick',
help=('The number to pick if this command would '

Loading…
Cancel
Save