~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Martin Pool
  • Date: 2005-10-06 04:09:55 UTC
  • mfrom: (1413)
  • mto: (1185.13.3)
  • mto: This revision was merged to the branch mainline in revision 1417.
  • Revision ID: mbp@sourcefrog.net-20051006040955-36f27e5a8d5c977b
[merge] from robert

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
                           DivergedBranches, LockError, UnlistableStore,
35
35
                           UnlistableBranch, NoSuchFile)
36
36
from bzrlib.textui import show_status
37
 
from bzrlib.revision import Revision, validate_revision_id, is_ancestor
 
37
from bzrlib.revision import Revision, is_ancestor
38
38
from bzrlib.delta import compare_trees
39
39
from bzrlib.tree import EmptyTree, RevisionTree
40
40
from bzrlib.inventory import Inventory
156
156
        """Subclasses that care about caching should override this, and set
157
157
        up cached stores located under cache_root.
158
158
        """
 
159
        self.cache_root = cache_root
159
160
 
160
161
 
161
162
class _Branch(Branch):
246
247
                store = CompressedTextStore(self._transport.clone(relpath))
247
248
            else:
248
249
                store = TextStore(self._transport.clone(relpath))
249
 
            if self._transport.should_cache():
250
 
                from meta_store import CachedStore
251
 
                cache_path = os.path.join(self.cache_root, name)
252
 
                os.mkdir(cache_path)
253
 
                store = CachedStore(store, cache_path)
 
250
            #if self._transport.should_cache():
 
251
            #    cache_path = os.path.join(self.cache_root, name)
 
252
            #    os.mkdir(cache_path)
 
253
            #    store = bzrlib.store.CachedStore(store, cache_path)
254
254
            return store
255
255
        def get_weave(name):
256
256
            relpath = self._rel_controlfilename(name)
784
784
        return self.control_weaves.get_weave('ancestry')
785
785
 
786
786
    def get_ancestry(self, revision_id):
787
 
        """Return a list of revision-ids integrated by a revision.
788
 
        """
789
 
        # strip newlines
 
787
        """Return a list of revision-ids integrated by a revision."""
790
788
        if revision_id is None:
791
789
            return [None]
792
790
        w = self._get_ancestry_weave()
1200
1198
    def add_pending_merge(self, *revision_ids):
1201
1199
        # TODO: Perhaps should check at this point that the
1202
1200
        # history of the revision is actually present?
1203
 
        for rev_id in revision_ids:
1204
 
            validate_revision_id(rev_id)
1205
 
 
1206
1201
        p = self.pending_merges()
1207
1202
        updated = False
1208
1203
        for rev_id in revision_ids: