/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-06 11:08:10 UTC
  • mto: This revision was merged to the branch mainline in revision 5223.
  • Revision ID: robertc@robertcollins.net-20100506110810-h3j07fh5gmw54s25
Cleaner matcher matching revised unlocking protocol.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
    chk_map,
27
27
    config,
28
28
    debug,
 
29
    errors,
29
30
    fetch as _mod_fetch,
30
31
    fifo_cache,
31
32
    generate_ids,
61
62
    entry_factory,
62
63
    )
63
64
from bzrlib.lock import _RelockDebugMixin
64
 
from bzrlib import (
65
 
    errors,
66
 
    registry,
67
 
    )
 
65
from bzrlib import registry
68
66
from bzrlib.trace import (
69
67
    log_exception_quietly, note, mutter, mutter_callsite, warning)
70
68
 
73
71
_deprecation_warning_done = False
74
72
 
75
73
 
76
 
class IsInWriteGroupError(errors.InternalBzrError):
77
 
 
78
 
    _fmt = "May not refresh_data of repo %(repo)s while in a write group."
79
 
 
80
 
    def __init__(self, repo):
81
 
        errors.InternalBzrError.__init__(self, repo=repo)
82
 
 
83
 
 
84
74
class CommitBuilder(object):
85
75
    """Provides an interface to build up a commit.
86
76
 
1644
1634
        return missing_keys
1645
1635
 
1646
1636
    def refresh_data(self):
1647
 
        """Re-read any data needed to synchronise with disk.
 
1637
        """Re-read any data needed to to synchronise with disk.
1648
1638
 
1649
1639
        This method is intended to be called after another repository instance
1650
1640
        (such as one used by a smart server) has inserted data into the
1651
 
        repository. On all repositories this will work outside of write groups.
1652
 
        Some repository formats (pack and newer for bzrlib native formats)
1653
 
        support refresh_data inside write groups. If called inside a write
1654
 
        group on a repository that does not support refreshing in a write group
1655
 
        IsInWriteGroupError will be raised.
 
1641
        repository. It may not be called during a write group, but may be
 
1642
        called at any other time.
1656
1643
        """
 
1644
        if self.is_in_write_group():
 
1645
            raise errors.InternalBzrError(
 
1646
                "May not refresh_data while in a write group.")
1657
1647
        self._refresh_data()
1658
1648
 
1659
1649
    def resume_write_group(self, tokens):