/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar
0.12.1 by Aaron Bentley
Initial bencode-based encoding
1
# Copyright (C) 2008 Aaron Bentley <aaron@aaronbentley.com>
2
#
3
#    This program is free software; you can redistribute it and/or modify
4
#    it under the terms of the GNU General Public License as published by
5
#    the Free Software Foundation; either version 2 of the License, or
6
#    (at your option) any later version.
7
#
8
#    This program is distributed in the hope that it will be useful,
9
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
10
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
#    GNU General Public License for more details.
12
#
13
#    You should have received a copy of the GNU General Public License
14
#    along with this program; if not, write to the Free Software
15
#    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
0.16.1 by Aaron Bentley
Begin implementing UI
17
"""Reimplementation of shelf commands."""
18
19
from bzrlib import commands
20
21
22
class cmd_shelve2(commands.Command):
0.16.5 by Aaron Bentley
Get text shelving working
23
    """Put some changes to the side for a while."""
24
0.16.15 by Aaron Bentley
Implement auto mode
25
    takes_options = [
26
        'revision',
0.16.28 by Aaron Bentley
fix option grammar
27
        commands.Option('all', help='Shelve all changes.')]
0.16.1 by Aaron Bentley
Begin implementing UI
28
0.16.15 by Aaron Bentley
Implement auto mode
29
    def run(self, revision=None, all=False):
0.16.34 by Aaron Bentley
Rename shelver to shelf_ui
30
        from bzrlib.plugins.shelf2.shelf_ui import Shelver
0.16.15 by Aaron Bentley
Implement auto mode
31
        Shelver.from_args(revision, all).run()
0.16.8 by Aaron Bentley
Implement unshelve2, tidy shelve2
32
33
class cmd_unshelve2(commands.Command):
34
    """Restore shelved changes."""
35
0.16.1 by Aaron Bentley
Begin implementing UI
36
    def run(self):
0.16.34 by Aaron Bentley
Rename shelver to shelf_ui
37
        from bzrlib.plugins.shelf2.shelf_ui import Unshelver
0.16.8 by Aaron Bentley
Implement unshelve2, tidy shelve2
38
        Unshelver.from_args().run()
0.16.1 by Aaron Bentley
Begin implementing UI
39
40
41
commands.register_command(cmd_shelve2)
0.16.8 by Aaron Bentley
Implement unshelve2, tidy shelve2
42
commands.register_command(cmd_unshelve2)
0.16.1 by Aaron Bentley
Begin implementing UI
43
0.12.1 by Aaron Bentley
Initial bencode-based encoding
44
45
def test_suite():
46
    from bzrlib.plugins.shelf2 import tests
47
    return tests.test_suite()