~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to __init__.py

  • Committer: Michael Ellerman
  • Date: 2005-11-29 19:15:49 UTC
  • mto: (0.3.1 shelf-dev) (325.1.2 bzrtools)
  • mto: This revision was merged to the branch mainline in revision 334.
  • Revision ID: michael@ellerman.id.au-20051129191549-1d4e5723f337c6e9
Remove hack to make errors prettier now that mainline bzr prints them in a
nicer way.

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
                raise BzrCommandError("shelve only accepts a single revision "
42
42
                                  "parameter.")
43
43
 
44
 
        # FIXME this try/except sucks
45
 
        try:
46
 
            s = Shelf(branchdir)
47
 
            s.shelve(pick, message, revision, file_list)
48
 
        except BzrCommandError, e:
49
 
            print >> stderr, e
50
 
            return 1
 
44
        s = Shelf(branchdir)
 
45
        s.shelve(pick, message, revision, file_list)
51
46
        return 0
52
47
 
53
48
class cmd_unshelve(bzrlib.commands.Command):
56
51
    """
57
52
    takes_options = [Option('pick')]
58
53
    def run(self, pick=False):
59
 
        # FIXME this try/except sucks
60
 
        try:
61
 
            s = Shelf('.')
62
 
            s.unshelve(pick)
63
 
        except BzrCommandError, e:
64
 
            print >> stderr, e
65
 
            return 1
 
54
        s = Shelf('.')
 
55
        s.unshelve(pick)
66
56
        return 0
67
57
 
68
58
bzrlib.commands.register_command(cmd_shelve)