mercurial/patch.py
branchstable
changeset 15086 db0646afb725
parent 14832 d60e4f227d75
child 15089 bfe903b1ff4e
child 15158 7ce7177e029a
equal deleted inserted replaced
15084:deed405e8980 15086:db0646afb725
  1197             yield 'hunk', h
  1197             yield 'hunk', h
  1198         elif x.startswith('diff --git'):
  1198         elif x.startswith('diff --git'):
  1199             m = gitre.match(x)
  1199             m = gitre.match(x)
  1200             if not m:
  1200             if not m:
  1201                 continue
  1201                 continue
  1202             if gitpatches is None:
  1202             if not gitpatches:
  1203                 # scan whole input for git metadata
  1203                 # scan whole input for git metadata
  1204                 gitpatches = [('a/' + gp.path, 'b/' + gp.path, gp) for gp
  1204                 gitpatches = [('a/' + gp.path, 'b/' + gp.path, gp) for gp
  1205                               in scangitpatch(lr, x)]
  1205                               in scangitpatch(lr, x)]
  1206                 yield 'git', [g[2].copy() for g in gitpatches
  1206                 yield 'git', [g[2].copy() for g in gitpatches
  1207                               if g[2].op in ('COPY', 'RENAME')]
  1207                               if g[2].op in ('COPY', 'RENAME')]