~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commands.py

  • Committer: Robert Collins
  • Date: 2005-10-06 00:52:53 UTC
  • Revision ID: robertc@robertcollins.net-20051006005253-415c38ad22094f13
define some expected behaviour for inventory_entry.snapshot

Show diffs side-by-side

added added

removed removed

Lines of Context:
355
355
    'root':                   str,
356
356
    'no-backup':              None,
357
357
    'pattern':                str,
358
 
    'remember':               None,
359
358
    }
360
359
 
361
360
SHORT_OPTIONS = {
625
624
def run_bzr_catch_errors(argv):
626
625
    try:
627
626
        try:
628
 
            return run_bzr(argv)
629
 
        finally:
630
 
            # do this here inside the exception wrappers to catch EPIPE
631
 
            sys.stdout.flush()
 
627
            try:
 
628
                return run_bzr(argv)
 
629
            finally:
 
630
                # do this here inside the exception wrappers to catch EPIPE
 
631
                sys.stdout.flush()
 
632
        #wrap common errors as CommandErrors.
 
633
        except (NotBranchError,), e:
 
634
            raise BzrCommandError(str(e))
632
635
    except BzrCommandError, e:
633
636
        # command line syntax error, etc
634
637
        log_error(str(e))
650
653
            bzrlib.trace.note('broken pipe')
651
654
            return 2
652
655
        else:
653
 
            ## import pdb
654
 
            ## pdb.pm()
655
656
            bzrlib.trace.log_exception()
656
657
            return 2
657
658