~ubuntu-branches/ubuntu/natty/bzr/natty-proposed

« back to all changes in this revision

Viewing changes to bzrlib/repofmt/knitrepo.py

  • Committer: Bazaar Package Importer
  • Author(s): Jelmer Vernooij
  • Date: 2010-08-07 00:54:52 UTC
  • mfrom: (1.4.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20100807005452-g4zb99ezl3xn44r4
Tags: 2.2.0-1
* New upstream release.
 + Adds support for setting timestamps to originating revisions.
   Closes: #473450
 + Removes remaining string exception. Closes: #585193, LP: #586926
 + Add C extension to work around Python issue 1628205. LP: #583941,
   Closes: #577110
 + Avoids showing progress bars when --quiet is used. Closes: #542105,
   LP: #320035
 + No longer creates ~/.bazaar as root when run under sudo. LP: #376388
 + 'bzr commit' now supports -p as alternative for --show-diff. LP: #571467
 + 'bzr add' no longer adds .THIS/.BASE/.THEIRS files unless
   explicitly requested. LP: #322767
 + When parsing patch files, Bazaar now supports diff lines before each
   patch. LP: #502076
 + WorkingTrees now no longer requires using signal.signal, so can
   be used in a threaded environment. LP: #521989
 + An assertion error is no longer triggered when pushing to a pre-1.6
   Bazaar server. LP: #528041
* Bump standards version to 3.9.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006, 2007 Canonical Ltd
 
1
# Copyright (C) 2007-2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
24
24
    lockdir,
25
25
    osutils,
26
26
    revision as _mod_revision,
 
27
    trace,
27
28
    transactions,
28
29
    versionedfile,
29
30
    xml5,
37
38
from bzrlib.decorators import needs_read_lock, needs_write_lock
38
39
from bzrlib.repository import (
39
40
    CommitBuilder,
 
41
    IsInWriteGroupError,
40
42
    MetaDirRepository,
41
43
    MetaDirRepositoryFormat,
42
44
    RepositoryFormat,
43
45
    RootCommitBuilder,
44
46
    )
45
 
from bzrlib.trace import mutter, mutter_callsite
46
47
 
47
48
 
48
49
class _KnitParentsProvider(object):
210
211
    def _refresh_data(self):
211
212
        if not self.is_locked():
212
213
            return
 
214
        if self.is_in_write_group():
 
215
            raise IsInWriteGroupError(self)
213
216
        # Create a new transaction to force all knits to see the scope change.
214
217
        # This is safe because we're outside a write group.
215
218
        self.control_files._finish_transaction()
342
345
        :param shared: If true the repository will be initialized as a shared
343
346
                       repository.
344
347
        """
345
 
        mutter('creating repository in %s.', a_bzrdir.transport.base)
 
348
        trace.mutter('creating repository in %s.', a_bzrdir.transport.base)
346
349
        dirs = ['knits']
347
350
        files = []
348
351
        utf8_files = [('format', self.get_format_string())]
360
363
        result.revisions.get_parent_map([('A',)])
361
364
        result.signatures.get_parent_map([('A',)])
362
365
        result.unlock()
 
366
        self._run_post_repo_init_hooks(result, a_bzrdir, shared)
363
367
        return result
364
368
 
365
369
    def open(self, a_bzrdir, _found=False, _override_transport=None):
444
448
    repository_class = KnitRepository
445
449
    _commit_builder_class = RootCommitBuilder
446
450
    rich_root_data = True
 
451
    experimental = True
447
452
    supports_tree_reference = True
448
453
    @property
449
454
    def _serializer(self):