Show More
@@ -495,9 +495,12 b' def diff(repo, node1=None, node2=None, f' | |||||
495 |
|
495 | |||
496 | if node2: |
|
496 | if node2: | |
497 | ctx2 = context.changectx(repo, node2) |
|
497 | ctx2 = context.changectx(repo, node2) | |
|
498 | execf2 = ctx2.manifest().execf | |||
498 | else: |
|
499 | else: | |
499 | ctx2 = context.workingctx(repo) |
|
500 | ctx2 = context.workingctx(repo) | |
500 | man2 = ctx2.manifest() |
|
501 | execf2 = util.execfunc(repo.root, None) | |
|
502 | if execf2 is None: | |||
|
503 | execf2 = ctx2.parents()[0].manifest().copy().execf | |||
501 |
|
504 | |||
502 | # returns False if there was no rename between ctx1 and ctx2 |
|
505 | # returns False if there was no rename between ctx1 and ctx2 | |
503 | # returns None if the file was created between ctx1 and ctx2 |
|
506 | # returns None if the file was created between ctx1 and ctx2 | |
@@ -563,7 +566,7 b' def diff(repo, node1=None, node2=None, f' | |||||
563 |
|
566 | |||
564 | a, b = f, f |
|
567 | a, b = f, f | |
565 | if f in added: |
|
568 | if f in added: | |
566 |
mode = gitmode( |
|
569 | mode = gitmode(execf2(f)) | |
567 | if f in copied: |
|
570 | if f in copied: | |
568 | a = copied[f] |
|
571 | a = copied[f] | |
569 | omode = gitmode(man1.execf(a)) |
|
572 | omode = gitmode(man1.execf(a)) | |
@@ -588,7 +591,7 b' def diff(repo, node1=None, node2=None, f' | |||||
588 | header.append('deleted file mode %s\n' % mode) |
|
591 | header.append('deleted file mode %s\n' % mode) | |
589 | else: |
|
592 | else: | |
590 | omode = gitmode(man1.execf(f)) |
|
593 | omode = gitmode(man1.execf(f)) | |
591 |
nmode = gitmode( |
|
594 | nmode = gitmode(execf2(f)) | |
592 | addmodehdr(header, omode, nmode) |
|
595 | addmodehdr(header, omode, nmode) | |
593 | if util.binary(to) or util.binary(tn): |
|
596 | if util.binary(to) or util.binary(tn): | |
594 | dodiff = 'binary' |
|
597 | dodiff = 'binary' |
General Comments 0
You need to be logged in to leave comments.
Login now