~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

  • Committer: Robert Collins
  • Date: 2006-09-05 08:14:23 UTC
  • mto: (1852.16.2 Tree.walkdirs)
  • mto: This revision was merged to the branch mainline in revision 1993.
  • Revision ID: robertc@robertcollins.net-20060905081423-b1bc9b092a9f8597
DeprecateĀ WorkingTree.last_revision.

Show diffs side-by-side

added added

removed removed

Lines of Context:
150
150
            from bzrlib.version import _get_bzr_source_tree
151
151
            src_tree = _get_bzr_source_tree()
152
152
            if src_tree:
153
 
                revision_id = src_tree.last_revision()
 
153
                try:
 
154
                    revision_id = src_tree.get_parent_ids()[0]
 
155
                except IndexError:
 
156
                    # XXX: if this is a brand new tree, do the same as if there
 
157
                    # is no branch.
 
158
                    revision_id = ''
154
159
            else:
155
160
                # XXX: If there's no branch, what should we do?
156
161
                revision_id = ''