~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to __init__.py

  • Committer: Michael Ellerman
  • Date: 2006-03-12 13:55:53 UTC
  • mto: (325.1.2 bzrtools) (0.3.1 shelf-dev)
  • mto: This revision was merged to the branch mainline in revision 334.
  • Revision ID: michael@ellerman.id.au-20060312135553-151b108c9d215d85
Add support for detecting and upgrading from old format shelves.

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
        delete (del) <patch>  Delete a patch from the current shelf.
52
52
        switch       <shelf>  Switch to the named shelf, create it if necessary.
53
53
        show         <patch>  Show the contents of the specified patch.
 
54
        upgrade               Upgrade old format shelves.
54
55
    """
55
56
    takes_args = ['subcommand', 'args*']
56
57
 
73
74
        elif subcommand == 'show':
74
75
            self.__check_one_arg(args_list, "shelf show takes one argument!")
75
76
            s.display(args_list[0])
 
77
        elif subcommand == 'upgrade':
 
78
            self.__check_no_args(args_list, "shelf upgrade takes no arguments!")
 
79
            s.upgrade()
76
80
        else:
77
81
            print subcommand, args_list
78
82
            print >>sys.stderr, "Unknown shelf subcommand '%s'" % subcommand