Issue771

Title hg convert crashes on svn source
Priority bug Status resolved
Superseder Nosy List Omnifarious, ThurnerRupert, bos, djc, jgoerzen, korpios, pitrou, pmezard, sandeepss
Assigned To Topics convert, svn

Created on 2007-10-09.21:29:06 by jgoerzen, last changed 2008-03-10.07:51:02 by djc.

Messages
msg5529 (view) Author: djc Date: 2008-03-10.07:51:02
In main, resolving.
msg4917 (view) Author: pmezard Date: 2008-01-19.13:54:41
Fixed in crew and crew-stable by b32a0596b2d7

Tested by converting nuxeo, jsdoc and a couple of problematic trac revisions.
msg4858 (view) Author: pitrou Date: 2008-01-09.20:19:03
pmezard: that's because you have to write:

svn ls http://jsdoc-toolkit.googlecode.com/svn/trunk/lib@26

This is mandatory when trying to get information about a deleted directory.
FWIW, hgsvn does just fine on that repository:

$ hg log -r svn.26 -r svn.27 -C -v  app
changeset:   26:64c21b0e54f0
branch:      trunk
tag:         svn.27
user:        micmath
date:        Sat Jun 16 00:29:53 2007 +0200
files:       app/DocTag.js app/Doclet.js app/JsDoc.js app/JsIO.js app/JsParse.js
app/JsPlate.js app/JsTestrun.js app/JsToke.js app/Symbol.js app/Util.js
app/js.jar app/run.js lib/DocTag.js lib/Doclet.js lib/JsDoc.js lib/JsIO.js
lib/JsParse.js lib/JsPlate.js lib/JsTestrun.js lib/JsToke.js lib/Symbol.js
lib/Util.js lib/js.jar lib/run.js
copies:      app/DocTag.js (lib/DocTag.js) app/Doclet.js (lib/Doclet.js)
app/JsDoc.js (lib/JsDoc.js) app/JsIO.js (lib/JsIO.js) app/JsParse.js
(lib/JsParse.js) app/JsPlate.js (lib/JsPlate.js) app/JsTestrun.js
(lib/JsTestrun.js) app/JsToke.js (lib/JsToke.js) app/Symbol.js (lib/Symbol.js)
app/Util.js (lib/Util.js) app/js.jar (lib/js.jar) app/run.js (lib/run.js)
msg4824 (view) Author: pmezard Date: 2008-01-05.16:14:50
FYI, another workaround for small repositories is to mirror them locally with
svnsync, then convert the local mirror. Unfortunately, svnsync is unable to work
on repository subdirectories.
msg4812 (view) Author: sandeepss Date: 2008-01-04.07:47:36
I have seen similar problems (both the PROPFIND and the REPORT request ones) 
while converting memcached SVN.
The PROPFIND problem went away after updating mercurial *as well as* 
SVN+APR+NEON . This most likely happens due to the API return values being 
interpreted differently.
The REPORT request problem is most likely a problem of SVN server-client 
version conflicts. SVN added a lot new commands and properties in version 1.4 
(svnsync as well). Check versions of SVN server + client.

Just my $0.02
msg4559 (view) Author: pmezard Date: 2007-12-10.13:44:16
I am having the same issue while trying to convert
http://jsdoc-toolkit.googlecode.com/svn/trunk. Again, the log entry looks like:

------------------------------------------------------------------------
r27 | micmath | 2007-06-16 00:29:53 +0200 (Sam, 16 jui 2007) | 2 lines
Changed paths:
   A /trunk/app (from /trunk/lib:26)
   D /trunk/lib
------------------------------------------------------------------------

and the converter choke when accessing /trunk/lib:26.

What's interesting is:

$ svn ls -r 26 http://jsdoc-toolkit.googlecode.com/svn/trunk/lib
svn: REPORT request failed on '/svn/!svn/bc/377/trunk/lib'
svn: '/svn/!svn/bc/377/trunk/lib' path not found

Picking random revisions from 0 to 26, I cannot list the deleted directory. I
will try to reproduce this situation with a local subversion repository.
msg4104 (view) Author: bos Date: 2007-10-10.21:06:28
Sorry, I misread the initial report.
msg4099 (view) Author: jgoerzen Date: 2007-10-10.13:58:31
Here's the "renamed" changeset from svn log -v:

