~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/status.py

  • Committer: Martin Pool
  • Date: 2006-02-22 04:29:54 UTC
  • mfrom: (1566 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1569.
  • Revision ID: mbp@sourcefrog.net-20060222042954-60333f08dd56a646
[merge] from bzr.dev before integration
Fix undefined ordering in sign_my_revisions breaking tests

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
22
23
 
23
24
# TODO: when showing single-line logs, truncate to the width of the terminal
24
25
# if known, but only if really going to the terminal (not into a file)
66
67
    try:
67
68
        new_is_working_tree = True
68
69
        if revision is None:
69
 
            old = branch.basis_tree()
70
 
            new = branch.working_tree()
 
70
            new = branch.bzrdir.open_workingtree()
 
71
            old = new.basis_tree()
71
72
        elif len(revision) > 0:
72
73
            try:
73
74
                rev_id = revision[0].in_history(branch).rev_id
74
75
                old = branch.repository.revision_tree(rev_id)
75
76
            except NoSuchRevision, e:
76
77
                raise BzrCommandError(str(e))
77
 
            if len(revision) > 1:
 
78
            if (len(revision) > 1) and (revision[1].spec is not None):
78
79
                try:
79
80
                    rev_id = revision[1].in_history(branch).rev_id
80
81
                    new = branch.repository.revision_tree(rev_id)
82
83
                except NoSuchRevision, e:
83
84
                    raise BzrCommandError(str(e))
84
85
            else:
85
 
                new = branch.working_tree()
 
86
                new = branch.bzrdir.open_workingtree()
86
87
                
87
 
 
88
88
        delta = compare_trees(old, new, want_unchanged=show_unchanged,
89
89
                              specific_files=specific_files)
90
 
 
91
90
        delta.show(to_file,
92
91
                   show_ids=show_ids,
93
92
                   show_unchanged=show_unchanged)