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

  • Committer: Jelmer Vernooij
  • Date: 2017-05-21 18:10:28 UTC
  • mto: This revision was merged to the branch mainline in revision 6623.
  • Revision ID: jelmer@jelmer.uk-20170521181028-zn04pdfw0od9hfj3
Rename brzlib => breezy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
from __future__ import absolute_import
18
18
 
19
 
from brzlib.lazy_import import lazy_import
 
19
from breezy.lazy_import import lazy_import
20
20
lazy_import(globals(), """
21
21
import itertools
22
22
import time
23
23
 
24
 
from brzlib import (
 
24
from breezy import (
25
25
    config,
26
26
    controldir,
27
27
    debug,
35
35
    tsort,
36
36
    gpg,
37
37
    )
38
 
from brzlib.bundle import serializer
39
 
from brzlib.i18n import gettext
 
38
from breezy.bundle import serializer
 
39
from breezy.i18n import gettext
40
40
""")
41
41
 
42
 
from brzlib import (
 
42
from breezy import (
43
43
    bzrdir,
44
44
    errors,
45
45
    registry,
46
46
    symbol_versioning,
47
47
    ui,
48
48
    )
49
 
from brzlib.decorators import needs_read_lock, needs_write_lock, only_raises
50
 
from brzlib.inter import InterObject
51
 
from brzlib.lock import _RelockDebugMixin, LogicalLockResult
52
 
from brzlib.trace import (
 
49
from breezy.decorators import needs_read_lock, needs_write_lock, only_raises
 
50
from breezy.inter import InterObject
 
51
from breezy.lock import _RelockDebugMixin, LogicalLockResult
 
52
from breezy.trace import (
53
53
    log_exception_quietly, note, mutter, mutter_callsite, warning)
54
54
 
55
55
 
255
255
    revisions and file history.  It's normally accessed only by the Branch,
256
256
    which views a particular line of development through that history.
257
257
 
258
 
    See VersionedFileRepository in brzlib.vf_repository for the
 
258
    See VersionedFileRepository in breezy.vf_repository for the
259
259
    base class for most Bazaar repositories.
260
260
    """
261
261
 
658
658
        This method is intended to be called after another repository instance
659
659
        (such as one used by a smart server) has inserted data into the
660
660
        repository. On all repositories this will work outside of write groups.
661
 
        Some repository formats (pack and newer for brzlib native formats)
 
661
        Some repository formats (pack and newer for breezy native formats)
662
662
        support refresh_data inside write groups. If called inside a write
663
663
        group on a repository that does not support refreshing in a write group
664
664
        IsInWriteGroupError will be raised.
988
988
    @needs_write_lock
989
989
    def reconcile(self, other=None, thorough=False):
990
990
        """Reconcile this repository."""
991
 
        from brzlib.reconcile import RepoReconciler
 
991
        from breezy.reconcile import RepoReconciler
992
992
        reconciler = RepoReconciler(self, thorough=thorough)
993
993
        reconciler.reconcile()
994
994
        return reconciler
1173
1173
             will be checked.  Typically the last revision_id of a branch.
1174
1174
        :param callback_refs: A dict of check-refs to resolve and callback
1175
1175
            the check/_check method on the items listed as wanting the ref.
1176
 
            see brzlib.check.
 
1176
            see breezy.check.
1177
1177
        :param check_repo: If False do not check the repository contents, just 
1178
1178
            calculate the data callback_refs requires and call them back.
1179
1179
        """
1449
1449
        raise NotImplementedError(self.open)
1450
1450
 
1451
1451
    def _run_post_repo_init_hooks(self, repository, controldir, shared):
1452
 
        from brzlib.controldir import ControlDir, RepoInitHookParams
 
1452
        from breezy.controldir import ControlDir, RepoInitHookParams
1453
1453
        hooks = ControlDir.hooks['post_repo_init']
1454
1454
        if not hooks:
1455
1455
            return
1531
1531
 
1532
1532
# formats which have no format string are not discoverable or independently
1533
1533
# creatable on disk, so are not registered in format_registry.  They're
1534
 
# all in brzlib.repofmt.knitreponow.  When an instance of one of these is
 
1534
# all in breezy.repofmt.knitreponow.  When an instance of one of these is
1535
1535
# needed, it's constructed directly by the ControlDir.  Non-native formats where
1536
1536
# the repository is not separately opened are similar.
1537
1537
 
1538
1538
format_registry.register_lazy(
1539
1539
    'Bazaar-NG Knit Repository Format 1',
1540
 
    'brzlib.repofmt.knitrepo',
 
1540
    'breezy.repofmt.knitrepo',
1541
1541
    'RepositoryFormatKnit1',
1542
1542
    )
1543
1543
 
1544
1544
format_registry.register_lazy(
1545
1545
    'Bazaar Knit Repository Format 3 (bzr 0.15)\n',
1546
 
    'brzlib.repofmt.knitrepo',
 
1546
    'breezy.repofmt.knitrepo',
1547
1547
    'RepositoryFormatKnit3',
1548
1548
    )
1549
1549
 
1550
1550
format_registry.register_lazy(
1551
1551
    'Bazaar Knit Repository Format 4 (bzr 1.0)\n',
1552
 
    'brzlib.repofmt.knitrepo',
 
1552
    'breezy.repofmt.knitrepo',
1553
1553
    'RepositoryFormatKnit4',
1554
1554
    )
1555
1555
 
1558
1558
# NOTE: These are experimental in 0.92. Stable in 1.0 and above
1559
1559
format_registry.register_lazy(
1560
1560
    'Bazaar pack repository format 1 (needs bzr 0.92)\n',
1561
 
    'brzlib.repofmt.knitpack_repo',
 
1561
    'breezy.repofmt.knitpack_repo',
1562
1562
    'RepositoryFormatKnitPack1',
1563
1563
    )
1564
1564
format_registry.register_lazy(
1565
1565
    'Bazaar pack repository format 1 with subtree support (needs bzr 0.92)\n',
1566
 
    'brzlib.repofmt.knitpack_repo',
 
1566
    'breezy.repofmt.knitpack_repo',
1567
1567
    'RepositoryFormatKnitPack3',
1568
1568
    )
1569
1569
format_registry.register_lazy(
1570
1570
    'Bazaar pack repository format 1 with rich root (needs bzr 1.0)\n',
1571
 
    'brzlib.repofmt.knitpack_repo',
 
1571
    'breezy.repofmt.knitpack_repo',
1572
1572
    'RepositoryFormatKnitPack4',
1573
1573
    )
1574
1574
format_registry.register_lazy(
1575
1575
    'Bazaar RepositoryFormatKnitPack5 (bzr 1.6)\n',
1576
 
    'brzlib.repofmt.knitpack_repo',
 
1576
    'breezy.repofmt.knitpack_repo',
1577
1577
    'RepositoryFormatKnitPack5',
1578
1578
    )
1579
1579
format_registry.register_lazy(
1580
1580
    'Bazaar RepositoryFormatKnitPack5RichRoot (bzr 1.6.1)\n',
1581
 
    'brzlib.repofmt.knitpack_repo',
 
1581
    'breezy.repofmt.knitpack_repo',
1582
1582
    'RepositoryFormatKnitPack5RichRoot',
1583
1583
    )
1584
1584
format_registry.register_lazy(
1585
1585
    'Bazaar RepositoryFormatKnitPack5RichRoot (bzr 1.6)\n',
1586
 
    'brzlib.repofmt.knitpack_repo',
 
1586
    'breezy.repofmt.knitpack_repo',
1587
1587
    'RepositoryFormatKnitPack5RichRootBroken',
1588
1588
    )
1589
1589
format_registry.register_lazy(
1590
1590
    'Bazaar RepositoryFormatKnitPack6 (bzr 1.9)\n',
1591
 
    'brzlib.repofmt.knitpack_repo',
 
1591
    'breezy.repofmt.knitpack_repo',
1592
1592
    'RepositoryFormatKnitPack6',
1593
1593
    )
1594
1594
format_registry.register_lazy(
1595
1595
    'Bazaar RepositoryFormatKnitPack6RichRoot (bzr 1.9)\n',
1596
 
    'brzlib.repofmt.knitpack_repo',
 
1596
    'breezy.repofmt.knitpack_repo',
1597
1597
    'RepositoryFormatKnitPack6RichRoot',
1598
1598
    )
1599
1599
format_registry.register_lazy(
1600
1600
    'Bazaar repository format 2a (needs bzr 1.16 or later)\n',
1601
 
    'brzlib.repofmt.groupcompress_repo',
 
1601
    'breezy.repofmt.groupcompress_repo',
1602
1602
    'RepositoryFormat2a',
1603
1603
    )
1604
1604
 
1607
1607
format_registry.register_lazy(
1608
1608
    ("Bazaar development format 2 with subtree support "
1609
1609
        "(needs bzr.dev from before 1.8)\n"),
1610
 
    'brzlib.repofmt.knitpack_repo',
 
1610
    'breezy.repofmt.knitpack_repo',
1611
1611
    'RepositoryFormatPackDevelopment2Subtree',
1612
1612
    )
1613
1613
format_registry.register_lazy(
1614
1614
    'Bazaar development format 8\n',
1615
 
    'brzlib.repofmt.groupcompress_repo',
 
1615
    'breezy.repofmt.groupcompress_repo',
1616
1616
    'RepositoryFormat2aSubtree',
1617
1617
    )
1618
1618
 
1680
1680
            rather than just finding the surface difference.
1681
1681
        :param limit: Maximum number of revisions to return, topologically
1682
1682
            ordered
1683
 
        :return: A brzlib.graph.SearchResult.
 
1683
        :return: A breezy.graph.SearchResult.
1684
1684
        """
1685
1685
        raise NotImplementedError(self.search_missing_revision_ids)
1686
1686