~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/status.py

Move doctest import to increase speed

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
from bzrlib.delta import compare_trees
20
20
from bzrlib.diff import _raise_if_nonexistent
21
 
import bzrlib.errors as errors
 
21
from bzrlib.errors import NoSuchRevision
22
22
from bzrlib.log import line_log
23
23
from bzrlib.osutils import is_inside_any
24
 
from bzrlib.symbol_versioning import (deprecated_function,
25
 
        zero_eight,
26
 
        )
 
24
from bzrlib.symbol_versioning import *
27
25
 
28
26
# TODO: when showing single-line logs, truncate to the width of the terminal
29
27
# if known, but only if really going to the terminal (not into a file)
119
117
            try:
120
118
                rev_id = revision[0].in_history(wt.branch).rev_id
121
119
                old = wt.branch.repository.revision_tree(rev_id)
122
 
            except errors.NoSuchRevision, e:
123
 
                raise errors.BzrCommandError(str(e))
 
120
            except NoSuchRevision, e:
 
121
                raise BzrCommandError(str(e))
124
122
            if (len(revision) > 1) and (revision[1].spec is not None):
125
123
                try:
126
124
                    rev_id = revision[1].in_history(wt.branch).rev_id
127
125
                    new = wt.branch.repository.revision_tree(rev_id)
128
126
                    new_is_working_tree = False
129
 
                except errors.NoSuchRevision, e:
130
 
                    raise errors.BzrCommandError(str(e))
 
127
                except NoSuchRevision, e:
 
128
                    raise BzrCommandError(str(e))
131
129
            else:
132
130
                new = wt
133
131
        _raise_if_nonexistent(specific_files, old, new)
177
175
                mm_revision = branch.repository.get_revision(mmerge)
178
176
                print >> to_file, '   ', line_log(mm_revision, 75)
179
177
                ignore.add(mmerge)
180
 
        except errors.NoSuchRevision:
181
 
            print >> to_file, ' ', merge
 
178
        except NoSuchRevision:
 
179
            print >> to_file, ' ', merge 
182
180
        
183
181
def list_paths(header, paths, specific_files, to_file):
184
182
    done_header = False