mercurial/mdiff.py
changeset 43483 f2f460cdb4f5
parent 43117 8ff1ecfadcd1
child 43506 9f70512ae2cf
equal deleted inserted replaced
43482:fc19f8ab8199 43483:f2f460cdb4f5
    36 patchedsize = mpatch.patchedsize
    36 patchedsize = mpatch.patchedsize
    37 textdiff = bdiff.bdiff
    37 textdiff = bdiff.bdiff
    38 splitnewlines = bdiff.splitnewlines
    38 splitnewlines = bdiff.splitnewlines
    39 
    39 
    40 
    40 
       
    41 # TODO: this looks like it could be an attrs, which might help pytype
    41 class diffopts(object):
    42 class diffopts(object):
    42     '''context is the number of context lines
    43     '''context is the number of context lines
    43     text treats all files as text
    44     text treats all files as text
    44     showfunc enables diff -p output
    45     showfunc enables diff -p output
    45     git enables the git extended patch format
    46     git enables the git extended patch format
    49     ignorews ignores all whitespace changes in the diff
    50     ignorews ignores all whitespace changes in the diff
    50     ignorewsamount ignores changes in the amount of whitespace
    51     ignorewsamount ignores changes in the amount of whitespace
    51     ignoreblanklines ignores changes whose lines are all blank
    52     ignoreblanklines ignores changes whose lines are all blank
    52     upgrade generates git diffs to avoid data loss
    53     upgrade generates git diffs to avoid data loss
    53     '''
    54     '''
       
    55 
       
    56     _HAS_DYNAMIC_ATTRIBUTES = True
    54 
    57 
    55     defaults = {
    58     defaults = {
    56         b'context': 3,
    59         b'context': 3,
    57         b'text': False,
    60         b'text': False,
    58         b'showfunc': False,
    61         b'showfunc': False,