/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.47 by Aaron Bentley
Support selecting files to shelve
25
    takes_args = ['file*']
26
0.16.15 by Aaron Bentley
Implement auto mode
27
    takes_options = [
28
        'revision',
0.16.28 by Aaron Bentley
fix option grammar
29
        commands.Option('all', help='Shelve all changes.')]
0.16.1 by Aaron Bentley
Begin implementing UI
30
0.16.47 by Aaron Bentley
Support selecting files to shelve
31
    def run(self, revision=None, all=False, file_list=None):
0.16.34 by Aaron Bentley
Rename shelver to shelf_ui
32
        from bzrlib.plugins.shelf2.shelf_ui import Shelver
0.16.47 by Aaron Bentley
Support selecting files to shelve
33
        Shelver.from_args(revision, all, file_list).run()
34
0.16.8 by Aaron Bentley
Implement unshelve2, tidy shelve2
35
36
class cmd_unshelve2(commands.Command):
37
    """Restore shelved changes."""
38
0.16.54 by Aaron Bentley
Inform user about shelf ids.
39
    takes_args = ['shelf_id?']
0.16.52 by Aaron Bentley
Allow user-specified shelves
40
41
    def run(self, shelf_id=None):
0.16.34 by Aaron Bentley
Rename shelver to shelf_ui
42
        from bzrlib.plugins.shelf2.shelf_ui import Unshelver
0.16.52 by Aaron Bentley
Allow user-specified shelves
43
        Unshelver.from_args(shelf_id).run()
0.16.1 by Aaron Bentley
Begin implementing UI
44
45
46
commands.register_command(cmd_shelve2)
0.16.8 by Aaron Bentley
Implement unshelve2, tidy shelve2
47
commands.register_command(cmd_unshelve2)
0.16.1 by Aaron Bentley
Begin implementing UI
48
0.12.1 by Aaron Bentley
Initial bencode-based encoding
49
50
def test_suite():
51
    from bzrlib.plugins.shelf2 import tests
52
    return tests.test_suite()