~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/merge_directive.py

  • Committer: Aaron Bentley
  • Date: 2007-03-13 16:18:51 UTC
  • mto: (2323.6.9 0.15-integration)
  • mto: This revision was merged to the branch mainline in revision 2359.
  • Revision ID: abentley@panoramicfeedback.com-20070313161851-b5ixqt362m870bg4
Fix deserialization of merge directives with no patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
98
98
        patch_lines = list(line_iter)
99
99
        if len(patch_lines) == 0:
100
100
            patch = None
 
101
            patch_type = None
101
102
        else:
102
103
            patch = ''.join(patch_lines)
103
 
        try:
104
 
            bundle_serializer.read_bundle(StringIO(patch))
105
 
        except errors.NotABundle:
106
 
            patch_type = 'diff'
107
 
        else:
108
 
            patch_type = 'bundle'
 
104
            try:
 
105
                bundle_serializer.read_bundle(StringIO(patch))
 
106
            except errors.NotABundle:
 
107
                patch_type = 'diff'
 
108
            else:
 
109
                patch_type = 'bundle'
109
110
        time, timezone = timestamp.parse_patch_date(stanza.get('timestamp'))
110
111
        kwargs = {}
111
112
        for key in ('revision_id', 'testament_sha1', 'target_branch',