Example #1
0
    def create_filled_in_diffline(self, staticdiffmodel):
        """If any parts of this line have not yet been affected by
		an edit, absorb them from the supplied static line and
		return a DiffLine object representing the final version
		of this line."""

        if not self.is_fully_edited():

            static_line = staticdiffmodel.get_line(self.line_num)

            if static_line is None:
                left = None
                right = None
            else:
                left = static_line.left
                right = static_line.right

            self.maybe_set_side(directions.LEFT, left, False)
            self.maybe_set_side(directions.RIGHT, right, False)

        return DiffLine.clone(self)
Example #2
0
    def __init__(self, line_num):

        DiffLine.__init__(self, EditingLine._NOT_EDITED_YET, EditingLine._NOT_EDITED_YET, difflinetypes.IDENTICAL)

        self.line_num = line_num