~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/status.py

Give branch its own basis tree and last_revision methods; deprecated branch.working_tree()

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
17
import sys
18
 
from bzrlib.osutils import is_inside_any
 
18
 
19
19
from bzrlib.delta import compare_trees
 
20
from bzrlib.errors import NoSuchRevision
20
21
from bzrlib.log import line_log
21
 
from bzrlib.errors import NoSuchRevision
 
22
from bzrlib.osutils import is_inside_any
 
23
from bzrlib.workingtree import WorkingTree
22
24
 
23
25
# TODO: when showing single-line logs, truncate to the width of the terminal
24
26
# if known, but only if really going to the terminal (not into a file)
66
68
    try:
67
69
        new_is_working_tree = True
68
70
        if revision is None:
69
 
            old = branch.basis_tree()
70
 
            new = branch.working_tree()
 
71
            new = WorkingTree(branch.base, branch)
 
72
            old = new.basis_tree()
71
73
        elif len(revision) > 0:
72
74
            try:
73
75
                rev_id = revision[0].in_history(branch).rev_id
82
84
                except NoSuchRevision, e:
83
85
                    raise BzrCommandError(str(e))
84
86
            else:
85
 
                new = branch.working_tree()
 
87
                new = WorkingTree(branch.base, branch)
86
88
                
87
 
 
88
89
        delta = compare_trees(old, new, want_unchanged=show_unchanged,
89
90
                              specific_files=specific_files)
90
 
 
91
91
        delta.show(to_file,
92
92
                   show_ids=show_ids,
93
93
                   show_unchanged=show_unchanged)