~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to __init__.py

  • Committer: Michael Ellerman
  • Date: 2006-02-06 13:41:53 UTC
  • mto: (0.1.73 shelf-tmp)
  • mto: This revision was merged to the branch mainline in revision 334.
  • Revision ID: michael@ellerman.id.au-20060206134153-189a1851eb08cb35
Factor out patch generation into PatchSource classes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
import bzrlib.branch
7
7
from bzrlib.errors import BzrCommandError
8
8
from bzrlib.option import Option
 
9
from patchsource import BzrPatchSource
9
10
from shelf import Shelf
10
11
 
11
12
class cmd_shelve(bzrlib.commands.Command):
42
43
                                  "parameter.")
43
44
 
44
45
        s = Shelf(branchdir)
45
 
        s.shelve(pick, message, revision, file_list)
 
46
        source = BzrPatchSource(revision, file_list)
 
47
        s.shelve(source, pick, message)
46
48
        return 0
47
49
 
48
50
class cmd_unshelve(bzrlib.commands.Command):
52
54
    takes_options = [Option('pick')]
53
55
    def run(self, pick=False):
54
56
        s = Shelf('.')
55
 
        s.unshelve(pick)
 
57
        source = BzrPatchSource()
 
58
        s.unshelve(source, pick)
56
59
        return 0
57
60
 
58
61
bzrlib.commands.register_command(cmd_shelve)