~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

  • Committer: John Arbash Meinel
  • Date: 2006-04-26 19:54:32 UTC
  • mto: This revision was merged to the branch mainline in revision 1752.
  • Revision ID: john@arbash-meinel.com-20060426195432-5de612237c46f96d
Updated LocalTransport so that it's base is now a URL rather than a local path. This helps consistency with all other functions. To do so, I added local_abspath() which returns the local path, and local_path_to/from_url

Show diffs side-by-side

added added

removed removed

Lines of Context:
283
283
        # if needed, or, when the cache sees a change, append it to the hash
284
284
        # cache file, and have the parser take the most recent entry for a
285
285
        # given path only.
286
 
        cache_filename = self.bzrdir.get_workingtree_transport(None).abspath('stat-cache')
 
286
        cache_filename = self.bzrdir.get_workingtree_transport(None).local_abspath('stat-cache')
287
287
        hc = self._hashcache = HashCache(basedir, cache_filename, self._control_files._file_mode)
288
288
        hc.read()
289
289
        # is this scan needed ? it makes things kinda slow.
700
700
                ## should exclude it.
701
701
 
702
702
                # the bzrdir for this tree
 
703
                # TODO: jam 20060426 I think this is now broken
 
704
                #       but it needs to be tested
703
705
                if self.bzrdir.transport.base.endswith(f + '/'):
704
706
                    continue
705
707
 
1533
1535
                branch.unlock()
1534
1536
        revision = branch.last_revision()
1535
1537
        inv = Inventory() 
1536
 
        wt = WorkingTree(a_bzrdir.root_transport.base,
 
1538
        wt = WorkingTree(a_bzrdir.root_transport.local_abspath('.'),
1537
1539
                         branch,
1538
1540
                         inv,
1539
1541
                         _internal=True,
1561
1563
            raise NotImplementedError
1562
1564
        if not isinstance(a_bzrdir.transport, LocalTransport):
1563
1565
            raise errors.NotLocalUrl(a_bzrdir.transport.base)
1564
 
        return WorkingTree(a_bzrdir.root_transport.base,
 
1566
        return WorkingTree(a_bzrdir.root_transport.local_abspath('.'),
1565
1567
                           _internal=True,
1566
1568
                           _format=self,
1567
1569
                           _bzrdir=a_bzrdir)
1612
1614
        if revision_id is None:
1613
1615
            revision_id = branch.last_revision()
1614
1616
        inv = Inventory() 
1615
 
        wt = WorkingTree3(a_bzrdir.root_transport.base,
 
1617
        wt = WorkingTree3(a_bzrdir.root_transport.local_abspath('.'),
1616
1618
                         branch,
1617
1619
                         inv,
1618
1620
                         _internal=True,
1647
1649
        if not isinstance(a_bzrdir.transport, LocalTransport):
1648
1650
            raise errors.NotLocalUrl(a_bzrdir.transport.base)
1649
1651
        control_files = self._open_control_files(a_bzrdir)
1650
 
        return WorkingTree3(a_bzrdir.root_transport.base,
 
1652
        return WorkingTree3(a_bzrdir.root_transport.local_abspath('.'),
1651
1653
                           _internal=True,
1652
1654
                           _format=self,
1653
1655
                           _bzrdir=a_bzrdir,