mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
This reverts commit d6186f9936.
Reason for revert: <INSERT REASONING HERE>
Original change's description:
> depot_tools: Run Python scripts using vpython (Part 1)
>
> Tbr: iannucci@chromium.org
> Bug: 984182
> Change-Id: If36722e190d305f89d63dce91d0a600ddc34ebe3
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1748589
> Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
TBR=iannucci@chromium.org,ehmaldonado@chromium.org
Change-Id: I7686985852608d0703bcbbab137df1ce82b29723
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 984182
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1749853
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
41 lines
871 B
Python
Executable File
41 lines
871 B
Python
Executable File
#!/usr/bin/env python
|
|
# 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.
|
|
|
|
from __future__ import print_function
|
|
|
|
import sys
|
|
import optparse
|
|
|
|
import subcommand
|
|
|
|
from git_common import freeze, thaw
|
|
|
|
def CMDfreeze(parser, args):
|
|
"""Freeze a branch's changes."""
|
|
parser.parse_args(args)
|
|
return freeze()
|
|
|
|
|
|
def CMDthaw(parser, args):
|
|
"""Returns a frozen branch to the state before it was frozen."""
|
|
parser.parse_args(args)
|
|
return thaw()
|
|
|
|
|
|
def main(args):
|
|
dispatcher = subcommand.CommandDispatcher(__name__)
|
|
ret = dispatcher.execute(optparse.OptionParser(), args)
|
|
if ret:
|
|
print(ret)
|
|
return 0
|
|
|
|
|
|
if __name__ == '__main__':
|
|
try:
|
|
sys.exit(main(sys.argv[1:]))
|
|
except KeyboardInterrupt:
|
|
sys.stderr.write('interrupted\n')
|
|
sys.exit(1)
|