~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/merge3.py

  • Committer: Robert Collins
  • Date: 2005-08-23 06:52:09 UTC
  • mto: (974.1.50) (1185.1.10) (1092.3.1)
  • mto: This revision was merged to the branch mainline in revision 1139.
  • Revision ID: robertc@robertcollins.net-20050823065209-81cd5962c401751b
move io redirection into each test case from the global runner

Show diffs side-by-side

added added

removed removed

Lines of Context:
76
76
    def merge_lines(self,
77
77
                    name_a=None,
78
78
                    name_b=None,
79
 
                    name_base=None,
80
 
                    start_marker='<<<<<<<',
81
 
                    mid_marker='=======',
82
 
                    end_marker='>>>>>>>',
83
 
                    base_marker=None):
 
79
                    start_marker='<<<<<<<<',
 
80
                    mid_marker='========',
 
81
                    end_marker='>>>>>>>>',
 
82
                    show_base=False):
84
83
        """Return merge in cvs-like form.
85
84
        """
86
85
        if name_a:
87
86
            start_marker = start_marker + ' ' + name_a
88
87
        if name_b:
89
88
            end_marker = end_marker + ' ' + name_b
90
 
        if name_base and base_marker:
91
 
            base_marker = base_marker + ' ' + name_base
92
89
            
93
90
        for t in self.merge_regions():
94
91
            what = t[0]
105
102
                yield start_marker + '\n'
106
103
                for i in range(t[3], t[4]):
107
104
                    yield self.a[i]
108
 
                if base_marker is not None:
109
 
                    yield base_marker + '\n'
110
 
                    for i in range(t[1], t[2]):
111
 
                        yield self.base[i]
112
105
                yield mid_marker + '\n'
113
106
                for i in range(t[5], t[6]):
114
107
                    yield self.b[i]