r25497 | bstefanescu | 2007-09-27 11:15:39 -0500 (Thu, 27 Sep 2007) | 1 line
Changed paths:
   D /org.nuxeo.ecm.client/trunk/commandline
   A /org.nuxeo.ecm.client/trunk/nuxeo-client-commands (from
/org.nuxeo.ecm.client/trunk/commandline:25496)

renamed

I wonder if the convert code is trying to look at trunk/commandline, which no
longer exists in this rev?
msg4098 (view) Author: jgoerzen Date: 2007-10-10.13:57:01
I forgot to add that I did hg pull -u my Mercurial tree and rebuild hg before
running this.  It looks somewhat like --traceback caused a second copy of the
same output to be emitted though.
msg4097 (view) Author: jgoerzen Date: 2007-10-10.13:55:15
Here's the output with hg --traceback convert
https://svn.nuxeo.org/nuxeo/org.nuxeo.ecm.client/trunk nuxeo-client-hg

initializing destination nuxeo-client-hg repository
scanning source...
sorting...
converting...
36 trunk creation
35 moved to cmd line clients project folders
34 renamed
Traceback (most recent call last):
  File "/home/jgoerzen/no-backup/programs/hg/mercurial/dispatch.py", line 45, in
_runcatch
    return _dispatch(ui, args)
  File "/home/jgoerzen/no-backup/programs/hg/mercurial/dispatch.py", line 348,
in _dispatch
    ret = _runcommand(ui, options, cmd, d)
  File "/home/jgoerzen/no-backup/programs/hg/mercurial/dispatch.py", line 401,
in _runcommand
    return checkargs()
  File "/home/jgoerzen/no-backup/programs/hg/mercurial/dispatch.py", line 357,
in checkargs
    return cmdfunc()
  File "/home/jgoerzen/no-backup/programs/hg/mercurial/dispatch.py", line 342,
in <lambda>
    d = lambda: func(ui, *args, **cmdoptions)
  File "/home/jgoerzen/no-backup/programs/hg-devel/hgext/convert/__init__.py",
line 398, in convert
    c.convert()
  File "/home/jgoerzen/no-backup/programs/hg-devel/hgext/convert/__init__.py",
line 265, in convert
    self.copy(c)
  File "/home/jgoerzen/no-backup/programs/hg-devel/hgext/convert/__init__.py",
line 209, in copy
    changes = self.source.getchanges(rev)
  File "/home/jgoerzen/no-backup/programs/hg-devel/hgext/convert/subversion.py",
line 213, in getchanges
    files, copies = self.expandpaths(rev, paths, parents)
  File "/home/jgoerzen/no-backup/programs/hg-devel/hgext/convert/subversion.py",
line 429, in expandpaths
    fromkind = svn.ra.check_path(self.ra, entrypath, fromrev)
  File "/var/lib/python-support/python2.4/libsvn/ra.py", line 480, in
svn_ra_check_path
    return apply(_ra.svn_ra_check_path, args)
