~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/merge3.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-10-10 07:23:07 UTC
  • mfrom: (2067.1.1 urandom-56883)
  • Revision ID: pqm@pqm.ubuntu.com-20061010072307-037a6f63da8a1bdd
(John Arbash Meinel) Handle exceptions while opening /dev/urandom

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2004, 2005 Canonical Ltd
 
1
# Copyright (C) 2004, 2005 by Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
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