mercurial/patch.py
changeset 24104 b6f434729b97
parent 24103 c666c85f71ba
child 24105 0f8baebcdbea
equal deleted inserted replaced
24103:c666c85f71ba 24104:b6f434729b97
  1778         if f not in addedset:
  1778         if f not in addedset:
  1779             content1 = getfilectx(f, ctx1).data()
  1779             content1 = getfilectx(f, ctx1).data()
  1780         if f not in removedset:
  1780         if f not in removedset:
  1781             content2 = getfilectx(f, ctx2).data()
  1781             content2 = getfilectx(f, ctx2).data()
  1782         f1, f2 = f, f
  1782         f1, f2 = f, f
  1783         if opts.git or losedatafn:
  1783         if f in addedset:
  1784             if f in addedset:
  1784             f1 = None
  1785                 f1 = None
  1785             if f in copy:
  1786                 if f in copy:
       
  1787                     if opts.git:
       
  1788                         f1 = copy[f]
       
  1789                         if f1 in removedset and f1 not in gone:
       
  1790                             copyop = 'rename'
       
  1791                             gone.add(f1)
       
  1792                         else:
       
  1793                             copyop = 'copy'
       
  1794                         content1 = getfilectx(f1, ctx1).data()
       
  1795             elif f in removedset:
       
  1796                 f2 = None
       
  1797                 if opts.git:
  1786                 if opts.git:
  1798                     # have we already reported a copy above?
  1787                     f1 = copy[f]
  1799                     if (f in copyto and copyto[f] in addedset
  1788                     if f1 in removedset and f1 not in gone:
  1800                         and copy[copyto[f]] == f):
  1789                         copyop = 'rename'
  1801                         continue
  1790                         gone.add(f1)
       
  1791                     else:
       
  1792                         copyop = 'copy'
       
  1793                     content1 = getfilectx(f1, ctx1).data()
       
  1794         elif f in removedset:
       
  1795             f2 = None
       
  1796             if opts.git:
       
  1797                 # have we already reported a copy above?
       
  1798                 if (f in copyto and copyto[f] in addedset
       
  1799                     and copy[copyto[f]] == f):
       
  1800                     continue
  1802 
  1801 
  1803         flag1 = None
  1802         flag1 = None
  1804         flag2 = None
  1803         flag2 = None
  1805         binary = False
  1804         binary = False
  1806         if opts.git or losedatafn:
  1805         if opts.git or losedatafn: