mercurial/patch.py
changeset 36607 c6061cadb400
parent 36447 588048a6a8d3
child 36646 463df2986814
equal deleted inserted replaced
36606:4de15c54e59f 36607:c6061cadb400
    38     scmutil,
    38     scmutil,
    39     similar,
    39     similar,
    40     util,
    40     util,
    41     vfs as vfsmod,
    41     vfs as vfsmod,
    42 )
    42 )
       
    43 from .utils import dateutil
    43 
    44 
    44 diffhelpers = policy.importmod(r'diffhelpers')
    45 diffhelpers = policy.importmod(r'diffhelpers')
    45 stringio = util.stringio
    46 stringio = util.stringio
    46 
    47 
    47 gitre = re.compile(br'diff --git a/(.*) b/(.*)')
    48 gitre = re.compile(br'diff --git a/(.*) b/(.*)')
  2667         return 'diff %s %s' % (revinfo, f)
  2668         return 'diff %s %s' % (revinfo, f)
  2668 
  2669 
  2669     def isempty(fctx):
  2670     def isempty(fctx):
  2670         return fctx is None or fctx.size() == 0
  2671         return fctx is None or fctx.size() == 0
  2671 
  2672 
  2672     date1 = util.datestr(ctx1.date())
  2673     date1 = dateutil.datestr(ctx1.date())
  2673     date2 = util.datestr(ctx2.date())
  2674     date2 = dateutil.datestr(ctx2.date())
  2674 
  2675 
  2675     gitmode = {'l': '120000', 'x': '100755', '': '100644'}
  2676     gitmode = {'l': '120000', 'x': '100755', '': '100644'}
  2676 
  2677 
  2677     if relroot != '' and (repo.ui.configbool('devel', 'all-warnings')
  2678     if relroot != '' and (repo.ui.configbool('devel', 'all-warnings')
  2678                           or repo.ui.configbool('devel', 'check-relroot')):
  2679                           or repo.ui.configbool('devel', 'check-relroot')):