/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/plugins/stats/classify.py

  • Committer: Jelmer Vernooij
  • Date: 2018-05-06 11:48:54 UTC
  • mto: This revision was merged to the branch mainline in revision 6960.
  • Revision ID: jelmer@jelmer.uk-20180506114854-h4qd9ojaqy8wxjsd
Move .mailmap to root.

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
    """
33
33
    # FIXME: Use mime types? Ohcount?
34
34
    # TODO: It will be better move those filters to properties file
35
 
    # and have possibility to determining own types !?
 
35
        # and have possibility to determining own types !?
36
36
    extension = os.path.splitext(name)[1]
37
37
    if extension in (".c", ".h", ".py", ".cpp", ".rb", ".pm", ".pl", ".ac",
38
 
                     ".java", ".cc", ".proto", ".yy", ".l"):
 
38
                        ".java", ".cc", ".proto", ".yy", ".l"):
39
39
        return "code"
40
40
    if extension in (".html", ".xml", ".txt", ".rst", ".TODO"):
41
41
        return "documentation"
65
65
    # number of lines changed in a file.
66
66
    types = []
67
67
    for d in delta.added + delta.modified:
68
 
        types.append(classify_filename(d.path[1] or d.path[0]))
 
68
        types.append(classify_filename(d[0]))
69
69
    return types