Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/merge.py @ 33107:9fc880dff5f3
py3: use hex() to convert the hash to bytes
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Mon, 26 Jun 2017 17:20:46 +0530 |
parents | eb4c49f55f1f |
children | 7017567ebdf2 |
comparison
equal
deleted
inserted
replaced
33106:4c5af472a599 | 33107:9fc880dff5f3 |
---|---|
412 note: also write the local version to the `.hg/merge` directory. | 412 note: also write the local version to the `.hg/merge` directory. |
413 """ | 413 """ |
414 if fcl.isabsent(): | 414 if fcl.isabsent(): |
415 hash = nullhex | 415 hash = nullhex |
416 else: | 416 else: |
417 hash = hashlib.sha1(fcl.path()).hexdigest() | 417 hash = hex(hashlib.sha1(fcl.path()).digest()) |
418 self._repo.vfs.write('merge/' + hash, fcl.data()) | 418 self._repo.vfs.write('merge/' + hash, fcl.data()) |
419 self._state[fd] = ['u', hash, fcl.path(), | 419 self._state[fd] = ['u', hash, fcl.path(), |
420 fca.path(), hex(fca.filenode()), | 420 fca.path(), hex(fca.filenode()), |
421 fco.path(), hex(fco.filenode()), | 421 fco.path(), hex(fco.filenode()), |
422 fcl.flags()] | 422 fcl.flags()] |