SubversionException: ("PROPFIND request failed on
'/org.nuxeo.ecm.client/trunk/commandline'", 175002)
** unknown exception encountered, details follow
** report bug details to http://www.selenic.com/mercurial/bts
** or mercurial@selenic.com
** Mercurial Distributed SCM (version be015f9b7405)
Traceback (most recent call last):
  File "/home/jgoerzen/programs/hg-devel/hg", line 14, in ?
    mercurial.dispatch.run()
  File
"/home/jgoerzen/programs/hg-devel/build/lib.linux-i686-2.4/mercurial/dispatch.py",
line 20, in run
    sys.exit(dispatch(sys.argv[1:]))
  File
"/home/jgoerzen/programs/hg-devel/build/lib.linux-i686-2.4/mercurial/dispatch.py",
line 29, in dispatch
    return _runcatch(u, args)
  File
"/home/jgoerzen/programs/hg-devel/build/lib.linux-i686-2.4/mercurial/dispatch.py",
line 45, in _runcatch
    return _dispatch(ui, args)
  File
"/home/jgoerzen/programs/hg-devel/build/lib.linux-i686-2.4/mercurial/dispatch.py",
line 348, in _dispatch
    ret = _runcommand(ui, options, cmd, d)
  File
"/home/jgoerzen/programs/hg-devel/build/lib.linux-i686-2.4/mercurial/dispatch.py",
line 401, in _runcommand
    return checkargs()
  File
"/home/jgoerzen/programs/hg-devel/build/lib.linux-i686-2.4/mercurial/dispatch.py",
line 357, in checkargs
    return cmdfunc()
  File
"/home/jgoerzen/programs/hg-devel/build/lib.linux-i686-2.4/mercurial/dispatch.py",
line 342, in <lambda>
    d = lambda: func(ui, *args, **cmdoptions)
  File "/home/jgoerzen/no-backup/programs/hg-devel/hgext/convert/__init__.py",
line 398, in convert
    c.convert()
  File "/home/jgoerzen/no-backup/programs/hg-devel/hgext/convert/__init__.py",
line 265, in convert
    self.copy(c)
  File "/home/jgoerzen/no-backup/programs/hg-devel/hgext/convert/__init__.py",
line 209, in copy
    changes = self.source.getchanges(rev)
  File "/home/jgoerzen/no-backup/programs/hg-devel/hgext/convert/subversion.py",
line 213, in getchanges
    files, copies = self.expandpaths(rev, paths, parents)
  File "/home/jgoerzen/no-backup/programs/hg-devel/hgext/convert/subversion.py",
line 429, in expandpaths
    fromkind = svn.ra.check_path(self.ra, entrypath, fromrev)
  File "/var/lib/python-support/python2.4/libsvn/ra.py", line 480, in
svn_ra_check_path
    return apply(_ra.svn_ra_check_path, args)
libsvn._core.SubversionException: ("PROPFIND request failed on
'/org.nuxeo.ecm.client/trunk/commandline'", 175002)
msg4096 (view) Author: bos Date: 2007-10-10.07:19:52
I tried running the same command with a http scheme instead of https, and it
looked like it was beginning to work.

I've pushed a change that causes convert to print more useful backtraces if you
run with --traceback, so it's at least possible to debug a problem.  Since SVN's
APIs are so weak, and so many SVN/WebDAV installs are broken in weird ways, I
don't think there's a more generally palatable solution available without
investing a lot of effort, unfortunately.
msg4094 (view) Author: jgoerzen Date: 2007-10-10.00:17:05
I tried running it as:

hg convert https://svn.nuxeo.org/nuxeo/org.nuxeo.ecm.client/trunk nuxeo-client-hg

and got exactly the same exception at exactly the same place.

The help text for hg convert really leads me to believe that it wants a checked
out working copy for svn.  It would be good to make this explicit for sure.
msg4093 (view) Author: bos Date: 2007-10-09.22:20:18
Not a bug.  You need to pass the URL of the SVN branch to convert, not the path
of the local working copy.
msg4092 (view) Author: jgoerzen Date: 2007-10-09.21:29:03
Steps to reproduce:

svn co https://svn.nuxeo.org/nuxeo/org.nuxeo.ecm.client/trunk nuxeo-client
hg convert nuxeo-client

Produces:

assuming destination nuxeo-client-hg
initializing destination nuxeo-client-hg repository
scanning source...
sorting...
converting...
36 trunk creation
35 moved to cmd line clients project folders
34 renamed
** unknown exception encountered, details follow
** report bug details to http://www.selenic.com/mercurial/bts
** or mercurial@selenic.com
** Mercurial Distributed SCM (version 6f6aa7f3bc1c)
Traceback (most recent call last):
  File "/home/jgoerzen/programs/hg-devel/hg", line 14, in ?
    mercurial.dispatch.run()
  File
"/home/jgoerzen/programs/hg-devel/build/lib.linux-i686-2.4/mercurial/dispatch.py",
line 20, in run
    sys.exit(dispatch(sys.argv[1:]))
  File
"/home/jgoerzen/programs/hg-devel/build/lib.linux-i686-2.4/mercurial/dispatch.py",
line 29, in dispatch
    return _runcatch(u, args)
  File
"/home/jgoerzen/programs/hg-devel/build/lib.linux-i686-2.4/mercurial/dispatch.py",
line 45, in _runcatch
    return _dispatch(ui, args)
  File
"/home/jgoerzen/programs/hg-devel/build/lib.linux-i686-2.4/mercurial/dispatch.py",
line 348, in _dispatch
    ret = _runcommand(ui, options, cmd, d)
  File
"/home/jgoerzen/programs/hg-devel/build/lib.linux-i686-2.4/mercurial/dispatch.py",
line 401, in _runcommand
    return checkargs()
  File
"/home/jgoerzen/programs/hg-devel/build/lib.linux-i686-2.4/mercurial/dispatch.py",
line 357, in checkargs
    return cmdfunc()
  File
"/home/jgoerzen/programs/hg-devel/build/lib.linux-i686-2.4/mercurial/dispatch.py",
line 342, in <lambda>
    d = lambda: func(ui, *args, **cmdoptions)
  File
"/home/jgoerzen/programs/hg-devel/build/lib.linux-i686-2.4/mercurial/__init__.py",
line 473, in convert

  File
"/home/jgoerzen/programs/hg-devel/build/lib.linux-i686-2.4/mercurial/__init__.py",
line 257, in convert

  File
"/home/jgoerzen/programs/hg-devel/build/lib.linux-i686-2.4/mercurial/__init__.py",
line 202, in copy

  File "/home/jgoerzen/no-backup/programs/hg/hgext/convert/subversion.py", line
211, in getchanges
  File "/home/jgoerzen/no-backup/programs/hg/hgext/convert/subversion.py", line
422, in expandpaths
  File "/var/lib/python-support/python2.4/libsvn/ra.py", line 480, in
svn_ra_check_path
    return apply(_ra.svn_ra_check_path, args)
libsvn._core.SubversionException: ("PROPFIND request failed on
'/org.nuxeo.ecm.client/trunk/commandline'", 175002)
History
Date User Action Args
2008-03-10 07:51:02djcsetstatus: testing -> resolved
nosy: + djc
messages: + msg5529
2008-01-19 21:10:13pmezardsetnosy: Omnifarious, bos, pmezard, ThurnerRupert, sandeepss, jgoerzen, korpios, pitrou
assignedto: pmezard ->
2008-01-19 13:54:42pmezardsetstatus: chatting -> testing
nosy: Omnifarious, bos, pmezard, ThurnerRupert, sandeepss, jgoerzen, korpios, pitrou
messages: + msg4917
2008-01-19 12:03:42pmezardsetnosy: + ThurnerRupert
assignedto: pmezard
2008-01-09 20:19:04pitrousetnosy: + pitrou
messages: + msg4858
2008-01-05 16:14:50pmezardsetnosy: Omnifarious, bos, pmezard, sandeepss, jgoerzen, korpios
messages: + msg4824
2008-01-05 16:12:04pmezardlinkissue913 superseder
2008-01-04 07:47:37sandeepsssetnosy: + sandeepss
messages: + msg4812
2007-12-10 13:44:17pmezardsetnosy: + pmezard
messages: + msg4559
2007-10-21 05:03:31korpiossetnosy: + korpios
2007-10-15 19:29:47Omnifarioussettopic: + svn
nosy: Omnifarious, bos, jgoerzen
2007-10-15 19:25:10Omnifarioussetnosy: + Omnifarious
2007-10-10 21:06:30bossetstatus: testing -> chatting
nosy: bos, jgoerzen
messages: + msg4104
2007-10-10 13:58:31jgoerzensetnosy: bos, jgoerzen
messages: + msg4099
2007-10-10 13:57:01jgoerzensetnosy: bos, jgoerzen
messages: + msg4098
2007-10-10 13:55:17jgoerzensetnosy: bos, jgoerzen
messages: + msg4097
2007-10-10 07:19:53bossetstatus: chatting -> testing
nosy: bos, jgoerzen
messages: + msg4096
2007-10-10 00:17:06jgoerzensetstatus: resolved -> chatting
nosy: bos, jgoerzen
messages: + msg4094
2007-10-09 22:20:19bossetstatus: unread -> resolved
nosy: + bos
messages: + msg4093
2007-10-09 21:29:06jgoerzencreate