~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/merge_directive.py

  • Committer: Aaron Bentley
  • Date: 2007-08-15 01:11:27 UTC
  • mfrom: (2699 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2700.
  • Revision ID: aaron.bentley@utoronto.ca-20070815011127-0il5s8oqmt26bma7
Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
190
190
                    StringIO(self.get_raw_bundle()))
191
191
                # We don't use the bundle's target revision, because
192
192
                # MergeDirective.revision_id is authoritative.
193
 
                info.install_revisions(target_repo)
 
193
                info.install_revisions(target_repo, stream_input=False)
194
194
            else:
195
195
                source_branch = _mod_branch.Branch.open(self.source_branch)
196
196
                target_repo.fetch(source_branch.repository, self.revision_id)
325
325
 
326
326
class MergeDirective2(_BaseMergeDirective):
327
327
 
328
 
    _format_string = 'Bazaar merge directive format 2 (Bazaar 0.19)'
 
328
    _format_string = 'Bazaar merge directive format 2 (Bazaar 0.90)'
329
329
 
330
330
    def __init__(self, revision_id, testament_sha1, time, timezone,
331
331
                 target_branch, patch=None, source_branch=None, message=None,
504
504
            if self._verify_patch(repository):
505
505
                return 'verified'
506
506
            else:
 
507
                #FIXME patch verification is broken for CRLF files
 
508
                return 'inapplicable'
507
509
                return 'failed'
508
510
        else:
509
511
            return 'inapplicable'
511
513
 
512
514
class MergeDirectiveFormatRegistry(registry.Registry):
513
515
 
514
 
    def register(self, directive):
515
 
        registry.Registry.register(self, directive._format_string, directive)
 
516
    def register(self, directive, format_string=None):
 
517
        if format_string is None:
 
518
            format_string = directive._format_string
 
519
        registry.Registry.register(self, format_string, directive)
516
520
 
517
521
 
518
522
_format_registry = MergeDirectiveFormatRegistry()
519
523
_format_registry.register(MergeDirective)
520
524
_format_registry.register(MergeDirective2)
 
525
_format_registry.register(MergeDirective2,
 
526
                          'Bazaar merge directive format 2 (Bazaar 0.19)')