/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

  • Committer: Vincent Ladeuil
  • Date: 2007-11-04 15:29:17 UTC
  • mfrom: (2961 +trunk)
  • mto: (2961.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 2962.
  • Revision ID: v.ladeuil+lp@free.fr-20071104152917-nrsumxpk3dikso2c
Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
64
64
    hashcache,
65
65
    ignores,
66
66
    merge,
67
 
    osutils,
68
67
    revision as _mod_revision,
69
68
    revisiontree,
70
69
    repository,
90
89
from bzrlib.lockdir import LockDir
91
90
import bzrlib.mutabletree
92
91
from bzrlib.mutabletree import needs_tree_write_lock
 
92
from bzrlib import osutils
93
93
from bzrlib.osutils import (
94
94
    compact_date,
95
95
    file_kind,
703
703
        if updated:
704
704
            self.set_parent_ids(parents, allow_leftmost_as_ghost=True)
705
705
 
706
 
    def path_content_summary(self, path, _lstat=osutils.lstat,
 
706
    def path_content_summary(self, path, _lstat=os.lstat,
707
707
        _mapper=osutils.file_kind_from_stat_mode):
708
708
        """See Tree.path_content_summary."""
709
709
        abspath = self.abspath(path)
1960
1960
                ' as of bzr 0.91.  Please use None (the default) instead.',
1961
1961
                DeprecationWarning, stacklevel=2)
1962
1962
        if old_tree is None:
1963
 
            old_tree = self.basis_tree()
1964
 
        conflicts = transform.revert(self, old_tree, filenames, backups, pb,
1965
 
                                     report_changes)
1966
 
        if filenames is None:
1967
 
            self.set_parent_ids(self.get_parent_ids()[:1])
1968
 
            resolve(self)
 
1963
            basis_tree = self.basis_tree()
 
1964
            basis_tree.lock_read()
 
1965
            old_tree = basis_tree
1969
1966
        else:
1970
 
            resolve(self, filenames, ignore_misses=True)
 
1967
            basis_tree = None
 
1968
        try:
 
1969
            conflicts = transform.revert(self, old_tree, filenames, backups, pb,
 
1970
                                         report_changes)
 
1971
            if filenames is None and len(self.get_parent_ids()) > 1:
 
1972
                parent_trees = []
 
1973
                last_revision = self.last_revision()
 
1974
                if last_revision != NULL_REVISION:
 
1975
                    if basis_tree is None:
 
1976
                        basis_tree = self.basis_tree()
 
1977
                        basis_tree.lock_read()
 
1978
                    parent_trees.append((last_revision, basis_tree))
 
1979
                self.set_parent_trees(parent_trees)
 
1980
                resolve(self)
 
1981
            else:
 
1982
                resolve(self, filenames, ignore_misses=True)
 
1983
        finally:
 
1984
            if basis_tree is not None:
 
1985
                basis_tree.unlock()
1971
1986
        return conflicts
1972
1987
 
1973
1988
    def revision_tree(self, revision_id):