mercurial/patch.py
changeset 35582 72b91f905065
parent 35383 82c3762349ac
child 35589 3328d53254d9
equal deleted inserted replaced
35581:154754d1f137 35582:72b91f905065
  2652         if not text:
  2652         if not text:
  2653             text = ""
  2653             text = ""
  2654         l = len(text)
  2654         l = len(text)
  2655         s = hashlib.sha1('blob %d\0' % l)
  2655         s = hashlib.sha1('blob %d\0' % l)
  2656         s.update(text)
  2656         s.update(text)
  2657         return s.hexdigest()
  2657         return hex(s.digest())
  2658 
  2658 
  2659     if opts.noprefix:
  2659     if opts.noprefix:
  2660         aprefix = bprefix = ''
  2660         aprefix = bprefix = ''
  2661     else:
  2661     else:
  2662         aprefix = 'a/'
  2662         aprefix = 'a/'