~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/merge3.py

  • Committer: John Arbash Meinel
  • Date: 2006-10-24 14:12:53 UTC
  • mto: This revision was merged to the branch mainline in revision 2095.
  • Revision ID: john@arbash-meinel.com-20061024141253-783fba812b197b70
(John Arbash Meinel) Update version information for 0.13 development

Show diffs side-by-side

added added

removed removed

Lines of Context:
88
88
                    reprocess=False):
89
89
        """Return merge in cvs-like form.
90
90
        """
91
 
        newline = '\n'
92
 
        if len(self.a) > 0:
93
 
            if self.a[0].endswith('\r\n'):
94
 
                newline = '\r\n'
95
 
            elif self.a[0].endswith('\r'):
96
 
                newline = '\r'
97
91
        if base_marker and reprocess:
98
92
            raise CantReprocessAndShowBase()
99
93
        if name_a:
117
111
                for i in range(t[1], t[2]):
118
112
                    yield self.b[i]
119
113
            elif what == 'conflict':
120
 
                yield start_marker + newline
 
114
                yield start_marker + '\n'
121
115
                for i in range(t[3], t[4]):
122
116
                    yield self.a[i]
123
117
                if base_marker is not None:
124
 
                    yield base_marker + newline
 
118
                    yield base_marker + '\n'
125
119
                    for i in range(t[1], t[2]):
126
120
                        yield self.base[i]
127
 
                yield mid_marker + newline
 
121
                yield mid_marker + '\n'
128
122
                for i in range(t[5], t[6]):
129
123
                    yield self.b[i]
130
 
                yield end_marker + newline
 
124
                yield end_marker + '\n'
131
125
            else:
132
126
                raise ValueError(what)
133
127