~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/weave.py

[merge] log reweave errors.

Show diffs side-by-side

added added

removed removed

Lines of Context:
946
946
        if name in wa._name_map:
947
947
            lines = wa.get_lines(name)
948
948
            if name in wb._name_map:
949
 
                assert lines == wb.get_lines(name)
 
949
                lines_b = wb.get_lines(name)
 
950
                if lines != lines_b:
 
951
                    mutter('Weaves differ on content. rev_id {%s}', name)
 
952
                    mutter('weaves: %s, %s', wa._weave_name, wb._weave_name)
 
953
                    import difflib
 
954
                    lines = list(difflib.unified_diff(lines, lines_b,
 
955
                            wa._weave_name, wb._weave_name))
 
956
                    mutter('lines:\n%s', ''.join(lines))
 
957
                    raise errors.WeaveTextDiffers(name, wa, wb)
950
958
        else:
951
959
            lines = wb.get_lines(name)
952
960
        wr.add(name, combined_parents[name], lines)