~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree_4.py

  • Committer: Ian Clatworthy
  • Date: 2007-09-14 01:14:26 UTC
  • mto: (2820.1.1 ianc-integration)
  • mto: This revision was merged to the branch mainline in revision 2822.
  • Revision ID: ian.clatworthy@internode.on.net-20070914011426-wdtanslfmknxs1g5
minor tree & dirstate code cleanups

Show diffs side-by-side

added added

removed removed

Lines of Context:
132
132
        """
133
133
        self._format = _format
134
134
        self.bzrdir = _bzrdir
135
 
        from bzrlib.trace import note, mutter
136
135
        assert isinstance(basedir, basestring), \
137
136
            "base directory %r is not a string" % basedir
138
137
        basedir = safe_unicode(basedir)
275
274
    def _directory_is_tree_reference(self, relpath):
276
275
        # as a special case, if a directory contains control files then 
277
276
        # it's a tree reference, except that the root of the tree is not
278
 
        return relpath and osutils.isdir(self.abspath(relpath) + u"/.bzr")
 
277
        return len(relpath) > 0 and \
 
278
            osutils.isdir(self.abspath(relpath) + u"/.bzr")
279
279
        # TODO: We could ask all the control formats whether they
280
280
        # recognize this directory, but at the moment there's no cheap api
281
281
        # to do that.  Since we probably can only nest bzr checkouts and