~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repository.py

  • Committer: John Arbash Meinel
  • Date: 2011-01-12 01:01:53 UTC
  • mfrom: (5597 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5599.
  • Revision ID: john@arbash-meinel.com-20110112010153-op19823r9e6hy7u6
Merge bzr.dev 5597 to resolve NEWS, aka bzr-2.3.txt

Show diffs side-by-side

added added

removed removed

Lines of Context:
2853
2853
        raise NotImplementedError(self.revision_graph_can_have_wrong_parents)
2854
2854
 
2855
2855
 
2856
 
# remove these delegates a while after bzr 0.15
2857
 
def __make_delegated(name, from_module):
2858
 
    def _deprecated_repository_forwarder():
2859
 
        symbol_versioning.warn('%s moved to %s in bzr 0.15'
2860
 
            % (name, from_module),
2861
 
            DeprecationWarning,
2862
 
            stacklevel=2)
2863
 
        try:
2864
 
            return pyutils.get_named_object(from_module, name)
2865
 
        except AttributeError:
2866
 
            raise AttributeError('module %s has no name %s'
2867
 
                    % (sys.modules[from_module], name))
2868
 
    globals()[name] = _deprecated_repository_forwarder
2869
 
 
2870
 
for _name in [
2871
 
        'AllInOneRepository',
2872
 
        'WeaveMetaDirRepository',
2873
 
        'PreSplitOutRepositoryFormat',
2874
 
        'RepositoryFormat4',
2875
 
        'RepositoryFormat5',
2876
 
        'RepositoryFormat6',
2877
 
        'RepositoryFormat7',
2878
 
        ]:
2879
 
    __make_delegated(_name, 'bzrlib.repofmt.weaverepo')
2880
 
 
2881
 
for _name in [
2882
 
        'KnitRepository',
2883
 
        'RepositoryFormatKnit',
2884
 
        'RepositoryFormatKnit1',
2885
 
        ]:
2886
 
    __make_delegated(_name, 'bzrlib.repofmt.knitrepo')
2887
 
 
2888
 
 
2889
2856
def install_revision(repository, rev, revision_tree):
2890
2857
    """Install all revision data into a repository."""
2891
2858
    install_revisions(repository, [(rev, revision_tree, None)])