mercurial/patch.py
changeset 32189 15f10ee778f8
parent 32188 776127b29a5c
child 32190 0c67ab3d77d5
equal deleted inserted replaced
32188:776127b29a5c 32189:15f10ee778f8
  2582                     header.append('%s from %s' % (copyop, path1))
  2582                     header.append('%s from %s' % (copyop, path1))
  2583                     header.append('%s to %s' % (copyop, path2))
  2583                     header.append('%s to %s' % (copyop, path2))
  2584         elif revs and not repo.ui.quiet:
  2584         elif revs and not repo.ui.quiet:
  2585             header.append(diffline(path1, revs))
  2585             header.append(diffline(path1, revs))
  2586 
  2586 
       
  2587         #  fctx.is  | diffopts                | what to   | is fctx.data()
       
  2588         #  binary() | text nobinary git index | output?   | outputted?
       
  2589         # ------------------------------------|----------------------------
       
  2590         #  yes      | no   no       no  *     | summary   | no
       
  2591         #  yes      | no   no       yes *     | base85    | yes
       
  2592         #  yes      | no   yes      no  *     | summary   | no
       
  2593         #  yes      | no   yes      yes 0     | summary   | no
       
  2594         #  yes      | no   yes      yes >0    | summary   | semi [1]
       
  2595         #  yes      | yes  *        *   *     | text diff | yes
       
  2596         #  no       | *    *        *   *     | text diff | yes
       
  2597         # [1]: hash(fctx.data()) is outputted. so fctx.data() cannot be faked
  2587         if binary and opts.git and not opts.nobinary and not opts.text:
  2598         if binary and opts.git and not opts.nobinary and not opts.text:
  2588             text = mdiff.b85diff(content1, content2)
  2599             text = mdiff.b85diff(content1, content2)
  2589             if text:
  2600             if text:
  2590                 header.append('index %s..%s' %
  2601                 header.append('index %s..%s' %
  2591                               (gitindex(content1), gitindex(content2)))
  2602                               (gitindex(content1), gitindex(content2)))