<...snip...> 964 963 * CHD-462: clarifying delete of REST keys - copied style from contact situations as it worked well 962 * Stable milestone svn: In file '/build/buildd/subversion-1.6.15dfsg~ppa/subversion/libsvn_ra/ra_loader.c' line 595: assertion failed (*path != '/') Repo that caused this: http://svn.webgroupmedia.com/cerb4/
I plan on taking a look at this.
Experienced same problem trying to convert a private Subversion repository. Modified hgext/convert/subversion.py to correct problem: added several additional places where .strip('/') needs to be called. In particular the assertion trigged at line 595 of ra_loader.c is called from if self.module != new_module: self.module = new_module self.reparent(self.module) io = StringIO() info = svn.ra.get_file(self.ra, file, revnum, io) ^^^^ Adding a strip call fixes this problem. Will submit a patch if I have time, but currently trying to finish this project.
@muppetwonder: good catch! Could you test the following patch on your repository: ========== diff -r 3cbb3c57a50e hgext/convert/subversion.py --- a/hgext/convert/subversion.py Fri Mar 11 15:48:44 2011 +0000 +++ b/hgext/convert/subversion.py Fri Mar 11 21:50:13 2011 +0100 @@ -866,7 +866,9 @@ pool = Pool() rpath = '/'.join([self.baseurl, urllib.quote(path)]).strip('/') entries = svn.client.ls(rpath, optrev(revnum), True, self.ctx, pool) - return ((path + '/' + p) for p, e in entries.iteritems() + if path: + path += '/' + return ((path + p) for p, e in entries.iteritems() if e.kind == svn.core.svn_node_file) def getrelpath(self, path, module=None): ========== and if it works, provide me with a proper name like Matt Mackall <mpm@selenic.com> so I could credit you for the analysis?
Hi Patrick, Thanks for the patch. It does appear to work. I didn't have time to let it get through the entire conversion process again as that would have taken more than 12 hours. Without the patch, it fails quite early in the process, like within 15 minutes. Thus, I am satisfied that this patch fixes the issue. Clinton Chau (clinton@clearcanvas.ca) On Fri, Mar 11, 2011 at 4:03 PM, <"Patrick Mézard < bugs@mercurial.selenic.com>"@mercurial.selenic.com> wrote: > > Patrick Mézard <pmezard@gmail.com> added the comment: > > @muppetwonder: good catch! Could you test the following patch on your > repository: > > ========== > diff -r 3cbb3c57a50e hgext/convert/subversion.py > --- a/hgext/convert/subversion.py Fri Mar 11 15:48:44 2011 +0000 > +++ b/hgext/convert/subversion.py Fri Mar 11 21:50:13 2011 +0100 > @@ -866,7 +866,9 @@ > pool = Pool() > rpath = '/'.join([self.baseurl, urllib.quote(path)]).strip('/') > entries = svn.client.ls(rpath, optrev(revnum), True, self.ctx, > pool) > - return ((path + '/' + p) for p, e in entries.iteritems() > + if path: > + path += '/' > + return ((path + p) for p, e in entries.iteritems() > if e.kind == svn.core.svn_node_file) > > def getrelpath(self, path, module=None): > ========== > > and if it works, provide me with a proper name like > > Matt Mackall <mpm@selenic.com> > > so I could credit you for the analysis? > > ---------- > assignedto: durin42 -> > nosy: +pmezard > > ____________________________________________________ > Mercurial issue tracker <bugs@mercurial.selenic.com> > <http://mercurial.selenic.com/bts/issue2647> > ____________________________________________________ >
Apologies if you are getting this twice. Gmail had problems parsing Patrick's email address. On Mon, Mar 14, 2011 at 12:06 PM, Clinton Chau <clinton@clearcanvas.ca>wrote: > Hi Patrick, > > Thanks for the patch. > > It does appear to work. I didn't have time to let it get through the entire > conversion process again as that would have taken more than 12 hours. > Without the patch, it fails quite early in the process, like within 15 > minutes. Thus, I am satisfied that this patch fixes the issue. > > Clinton Chau (clinton@clearcanvas.ca) > > > On Fri, Mar 11, 2011 at 4:03 PM, <"Patrick Mézard < > bugs@mercurial.selenic.com>"@mercurial.selenic.com> wrote: > >> >> Patrick Mézard <pmezard@gmail.com> added the comment: >> >> @muppetwonder: good catch! Could you test the following patch on your >> repository: >> >> ========== >> diff -r 3cbb3c57a50e hgext/convert/subversion.py >> --- a/hgext/convert/subversion.py Fri Mar 11 15:48:44 2011 +0000 >> +++ b/hgext/convert/subversion.py Fri Mar 11 21:50:13 2011 +0100 >> @@ -866,7 +866,9 @@ >> pool = Pool() >> rpath = '/'.join([self.baseurl, urllib.quote(path)]).strip('/') >> entries = svn.client.ls(rpath, optrev(revnum), True, self.ctx, >> pool) >> - return ((path + '/' + p) for p, e in entries.iteritems() >> + if path: >> + path += '/' >> + return ((path + p) for p, e in entries.iteritems() >> if e.kind == svn.core.svn_node_file) >> >> def getrelpath(self, path, module=None): >> ========== >> >> and if it works, provide me with a proper name like >> >> Matt Mackall <mpm@selenic.com> >> >> so I could credit you for the analysis? >> >> ---------- >> assignedto: durin42 -> >> nosy: +pmezard >> >> ____________________________________________________ >> Mercurial issue tracker <bugs@mercurial.selenic.com> >> <http://mercurial.selenic.com/bts/issue2647> >> ____________________________________________________ >> > > > > -- > ClearCanvas Inc. > 439 University Ave Suite 1920 > Toronto, ON M5G 1Y8 > clinton@clearcanvas.ca > www.clearcanvas.ca > <%2B1%20866%20584%205688> <%2B1%20866%20584%205688>+1 866 584 5688 (fax) > <%2B1%20647%20547%202987> <%2B1%20647%20547%202987>+1 647 547 2987 (bus) > >
In crew-stable: http://hg.intevation.org/mercurial/crew/rev/9777df929035
Fixed by http://selenic.com/repo/hg/rev/9777df929035 Patrick Mezard <pmezard@gmail.com> convert/svn: fix _iterfiles() output in root dir case (issue2647) (please test the fix)
--- Bug imported by bugzilla@serpentine.com 2012-05-12 09:17 EDT --- This bug was previously known as _bug_ 2647 at http://mercurial.selenic.com/bts/issue2647 Imported an attachment (id=1523) Imported an attachment (id=1524)