blob: f1e4c95725d5317be7deb2ad965bda812c2f3111 [file] [log] [blame]
[email protected]97345eb2014-03-13 07:55:151#!/usr/local/bin/python
[email protected]c050a5b2014-03-26 06:18:502# Copyright 2014 The Chromium Authors. All rights reserved.
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
5
[email protected]97345eb2014-03-13 07:55:156import sys
[email protected]97345eb2014-03-13 07:55:157import optparse
8
9import subcommand
[email protected]97345eb2014-03-13 07:55:1510
[email protected]c050a5b2014-03-26 06:18:5011from git_common import freeze, thaw
[email protected]97345eb2014-03-13 07:55:1512
[email protected]c050a5b2014-03-26 06:18:5013def CMDfreeze(parser, args):
[email protected]97345eb2014-03-13 07:55:1514 """Freeze a branch's changes."""
15 parser.parse_args(args)
16 return freeze()
17
18
[email protected]c050a5b2014-03-26 06:18:5019def CMDthaw(parser, args):
[email protected]97345eb2014-03-13 07:55:1520 """Returns a frozen branch to the state before it was frozen."""
21 parser.parse_args(args)
22 return thaw()
23
24
[email protected]c050a5b2014-03-26 06:18:5025def main():
[email protected]97345eb2014-03-13 07:55:1526 dispatcher = subcommand.CommandDispatcher(__name__)
27 ret = dispatcher.execute(optparse.OptionParser(), sys.argv[1:])
28 if ret:
29 print ret
30
31
[email protected]c050a5b2014-03-26 06:18:5032if __name__ == '__main__':
33 main()