/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: Martin Pool
  • Date: 2007-09-11 03:07:14 UTC
  • mfrom: (2813 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2814.
  • Revision ID: mbp@sourcefrog.net-20070911030714-nzoumditu81hhwtw
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
447
447
    def create_bundle(self, target, base, fileobj, format=None):
448
448
        return serializer.write_bundle(self, target, base, fileobj, format)
449
449
 
450
 
    def get_commit_builder(self, branch, parents, config, timestamp=None, 
451
 
                           timezone=None, committer=None, revprops=None, 
 
450
    def get_commit_builder(self, branch, parents, config, timestamp=None,
 
451
                           timezone=None, committer=None, revprops=None,
452
452
                           revision_id=None):
453
453
        """Obtain a CommitBuilder for this repository.
454
454
        
462
462
        :param revision_id: Optional revision id.
463
463
        """
464
464
        revision_id = osutils.safe_revision_id(revision_id)
465
 
        result =_CommitBuilder(self, parents, config, timestamp, timezone,
 
465
        result = CommitBuilder(self, parents, config, timestamp, timezone,
466
466
                              committer, revprops, revision_id)
467
467
        self.start_write_group()
468
468
        return result
2073
2073
    know the internals of the format of the repository.
2074
2074
    """
2075
2075
    
2076
 
    record_root_entry = False
 
2076
    # all clients should supply tree roots.
 
2077
    record_root_entry = True
 
2078
 
2077
2079
    def __init__(self, repository, parents, config, timestamp=None, 
2078
2080
                 timezone=None, committer=None, revprops=None, 
2079
2081
                 revision_id=None):
2295
2297
    def _add_text_to_weave(self, file_id, new_lines, parents):
2296
2298
        versionedfile = self.repository.weave_store.get_weave_or_empty(
2297
2299
            file_id, self.repository.get_transaction())
2298
 
        result = versionedfile.add_lines(
 
2300
        # Don't change this to add_lines - add_lines_with_ghosts is cheaper
 
2301
        # than add_lines, and allows committing when a parent is ghosted for
 
2302
        # some reason.
 
2303
        result = versionedfile.add_lines_with_ghosts(
2299
2304
            self._new_revision_id, parents, new_lines)[0:2]
2300
2305
        versionedfile.clear_cache()
2301
2306
        return result
2302
2307
 
2303
2308
 
2304
 
class _CommitBuilder(CommitBuilder):
2305
 
    """Temporary class so old CommitBuilders are detected properly
2306
 
    
2307
 
    Note: CommitBuilder works whether or not root entry is recorded.
2308
 
    """
2309
 
 
2310
 
    record_root_entry = True
2311
 
 
2312
 
 
2313
2309
class RootCommitBuilder(CommitBuilder):
2314
2310
    """This commitbuilder actually records the root id"""
2315
2311
    
2316
 
    record_root_entry = True
2317
 
 
2318
2312
    def _check_root(self, ie, parent_invs, tree):
2319
2313
        """Helper for record_entry_contents.
2320
2314