tests/test-absorb-filefixupstate.py
changeset 40187 dcda50856843
parent 38988 1aab0007a7c0
child 43076 2372284d9457
equal deleted inserted replaced
40186:9cbc2579f5be 40187:dcda50856843
    41     if fixups is not None, it's the expected fixups list and will be checked.
    41     if fixups is not None, it's the expected fixups list and will be checked.
    42     """
    42     """
    43     expectedcontents = insertreturns(expectedcontents)
    43     expectedcontents = insertreturns(expectedcontents)
    44     oldcontents = insertreturns(oldcontents)
    44     oldcontents = insertreturns(oldcontents)
    45     workingcopy = insertreturns(workingcopy)
    45     workingcopy = insertreturns(workingcopy)
    46     state = absorb.filefixupstate(pycompat.maplist(simplefctx, oldcontents))
    46     state = absorb.filefixupstate(pycompat.maplist(simplefctx, oldcontents),
       
    47                                   'path')
    47     state.diffwith(simplefctx(workingcopy))
    48     state.diffwith(simplefctx(workingcopy))
    48     if fixups is not None:
    49     if fixups is not None:
    49         assertlistequal(state.fixups, fixups)
    50         assertlistequal(state.fixups, fixups)
    50     state.apply()
    51     state.apply()
    51     assertlistequal(state.finalcontents, expectedcontents, removereturns)
    52     assertlistequal(state.finalcontents, expectedcontents, removereturns)