Show More
@@ -819,8 +819,8 b' def addremoved(pdiff, ctx, removed):' | |||||
819 | pchange = phabchange( |
|
819 | pchange = phabchange( | |
820 | currentPath=fname, oldPath=fname, type=DiffChangeType.DELETE |
|
820 | currentPath=fname, oldPath=fname, type=DiffChangeType.DELETE | |
821 | ) |
|
821 | ) | |
822 | pchange.addoldmode(gitmode[ctx.p1()[fname].flags()]) |
|
|||
823 | oldfctx = ctx.p1()[fname] |
|
822 | oldfctx = ctx.p1()[fname] | |
|
823 | pchange.addoldmode(gitmode[oldfctx.flags()]) | |||
824 | if not (oldfctx.isbinary() or notutf8(oldfctx)): |
|
824 | if not (oldfctx.isbinary() or notutf8(oldfctx)): | |
825 | maketext(pchange, ctx, fname) |
|
825 | maketext(pchange, ctx, fname) | |
826 |
|
826 | |||
@@ -831,10 +831,10 b' def addmodified(pdiff, ctx, modified):' | |||||
831 | """add modified files to the phabdiff""" |
|
831 | """add modified files to the phabdiff""" | |
832 | for fname in modified: |
|
832 | for fname in modified: | |
833 | fctx = ctx[fname] |
|
833 | fctx = ctx[fname] | |
834 |
oldfctx = |
|
834 | oldfctx = ctx.p1()[fname] | |
835 | pchange = phabchange(currentPath=fname, oldPath=fname) |
|
835 | pchange = phabchange(currentPath=fname, oldPath=fname) | |
836 |
filemode = gitmode[ctx |
|
836 | filemode = gitmode[fctx.flags()] | |
837 |
originalmode = gitmode[ctx |
|
837 | originalmode = gitmode[oldfctx.flags()] | |
838 | if filemode != originalmode: |
|
838 | if filemode != originalmode: | |
839 | pchange.addoldmode(originalmode) |
|
839 | pchange.addoldmode(originalmode) | |
840 | pchange.addnewmode(filemode) |
|
840 | pchange.addnewmode(filemode) | |
@@ -846,7 +846,7 b' def addmodified(pdiff, ctx, modified):' | |||||
846 | or notutf8(oldfctx) |
|
846 | or notutf8(oldfctx) | |
847 | ): |
|
847 | ): | |
848 | makebinary(pchange, fctx) |
|
848 | makebinary(pchange, fctx) | |
849 |
addoldbinary(pchange, fctx |
|
849 | addoldbinary(pchange, oldfctx, fctx) | |
850 | else: |
|
850 | else: | |
851 | maketext(pchange, ctx, fname) |
|
851 | maketext(pchange, ctx, fname) | |
852 |
|
852 | |||
@@ -864,7 +864,7 b' def addadded(pdiff, ctx, added, removed)' | |||||
864 | oldfctx = None |
|
864 | oldfctx = None | |
865 | pchange = phabchange(currentPath=fname) |
|
865 | pchange = phabchange(currentPath=fname) | |
866 |
|
866 | |||
867 |
filemode = gitmode[ctx |
|
867 | filemode = gitmode[fctx.flags()] | |
868 | renamed = fctx.renamed() |
|
868 | renamed = fctx.renamed() | |
869 |
|
869 | |||
870 | if renamed: |
|
870 | if renamed: |
General Comments 0
You need to be logged in to leave comments.
Login now