Issue #316 resolved

hg clone file:/// fails with subversion-1.7.1 on Linux

Shlomi Fish
created an issue

When I do hg clone for a local repository while using subversion-1.7.1-1.mga2 on Mageia Linux 2 (Cauldron) I'm getting an error:

{{{ shlomif@telaviv1:~/progs/C/ip-noise/hg$ hg clone file:///home/shlomif/ip-noise destination directory: ip-noise [r1] None: Standard project directories initialized by cvs2svn. [r2] root: initial checkin 0 trunk/CVSROOT/checkoutlist unknown exception encountered, please report by visiting http://mercurial.selenic.com/wiki/BugTracker Python 2.7.2 (default, Sep 2 2011, 01:03:44) [GCC 4.5.2] Mercurial Distributed SCM (version 2.0) Extensions loaded: rebase, hgsubversion, progress, purge Traceback (most recent call last): File "/usr/bin/hg", line 38, in <module> mercurial.dispatch.run() File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 27, in run sys.exit(dispatch(request(sys.argv[1:]))) File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 64, in dispatch return _runcatch(req) File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 87, in _runcatch return _dispatch(req) File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 684, in _dispatch cmdpats, cmdoptions) File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 466, in runcommand ret = _runcommand(ui, options, cmd, d) File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 738, in _runcommand return checkargs() File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 692, in checkargs return cmdfunc() File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 681, in <lambda> d = lambda: util.checksignature(func)(ui, *args, cmdoptions) File "/usr/lib64/python2.7/site-packages/mercurial/util.py", line 454, in check return func(args, kwargs) File "/usr/lib64/python2.7/site-packages/mercurial/extensions.py", line 139, in wrap util.checksignature(origfn), *args, kwargs) File "/usr/lib64/python2.7/site-packages/mercurial/util.py", line 454, in check return func(args, kwargs) File "/usr/lib/python2.7/site-packages/hgsubversion/wrappers.py", line 486, in clone orig(ui, source, dest, opts) File "/usr/lib64/python2.7/site-packages/mercurial/util.py", line 454, in check return func(args, kwargs) File "/usr/lib64/python2.7/site-packages/mercurial/commands.py", line 1137, in clone branch=opts.get('branch')) File "/usr/lib64/python2.7/site-packages/mercurial/extensions.py", line 184, in wrap return wrapper(origfn, *args, kwargs) File "/usr/lib/python2.7/site-packages/hgsubversion/wrappers.py", line 477, in hgclonewrapper data['srcrepo'], data['dstrepo'] = orig(ui, args, opts) File "/usr/lib64/python2.7/site-packages/mercurial/hg.py", line 347, in clone destrepo.clone(srcrepo, heads=revs, stream=stream) File "/usr/lib64/python2.7/site-packages/mercurial/localrepo.py", line 2056, in clone return self.pull(remote, heads) File "/usr/lib/python2.7/site-packages/hgsubversion/svnrepo.py", line 69, in wrapper return fn(self, *args, opts) File "/usr/lib/python2.7/site-packages/hgsubversion/svnrepo.py", line 88, in pull return wrappers.pull(self, remote, heads, force) File "/usr/lib/python2.7/site-packages/hgsubversion/wrappers.py", line 346, in pull firstrun) File "/usr/lib/python2.7/site-packages/hgsubversion/replay.py", line 67, in convert_rev svn.get_replay(r.revnum, editor, meta.revmap.oldest) File "/usr/lib/python2.7/site-packages/hgsubversion/svnwrap/svn_swig_wrapper.py", line 405, in get_replay e_baton, self.pool) File "/usr/lib64/python2.7/site-packages/libsvn/ra.py", line 862, in svn_ra_replay return _ra.svn_ra_replay(*args) File "/usr/lib/python2.7/site-packages/hgsubversion/editor.py", line 348, in txdelt_window self.current.files[self.current.file] = target.getvalue() ValueError: I/O operation on closed file }}}

I got it for a different repository too.

Comments (6)

  1. Shlomi Fish reporter

    Hi,

    sorry for the late response, but I didn't get a notification on your reply (maybe it was misclassified as spam). In any case, now I'm getting errors when trying to do "hg clone https://config-inifiles.svn.sourceforge.net/svnroot/config-inifiles/" (I'm using subversion-1.7.1-1.mga2 on Mageia Linux Cauldron and the hgsubversion tip.):

    $ hg clone https://config-inifiles.svn.sourceforge.net/svnroot/config-inifiles/
    warning: config-inifiles.svn.sourceforge.net certificate with fingerprint 94:74:b3:a9:54:ce:dc:e5:0d:d6:cf:86:b1:40:5a:48:b9:ea:15:de not verified (check hostfingerprints or web.cacerts config setting)
    warning: config-inifiles.svn.sourceforge.net certificate with fingerprint 94:74:b3:a9:54:ce:dc:e5:0d:d6:cf:86:b1:40:5a:48:b9:ea:15:de not verified (check hostfingerprints or web.cacerts config setting)
    warning: config-inifiles.svn.sourceforge.net certificate with fingerprint 94:74:b3:a9:54:ce:dc:e5:0d:d6:cf:86:b1:40:5a:48:b9:ea:15:de not verified (check hostfingerprints or web.cacerts config setting)
    warning: config-inifiles.svn.sourceforge.net certificate with fingerprint 94:74:b3:a9:54:ce:dc:e5:0d:d6:cf:86:b1:40:5a:48:b9:ea:15:de not verified (check hostfingerprints or web.cacerts config setting)
    warning: config-inifiles.svn.sourceforge.net certificate with fingerprint 94:74:b3:a9:54:ce:dc:e5:0d:d6:cf:86:b1:40:5a:48:b9:ea:15:de not verified (check hostfingerprints or web.cacerts config setting)
    warning: config-inifiles.svn.sourceforge.net certificate with fingerprint 94:74:b3:a9:54:ce:dc:e5:0d:d6:cf:86:b1:40:5a:48:b9:ea:15:de not verified (check hostfingerprints or web.cacerts config setting)
    warning: config-inifiles.svn.sourceforge.net certificate with fingerprint 94:74:b3:a9:54:ce:dc:e5:0d:d6:cf:86:b1:40:5a:48:b9:ea:15:de not verified (check hostfingerprints or web.cacerts config setting)
    warning: config-inifiles.svn.sourceforge.net certificate with fingerprint 94:74:b3:a9:54:ce:dc:e5:0d:d6:cf:86:b1:40:5a:48:b9:ea:15:de not verified (check hostfingerprints or web.cacerts config setting)
    warning: config-inifiles.svn.sourceforge.net certificate with fingerprint 94:74:b3:a9:54:ce:dc:e5:0d:d6:cf:86:b1:40:5a:48:b9:ea:15:de not verified (check hostfingerprints or web.cacerts config setting)
    warning: config-inifiles.svn.sourceforge.net certificate with fingerprint 94:74:b3:a9:54:ce:dc:e5:0d:d6:cf:86:b1:40:5a:48:b9:ea:15:de not verified (check hostfingerprints or web.cacerts config setting)
    destination directory: config-inifiles
    [r1] None: Standard project directories initialized by cvs2svn.
    [r2] rbowen: Initial checkin of the Config::IniFiles source                     
    pull [                                                                ]   2/2170 branches/rcbowen/config-inifiles/IniFiles.pm
    ** unknown exception encountered, please report by visiting                     
    **  http://mercurial.selenic.com/wiki/BugTracker
    ** Python 2.7.2 (default, Dec  5 2011, 16:10:45) [GCC 4.6.2]
    ** Mercurial Distributed SCM (version 2.0.1)
    ** Extensions loaded: rebase, hgsubversion, progress, purge
    Traceback (most recent call last):
      File "/usr/bin/hg", line 38, in <module>
        mercurial.dispatch.run()
      File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 27, in run
        sys.exit(dispatch(request(sys.argv[1:])))
      File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 64, in dispatch
        return _runcatch(req)
      File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 87, in _runcatch
        return _dispatch(req)
      File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 684, in _dispatch
        cmdpats, cmdoptions)
      File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 466, in runcommand
        ret = _runcommand(ui, options, cmd, d)
      File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 738, in _runcommand
        return checkargs()
      File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 692, in checkargs
        return cmdfunc()
      File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 681, in <lambda>
        d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
      File "/usr/lib64/python2.7/site-packages/mercurial/util.py", line 455, in check
        return func(*args, **kwargs)
      File "/usr/lib64/python2.7/site-packages/mercurial/extensions.py", line 139, in wrap
        util.checksignature(origfn), *args, **kwargs)
      File "/usr/lib64/python2.7/site-packages/mercurial/util.py", line 455, in check
        return func(*args, **kwargs)
      File "/home/shlomif/Download/unpack/prog/hgsubversion/hgsubversion/hgsubversion/wrappers.py", line 488, in clone
        orig(ui, source, dest, **opts)
      File "/usr/lib64/python2.7/site-packages/mercurial/util.py", line 455, in check
        return func(*args, **kwargs)
      File "/usr/lib64/python2.7/site-packages/mercurial/commands.py", line 1137, in clone
        branch=opts.get('branch'))
      File "/usr/lib64/python2.7/site-packages/mercurial/extensions.py", line 184, in wrap
        return wrapper(origfn, *args, **kwargs)
      File "/home/shlomif/Download/unpack/prog/hgsubversion/hgsubversion/hgsubversion/wrappers.py", line 477, in hgclonewrapper
        data['srcrepo'], data['dstrepo'] = orig(ui, *args, **opts)
      File "/usr/lib64/python2.7/site-packages/mercurial/hg.py", line 347, in clone
        destrepo.clone(srcrepo, heads=revs, stream=stream)
      File "/usr/lib64/python2.7/site-packages/mercurial/localrepo.py", line 2056, in clone
        return self.pull(remote, heads)
      File "/home/shlomif/Download/unpack/prog/hgsubversion/hgsubversion/hgsubversion/svnrepo.py", line 69, in wrapper
        return fn(self, *args, **opts)
      File "/home/shlomif/Download/unpack/prog/hgsubversion/hgsubversion/hgsubversion/svnrepo.py", line 88, in pull
        return wrappers.pull(self, remote, heads, force)
      File "/home/shlomif/Download/unpack/prog/hgsubversion/hgsubversion/hgsubversion/wrappers.py", line 346, in pull
        firstrun)
      File "/home/shlomif/Download/unpack/prog/hgsubversion/hgsubversion/hgsubversion/replay.py", line 67, in convert_rev
        svn.get_replay(r.revnum, editor, meta.revmap.oldest)
      File "/home/shlomif/Download/unpack/prog/hgsubversion/hgsubversion/hgsubversion/svnwrap/svn_swig_wrapper.py", line 405, in get_replay
        e_baton, self.pool)
      File "/usr/lib64/python2.7/site-packages/libsvn/ra.py", line 862, in svn_ra_replay
        return _ra.svn_ra_replay(*args)
      File "/home/shlomif/Download/unpack/prog/hgsubversion/hgsubversion/hgsubversion/editor.py", line 348, in txdelt_window
        self.current.files[self.current.file] = target.getvalue()
    ValueError: I/O operation on closed file
    

    I also get a problem doing "hg pull" from the svn URL from an already cloned repository:

    shlomif[cfg-ini]:$base/hg/config-inifiles$ hg pull svn
    pulling from svn+https://config-inifiles.svn.sourceforge.net/svnroot/config-inifiles/
    [r217] rbowen: Fixes bug reported in
    pull [===================================================================>] 1/174467 trunk/config-inifiles/lib/Config/IniFiles.pm
    ** unknown exception encountered, please report by visiting                     
    **  http://mercurial.selenic.com/wiki/BugTracker
    ** Python 2.7.2 (default, Dec  5 2011, 16:10:45) [GCC 4.6.2]
    ** Mercurial Distributed SCM (version 2.0.1)
    ** Extensions loaded: rebase, hgsubversion, progress, purge
    Traceback (most recent call last):
      File "/usr/bin/hg", line 38, in <module>
        mercurial.dispatch.run()
      File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 27, in run
        sys.exit(dispatch(request(sys.argv[1:])))
      File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 64, in dispatch
        return _runcatch(req)
      File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 87, in _runcatch
        return _dispatch(req)
      File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 684, in _dispatch
        cmdpats, cmdoptions)
      File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 466, in runcommand
        ret = _runcommand(ui, options, cmd, d)
      File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 738, in _runcommand
        return checkargs()
      File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 692, in checkargs
        return cmdfunc()
      File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 681, in <lambda>
        d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
      File "/usr/lib64/python2.7/site-packages/mercurial/util.py", line 455, in check
        return func(*args, **kwargs)
      File "/usr/lib64/python2.7/site-packages/mercurial/extensions.py", line 139, in wrap
        util.checksignature(origfn), *args, **kwargs)
      File "/usr/lib64/python2.7/site-packages/mercurial/util.py", line 455, in check
        return func(*args, **kwargs)
      File "/home/shlomif/Download/unpack/prog/hgsubversion/hgsubversion/hgsubversion/wrappers.py", line 526, in generic
        return orig(ui, repo, *args, **opts)
      File "/usr/lib64/python2.7/site-packages/mercurial/util.py", line 455, in check
        return func(*args, **kwargs)
      File "/usr/lib64/python2.7/site-packages/mercurial/extensions.py", line 139, in wrap
        util.checksignature(origfn), *args, **kwargs)
      File "/usr/lib64/python2.7/site-packages/mercurial/util.py", line 455, in check
        return func(*args, **kwargs)
      File "/usr/lib64/python2.7/site-packages/hgext/rebase.py", line 629, in pullrebase
        orig(ui, repo, *args, **opts)
      File "/usr/lib64/python2.7/site-packages/mercurial/util.py", line 455, in check
        return func(*args, **kwargs)
      File "/usr/lib64/python2.7/site-packages/mercurial/commands.py", line 4245, in pull
        modheads = repo.pull(other, heads=revs, force=opts.get('force'))
      File "/home/shlomif/Download/unpack/prog/hgsubversion/hgsubversion/hgsubversion/svnrepo.py", line 69, in wrapper
        return fn(self, *args, **opts)
      File "/home/shlomif/Download/unpack/prog/hgsubversion/hgsubversion/hgsubversion/svnrepo.py", line 88, in pull
        return wrappers.pull(self, remote, heads, force)
      File "/home/shlomif/Download/unpack/prog/hgsubversion/hgsubversion/hgsubversion/wrappers.py", line 346, in pull
        firstrun)
      File "/home/shlomif/Download/unpack/prog/hgsubversion/hgsubversion/hgsubversion/replay.py", line 67, in convert_rev
        svn.get_replay(r.revnum, editor, meta.revmap.oldest)
      File "/home/shlomif/Download/unpack/prog/hgsubversion/hgsubversion/hgsubversion/svnwrap/svn_swig_wrapper.py", line 405, in get_replay
        e_baton, self.pool)
      File "/usr/lib64/python2.7/site-packages/libsvn/ra.py", line 862, in svn_ra_replay
        return _ra.svn_ra_replay(*args)
      File "/home/shlomif/Download/unpack/prog/hgsubversion/hgsubversion/hgsubversion/editor.py", line 348, in txdelt_window
        self.current.files[self.current.file] = target.getvalue()
    ValueError: I/O operation on closed file
    shlomif[cfg-ini]:$base/hg/config-inifiles$ 
    

    Can you look into these problems?

    Regards,

    -- Shlomi Fish

  2. Shlomi Fish reporter

    Hi all, I found a workaround for this issue: just install subvertpy-0.8.10 and use that and then hgsubversion is happy (while one is using subversion-1.7.x).

    Nevertheless you may wish to either fix hgsubversion's support for svn_swig_py or alternatively remove it altogether.

  3. Augie Fackler repo owner

    So, bitbucket doesn't email when you update a bug, so nobody was watching.

    Anyway, if this isn't fixed at tip of the hgsubversion repo for you, please PLEASE let us know on hgsubversion@googlegroups.com. I'm marking this as resolved because I know others are using it against 1.7 just fine.

  4. Log in to comment