~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bundle/bundle_data.py

  • Committer: v.ladeuil+lp at free
  • Date: 2007-05-18 18:20:31 UTC
  • mto: (2485.8.44 bzr.connection.sharing)
  • mto: This revision was merged to the branch mainline in revision 2646.
  • Revision ID: v.ladeuil+lp@free.fr-20070518182031-gbg2cgidv5l20x9p
Takes Robert comments into account.

* bzrlib/transport/ftp.py:
(FtpTransport.__init__): Write a better explanation.

* bzrlib/tests/test_init.py:
(InstrumentedTransport): Just make hooks a class attribute.
(InstrumentedTransport._get_FTP): Run hook directly in the for
loop.
(TransportHooks.run_hook, TransportHooks.uninstall_hook): Not
needed. The hooks should be cleaned up by the test itself.
(TestInit.setUp.cleanup): Resset to default hooks.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
from bzrlib import (
25
25
    osutils,
26
 
    timestamp,
27
26
    )
28
27
import bzrlib.errors
29
28
from bzrlib.bundle import apply_bundle
88
87
 
89
88
        return rev
90
89
 
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
 
 
104
90
 
105
91
class BundleInfo(object):
106
92
    """This contains the meta information. Stuff that allows you to
107
93
    recreate the revision or inventory XML.
108
94
    """
109
 
    def __init__(self, bundle_format=None):
110
 
        self.bundle_format = None
 
95
    def __init__(self):
111
96
        self.committer = None
112
97
        self.date = None
113
98
        self.message = None
462
447
        apply_bundle.install_bundle(target_repo, self)
463
448
        return self.target
464
449
 
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
 
 
472
450
 
473
451
class BundleTree(Tree):
474
452
    def __init__(self, base_tree, revision_id):