/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/repository.py

  • Committer: Robert Collins
  • Date: 2010-05-11 08:44:59 UTC
  • mfrom: (5221 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5223.
  • Revision ID: robertc@robertcollins.net-20100511084459-pb0uinna9zs3wu59
Merge trunk - resolve conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
    symbol_versioning,
44
44
    trace,
45
45
    tsort,
 
46
    ui,
46
47
    versionedfile,
47
48
    )
48
49
from bzrlib.bundle import serializer
54
55
from bzrlib import (
55
56
    errors,
56
57
    registry,
57
 
    ui,
58
58
    )
59
59
from bzrlib.decorators import needs_read_lock, needs_write_lock, only_raises
60
60
from bzrlib.inter import InterObject
64
64
    ROOT_ID,
65
65
    entry_factory,
66
66
    )
67
 
from bzrlib.recordcounter import RecordCounter
68
67
from bzrlib.lock import _RelockDebugMixin, LogicalLockResult
69
68
from bzrlib.trace import (
70
69
    log_exception_quietly, note, mutter, mutter_callsite, warning)
289
288
 
290
289
        :param tree: The tree which is being committed.
291
290
        """
292
 
        if len(self.parents) == 0:
293
 
            raise errors.RootMissing()
 
291
        # NB: if there are no parents then this method is not called, so no
 
292
        # need to guard on parents having length.
294
293
        entry = entry_factory['directory'](tree.path2id(''), '',
295
294
            None)
296
295
        entry.revision = self._new_revision_id
1046
1045
                " id and insertion revid (%r, %r)"
1047
1046
                % (inv.revision_id, revision_id))
1048
1047
        if inv.root is None:
1049
 
            raise errors.RootMissing()
 
1048
            raise AssertionError()
1050
1049
        return self._add_inventory_checked(revision_id, inv, parents)
1051
1050
 
1052
1051
    def _add_inventory_checked(self, revision_id, inv, parents):
1723
1722
                "May not fetch while in a write group.")
1724
1723
        # fast path same-url fetch operations
1725
1724
        # TODO: lift out to somewhere common with RemoteRepository
1726
 
        # <https://bugs.launchpad.net/bzr/+bug/401646>
 
1725
        # <https://bugs.edge.launchpad.net/bzr/+bug/401646>
1727
1726
        if (self.has_same_location(source)
1728
1727
            and fetch_spec is None
1729
1728
            and self._has_same_fallbacks(source)):
4284
4283
                is_resume = False
4285
4284
            try:
4286
4285
                # locked_insert_stream performs a commit|suspend.
4287
 
                return self._locked_insert_stream(stream, src_format,
4288
 
                    is_resume)
 
4286
                return self._locked_insert_stream(stream, src_format, is_resume)
4289
4287
            except:
4290
4288
                self.target_repo.abort_write_group(suppress_errors=True)
4291
4289
                raise
4338
4336
                # required if the serializers are different only in terms of
4339
4337
                # the inventory.
4340
4338
                if src_serializer == to_serializer:
4341
 
                    self.target_repo.revisions.insert_record_stream(substream)
 
4339
                    self.target_repo.revisions.insert_record_stream(
 
4340
                        substream)
4342
4341
                else:
4343
4342
                    self._extract_and_insert_revisions(substream,
4344
4343
                        src_serializer)
4452
4451
        """Create a StreamSource streaming from from_repository."""
4453
4452
        self.from_repository = from_repository
4454
4453
        self.to_format = to_format
4455
 
        self._record_counter = RecordCounter()
4456
4454
 
4457
4455
    def delta_on_metadata(self):
4458
4456
        """Return True if delta's are permitted on metadata streams.