~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bundle/bundle_data.py

Merge bzr.dev, resolving conflicts and updating test_merge_directive.py.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
from bzrlib import (
25
25
    osutils,
 
26
    timestamp,
26
27
    )
27
28
import bzrlib.errors
28
29
from bzrlib.bundle import apply_bundle
87
88
 
88
89
        return rev
89
90
 
 
91
    @staticmethod
 
92
    def from_revision(revision):
 
93
        revision_info = RevisionInfo(revision.revision_id)
 
94
        date = timestamp.format_highres_date(revision.timestamp,
 
95
                                             revision.timezone)
 
96
        revision_info.date = date
 
97
        revision_info.timezone = revision.timezone
 
98
        revision_info.timestamp = revision.timestamp
 
99
        revision_info.message = revision.message.split('\n')
 
100
        revision_info.properties = [': '.join(p) for p in
 
101
                                    revision.properties.iteritems()]
 
102
        return revision_info
 
103
 
90
104
 
91
105
class BundleInfo(object):
92
106
    """This contains the meta information. Stuff that allows you to
93
107
    recreate the revision or inventory XML.
94
108
    """
95
 
    def __init__(self):
 
109
    def __init__(self, bundle_format=None):
 
110
        self.bundle_format = None
96
111
        self.committer = None
97
112
        self.date = None
98
113
        self.message = None
447
462
        apply_bundle.install_bundle(target_repo, self)
448
463
        return self.target
449
464
 
 
465
    def get_merge_request(self, target_repo):
 
466
        """Provide data for performing a merge
 
467
 
 
468
        Returns suggested base, suggested target, and patch verification status
 
469
        """
 
470
        return None, self.target, 'inapplicable'
 
471
 
450
472
 
451
473
class BundleTree(Tree):
452
474
    def __init__(self, base_tree, revision_id):