##// END OF EJS Templates
trydiff: read file data in only one place...
Martin von Zweigbergk -
r24105:0f8baebc default
parent child Browse files
Show More
@@ -1772,13 +1772,7 b' def trydiff(repo, revs, ctx1, ctx2, modi'
1772 if f not in ctx1:
1772 if f not in ctx1:
1773 addedset.add(f)
1773 addedset.add(f)
1774 for f in sorted(modified + added + removed):
1774 for f in sorted(modified + added + removed):
1775 content1 = None
1776 content2 = None
1777 copyop = None
1775 copyop = None
1778 if f not in addedset:
1779 content1 = getfilectx(f, ctx1).data()
1780 if f not in removedset:
1781 content2 = getfilectx(f, ctx2).data()
1782 f1, f2 = f, f
1776 f1, f2 = f, f
1783 if f in addedset:
1777 if f in addedset:
1784 f1 = None
1778 f1 = None
@@ -1790,7 +1784,6 b' def trydiff(repo, revs, ctx1, ctx2, modi'
1790 gone.add(f1)
1784 gone.add(f1)
1791 else:
1785 else:
1792 copyop = 'copy'
1786 copyop = 'copy'
1793 content1 = getfilectx(f1, ctx1).data()
1794 elif f in removedset:
1787 elif f in removedset:
1795 f2 = None
1788 f2 = None
1796 if opts.git:
1789 if opts.git:
@@ -1799,6 +1792,12 b' def trydiff(repo, revs, ctx1, ctx2, modi'
1799 and copy[copyto[f]] == f):
1792 and copy[copyto[f]] == f):
1800 continue
1793 continue
1801
1794
1795 content1 = None
1796 content2 = None
1797 if f1:
1798 content1 = getfilectx(f1, ctx1).data()
1799 if f2:
1800 content2 = getfilectx(f2, ctx2).data()
1802 flag1 = None
1801 flag1 = None
1803 flag2 = None
1802 flag2 = None
1804 binary = False
1803 binary = False
General Comments 0
You need to be logged in to leave comments. Login now