mercurial/patch.py
branchstable
changeset 23924 0db6810e84e8
parent 23754 ed645dc672e5
child 23995 d8330fb8c44d
equal deleted inserted replaced
23923:ab6fd3205dad 23924:0db6810e84e8
  1829                 else:
  1829                 else:
  1830                     if opts.git:
  1830                     if opts.git:
  1831                         header.append('new file mode %s\n' % mode)
  1831                         header.append('new file mode %s\n' % mode)
  1832                     elif ctx2.flags(f):
  1832                     elif ctx2.flags(f):
  1833                         losedatafn(f)
  1833                         losedatafn(f)
  1834                 # In theory, if tn was copied or renamed we should check
  1834                 if util.binary(to) or util.binary(tn):
  1835                 # if the source is binary too but the copy record already
       
  1836                 # forces git mode.
       
  1837                 if util.binary(tn):
       
  1838                     if opts.git:
  1835                     if opts.git:
  1839                         binarydiff = True
  1836                         binarydiff = True
  1840                     else:
  1837                     else:
  1841                         losedatafn(f)
  1838                         losedatafn(f)
  1842                 if not opts.git and not tn:
  1839                 if not opts.git and not tn: