(self, dependent, parent, path, hunk)
Run git blame on the parts of the hunk which exist in the
        older commit in the diff.  The commits generated by git blame
        are the commits which the newer commit in the diff depends on,
        because without the lines from those commits, the hunk would
        not apply correctly.
Run git blame on the parts of the hunk which exist in the
        older commit in the diff.  The commits generated by git blame
        are the commits which the newer commit in the diff depends on,
        because without the lines from those commits, the hunk would
        not apply correctly.
Run git blame on the parts of the hunk which exist in the older commit in the diff . The commits generated by git blame are the commits which the newer commit in the diff depends on because without the lines from those commits the hunk would not apply correctly .
def blame_diff_hunk(self, dependent, parent, path, hunk):
        """Run git blame on the parts of the hunk which exist in the
        older commit in the diff.  The commits generated by git blame
        are the commits which the newer commit in the diff depends on,
        because without the lines from those commits, the hunk would
        not apply correctly.
        """
        line_range_before = "-%d,%d" % (hunk.old_start, hunk.old_lines)
        line_range_after = "+%d,%d" % (hunk.new_start, hunk.new_lines)
        self.logger.info("        Blaming hunk %s @ %s (listed below)" %
                         (line_range_before, parent.hex[:8]))

        if not self.tree_lookup(path, parent):
            # This is probably because dependent added a new directory
            # which was not previously in the parent.
            return

        blame = self.run_blame(hunk, parent, path)

        dependent_sha1 = dependent.hex
        self.register_new_dependent(dependent, dependent_sha1)

        line_to_culprit = {}

        for line in blame.split('\n'):
            self.process_hunk_line(dependent, dependent_sha1, parent,
                                   path, line, line_to_culprit)

        self.debug_hunk(line_range_before, line_range_after, hunk,
                        line_to_culprit)
def blame_diff_hunk ( self , dependent , parent , path , hunk ) : line_range_before = "-%d,%d" % ( hunk . old_start , hunk . old_lines ) line_range_after = "+%d,%d" % ( hunk . new_start , hunk . new_lines ) self . logger . info ( "        Blaming hunk %s @ %s (listed below)" % ( line_range_before , parent . hex [ : 8 ] ) ) if not self . tree_lookup ( path , parent ) : # This is probably because dependent added a new directory # which was not previously in the parent. return blame = self . run_blame ( hunk , parent , path ) dependent_sha1 = dependent . hex self . register_new_dependent ( dependent , dependent_sha1 ) line_to_culprit = { } for line in blame . split ( '\n' ) : self . process_hunk_line ( dependent , dependent_sha1 , parent , path , line , line_to_culprit ) self . debug_hunk ( line_range_before , line_range_after , hunk , line_to_culprit )