# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 1559155241 -10800 # Node ID c004340dc6871a0cd79e9fb3d9be1c667755e3d9 # Parent 64ed405dd34251667af984ca4b6916a2114b1a4d py3: fix test-convert-svn-sink.t In cases where the root commit is empty commit, None will be returned as parents. This was implemented by 2c13e91ede6e. This breaks test on py3 because `b'%s' % None` does not work. It does not matter whether we return `None` or `'None'` as we skipped converting to svn step by doing an early return. So let's return `'None'`. I tried to patch all the users to convert `None` to `'None'`, but there were more users than I expected. I hit 3 of them and decided to fix it this way around. Differential Revision: https://phab.mercurial-scm.org/D6458 diff -r 64ed405dd342 -r c004340dc687 hgext/convert/subversion.py --- a/hgext/convert/subversion.py Thu May 30 13:57:34 2019 -0700 +++ b/hgext/convert/subversion.py Wed May 29 21:40:41 2019 +0300 @@ -1333,7 +1333,7 @@ rev = self.commit_re.search(output).group(1) except AttributeError: if not files: - return parents[0] if parents else None + return parents[0] if parents else 'None' self.ui.warn(_('unexpected svn output:\n')) self.ui.warn(output) raise error.Abort(_('unable to cope with svn output'))