Incompatibility with Mercurial 4.5

Create issue
Issue #472 new
Josh Holland created an issue

On trying to clone an SVN repository with Mercurial 4.5 and tip version of hgsubversion, I get the following error:

** Unknown exception encountered with possibly-broken third-party extension hgsubversion
** which supports versions 4.4 of Mercurial.
** Please disable hgsubversion and try your action again.
** If that fixes the bug please report it to the extension author.
** Python 2.7.14 (default, Jan  5 2018, 10:41:29) [GCC 7.2.1 20171224]
** Mercurial Distributed SCM (version 4.5)
** Extensions loaded: strip, hgsubversion, convert, purge, shelve, rebase
Traceback (most recent call last):
  File "/usr/bin/hg", line 41, in <module>
  File "/usr/lib/python2.7/site-packages/mercurial/", line 88, in run
    status = (dispatch(req) or 0) & 255
  File "/usr/lib/python2.7/site-packages/mercurial/", line 183, in dispatch
    ret = _runcatch(req)
  File "/usr/lib/python2.7/site-packages/mercurial/", line 324, in _runcatch
    return _callcatch(ui, _runcatchfunc)
  File "/usr/lib/python2.7/site-packages/mercurial/", line 332, in _callcatch
    return scmutil.callcatch(ui, func)
  File "/usr/lib/python2.7/site-packages/mercurial/", line 154, in callcatch
    return func()
  File "/usr/lib/python2.7/site-packages/mercurial/", line 314, in _runcatchfunc
    return _dispatch(req)
  File "/usr/lib/python2.7/site-packages/mercurial/", line 918, in _dispatch
    cmdpats, cmdoptions)
  File "/usr/lib/python2.7/site-packages/mercurial/", line 673, in runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/usr/lib/python2.7/site-packages/mercurial/", line 926, in _runcommand
    return cmdfunc()
  File "/usr/lib/python2.7/site-packages/mercurial/", line 915, in <lambda>
    d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
  File "/usr/lib/python2.7/site-packages/mercurial/", line 1195, in check
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/mercurial/", line 1195, in check
    return func(*args, **kwargs)
  File "/home/josh/hgsubversion/hgsubversion/", line 691, in clone
    fd = dst.vfs("hgrc", "a", text=True)
TypeError: __call__() got an unexpected keyword argument 'text'

This appears to be due to API changes in Mercurial 4.5, specifically: "text=False|True option is dropped from the vfs interface because of Python 3 compatibility issue. Use util.tonativeeol/fromnativeeol() to convert EOL manually. ".

I'm running Python 3.6.4 on Arch Linux:

$ hg version --svn
Mercurial Distributed SCM (version 4.5)
(see for more information)

Copyright (C) 2005-2018 Matt Mackall and others
This is free software; see the source for copying conditions. There is NO

hgsubversion: 67b28d657f62
Subversion: 1.9.5
bindings: Subvertpy 0.9.2

Comments (0)

  1. Log in to comment