~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree_4.py

  • Committer: Patch Queue Manager
  • Date: 2012-03-04 18:21:04 UTC
  • mfrom: (6468.4.3 509275-lp-fixes)
  • Revision ID: pqm@pqm.ubuntu.com-20120304182104-8y1tdavoblrrhflc
(jelmer) Add --link-bug option to 'bzr lp-propose'. (Ross Lagerwall)

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
    cache_utf8,
39
39
    config,
40
40
    conflicts as _mod_conflicts,
41
 
    controldir,
42
41
    debug,
43
42
    dirstate,
44
43
    errors,
894
893
    @needs_read_lock
895
894
    def path2id(self, path):
896
895
        """Return the id for path in this tree."""
897
 
        if isinstance(path, list):
898
 
            if path == []:
899
 
                path = [""]
900
 
            path = osutils.pathjoin(*path)
901
896
        path = path.strip('/')
902
897
        entry = self._get_entry(path=path)
903
898
        if entry == (None, None):
1613
1608
    def _get_matchingbzrdir(self):
1614
1609
        """Overrideable method to get a bzrdir for testing."""
1615
1610
        # please test against something that will let us do tree references
1616
 
        return controldir.format_registry.make_bzrdir(
 
1611
        return bzrdir.format_registry.make_bzrdir(
1617
1612
            'development-subtree')
1618
1613
 
1619
1614
    _matchingbzrdir = property(__get_matchingbzrdir)
1781
1776
        if path is not None:
1782
1777
            path = path.encode('utf8')
1783
1778
        parent_index = self._get_parent_index()
1784
 
        return self._dirstate._get_entry(parent_index, fileid_utf8=file_id,
1785
 
            path_utf8=path)
 
1779
        return self._dirstate._get_entry(parent_index, fileid_utf8=file_id, path_utf8=path)
1786
1780
 
1787
1781
    def _generate_inventory(self):
1788
1782
        """Create and set self.inventory from the dirstate object.
2034
2028
    def path2id(self, path):
2035
2029
        """Return the id for path in this tree."""
2036
2030
        # lookup by path: faster than splitting and walking the ivnentory.
2037
 
        if isinstance(path, list):
2038
 
            if path == []:
2039
 
                path = [""]
2040
 
            path = osutils.pathjoin(*path)
2041
2031
        entry = self._get_entry(path=path)
2042
2032
        if entry == (None, None):
2043
2033
            return None