D271: obsolete: use bytes() instead of str() so the node is bytes on py3
This revision was automatically updated to reflect the committed changes. durin42 marked an inline comment as done. Closed by commit rHG388901a15bfa: obsolete: use bytes() instead of str() so the node is bytes on py3 (authored by durin42). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D271?vs=675=686 REVISION DETAIL https://phab.mercurial-scm.org/D271 AFFECTED FILES mercurial/obsolete.py CHANGE DETAILS diff --git a/mercurial/obsolete.py b/mercurial/obsolete.py --- a/mercurial/obsolete.py +++ b/mercurial/obsolete.py @@ -583,7 +583,7 @@ metadata = tuple(sorted(metadata.iteritems())) -marker = (str(prec), tuple(succs), int(flag), metadata, date, parents) +marker = (bytes(prec), tuple(succs), int(flag), metadata, date, parents) return bool(self.add(transaction, [marker])) def add(self, transaction, markers): To: durin42, #hg-reviewers, quark Cc: yuja, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D271: obsolete: use bytes() instead of str() so the node is bytes on py3
durin42 marked an inline comment as done. durin42 added inline comments. INLINE COMMENTS > yuja wrote in obsolete.py:587 > Why can't this be just `bytes(prec)` ? > > I don't think `str(prec).encode('ascii')` is valid for binary node id. I swear that didn't work before. But it does work, so yay! REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D271 To: durin42, #hg-reviewers, quark Cc: yuja, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D271: obsolete: use bytes() instead of str() so the node is bytes on py3
durin42 updated this revision to Diff 675. durin42 retitled this revision from "obsolete: use bytestr() instead of str() so the node is bytes on py3" to "obsolete: use bytes() instead of str() so the node is bytes on py3". REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D271?vs=636=675 REVISION DETAIL https://phab.mercurial-scm.org/D271 AFFECTED FILES mercurial/obsolete.py CHANGE DETAILS diff --git a/mercurial/obsolete.py b/mercurial/obsolete.py --- a/mercurial/obsolete.py +++ b/mercurial/obsolete.py @@ -583,7 +583,7 @@ metadata = tuple(sorted(metadata.iteritems())) -marker = (str(prec), tuple(succs), int(flag), metadata, date, parents) +marker = (bytes(prec), tuple(succs), int(flag), metadata, date, parents) return bool(self.add(transaction, [marker])) def add(self, transaction, markers): To: durin42, #hg-reviewers, quark Cc: yuja, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel