Issue converting mercurial repository to svn -
i trying convert mercurial (hg) repository subversion (svn). (the reason i'm using tool uses svnkit, , want run on data hg repo.)
so ran mercurial convert extension:
hg convert --dest-type svn mercurialrepo svnrepo it seems working correctly starts output:
initializing svn working copy 'svnrepo-wc' scanning source... sorting... converting... 4336 commit message 4335 other commit message up until point gives me message abort: svn exited status 1:
4175 commit message abort: svn exited status 1 any idea means and/or how solve it?
moreover looks though converted 160 revisions, when go svn working copy , svn log shows 35 revisions!
update: adding --debug , --traceback flags per djanssens' suggestion:
this last 1 went fine:
4302 removed file projectservice in ext source: afb26afbb72ba500fcb0b42c3c386540fbfa11fa converting: 34/4337 revisions (0.78%) getting files: historia4-web/src/main/webapp/meta-inf/maven/be.vlaanderen.awv.historia4/historia4-web/pom.properties 1/3 (33.33%) getting files: historia4-web/src/main/webapp/index.jsp 2/3 (66.67%) getting files: historia4-web/src/main/webapp/js/be/vlaanderen/awv/historia4/services/projectservice.js 3/3 (100.00%) running: 'svn' 'delete' 'historia4-web/src/main/webapp/js/be/vlaanderen/awv/historia4/services/projectservice.js' d historia4-web/src/main/webapp/js/be/vlaanderen/awv/historia4/services/projectservice.js running: 'svn' 'commit' '--username=schoovlo' '--file=/var/folders/q1/pxdczzk90xz28qdkk3r0krsw0000gn/t/hg-convert-svldzc' '--encoding=utf-8' sending historia4-web/src/main/webapp/meta-inf/maven/be.vlaanderen.awv.historia4/historia4-web/pom.properties sending historia4-web/src/main/webapp/index.jsp deleting historia4-web/src/main/webapp/js/be/vlaanderen/awv/historia4/services/projectservice.js transmitting file data .. committed revision 35. running: 'svn' 'propset' 'hg:convert-branch' 'histiv-8-projectdef' '--revprop' '--revision=35' property 'hg:convert-branch' set on repository revision 35 here started doing weird stuff:
4301 histiv-8-projectdef afgerond source: 55f79e40185fe81420008da5489e5736bb938818 converting: 35/4337 revisions (0.81%) running: 'svn' 'commit' '--username=schoovlo' '--file=/var/folders/q1/pxdczzk90xz28qdkk3r0krsw0000gn/t/hg-convert-vbovih' '--encoding=utf-8' 4300 histiv-8 merged default source: dc46a9b84cebf41cd1cc1a771678a14c2cbce780 converting: 36/4337 revisions (0.83%) and @ end get:
4175 wat wijzigingen en optimalisaties source: efd1149f1f767e2f3afff2bc1f5573041c446b5f converting: 161/4337 revisions (3.71%) getting files: historia2-data-import/src/main/java/be/vlaanderen/awv/etl/common/transformers/cachedlookuptransformer.groovy 1/2 (50.00%) getting files: historia2-data-import/src/main/java/be/vlaanderen/awv/etl/common/transformers/sourcedestcolumnmapper.java 2/2 (100.00%) running: 'svn' 'delete' 'historia2-data-import/src/main/java/be/vlaanderen/awv/etl/common/transformers/cachedlookuptransformer.groovy' 'historia2-data-import/src/main/java/be/vlaanderen/awv/etl/common/transformers/sourcedestcolumnmapper.java' svn: e155007: '/users/quinten/desktop/experiment/test_selection_qmino/qmino/clonesvn/clonesvn-wc/historia2-data-import/src/main/java/be/vlaanderen/awv/etl/common/transformers/cachedlookuptransformer.groovy' not working copy run hg source post-conversion action traceback (most recent call last): file "/library/python/2.7/site-packages/mercurial/dispatch.py", line 138, in _runcatch return _dispatch(req) file "/library/python/2.7/site-packages/mercurial/dispatch.py", line 819, in _dispatch cmdpats, cmdoptions) file "/library/python/2.7/site-packages/mercurial/dispatch.py", line 599, in runcommand ret = _runcommand(ui, options, cmd, d) file "/library/python/2.7/site-packages/mercurial/dispatch.py", line 910, in _runcommand return checkargs() file "/library/python/2.7/site-packages/mercurial/dispatch.py", line 881, in checkargs return cmdfunc() file "/library/python/2.7/site-packages/mercurial/dispatch.py", line 816, in <lambda> d = lambda: util.checksignature(func)(ui, *args, **cmdoptions) file "/library/python/2.7/site-packages/mercurial/util.py", line 518, in check return func(*args, **kwargs) file "/library/python/2.7/site-packages/hgext/convert/__init__.py", line 283, in convert return convcmd.convert(ui, src, dest, revmapfile, **opts) file "/library/python/2.7/site-packages/hgext/convert/convcmd.py", line 527, in convert c.convert(sortmode) file "/library/python/2.7/site-packages/hgext/convert/convcmd.py", line 444, in convert self.copy(c) file "/library/python/2.7/site-packages/hgext/convert/convcmd.py", line 412, in copy source, self.map) file "/library/python/2.7/site-packages/hgext/convert/subversion.py", line 1257, in putcommit self.xargs(self.delete, 'delete') file "/library/python/2.7/site-packages/hgext/convert/common.py", line 386, in xargs self.run0(cmd, *(list(args) + l), **kwargs) file "/library/python/2.7/site-packages/hgext/convert/common.py", line 341, in run0 self.checkexit(status, output) file "/library/python/2.7/site-packages/hgext/convert/common.py", line 337, in checkexit raise util.abort('%s %s' % (self.command, msg)) abort: svn exited status 1 abort: svn exited status 1 so apparently doesn't *.groovy files. next move exclude problematic files using filemap option:
hg convert --debug --traceback --filemap filemap --dest-type svn . clonesvn with filemap file containing:
exclude whateverfileismakingtheproblem but same problem occurs little ways down road different file.
the way see now, problem @ point there revisions in file x deleted. there problem earlier, when converter reason skipped revison in file x added. svn complaining we're deleting isn't there deleted in first place.
i'm not mercurial expert in way, i'll suggest (own) observations , ideas
- you can|have use
revmapadditional parameter on conversion
revmap a simple text file maps each source commit id destination id each revision
in ideal conversion case (full conversion, no errors) left column on revmap-file identical to
hg log -t "{node}\n" -r : parts of revmap , log of src-repo
2c96d0cff382e13bb39d1b064ed098cbab230142 svn:d4a602fb-2afa-8b43-af74-725bfcbd86c9@1 3f05a3b07a29e8772e22cca847ce07e461d972f5 svn:d4a602fb-2afa-8b43-af74-725bfcbd86c9@2 696aa5701fd7822fec76cc1b7b203ad1772e38c8 svn:d4a602fb-2afa-8b43-af74-725bfcbd86c9@3 2f09429039a6d062d8135f652bbcb8be7a798443 svn:d4a602fb-2afa-8b43-af74-725bfcbd86c9@4 97419f57d7db28ace15066df7fb7ec7692536a30 svn:d4a602fb-2afa-8b43-af74-725bfcbd86c9@5 2c96d0cff382e13bb39d1b064ed098cbab230142 3f05a3b07a29e8772e22cca847ce07e461d972f5 696aa5701fd7822fec76cc1b7b203ad1772e38c8 2f09429039a6d062d8135f652bbcb8be7a798443 97419f57d7db28ace15066df7fb7ec7692536a30 in your case trimmed @ first "bad" changeset, in revmap (comparing log) you'll able find skipped earlier changesets
convert extension can convert part of repo (
-rparameter) and, if in sequential usagehg convert --dest-type svn src dst revmap -r n
dst , revmap aren't changed, convert perform incremental conversion , >> additional conversions revmap instead of overwriting @ each step. i.e converted 40-changesets src single hg convert --dest-type svn src dst revmap or hg convert --dest-type svn src dst revmap -r (10|20|30|40) , got identical dsts result. way can try convert problematic (identified skipped @ step 1) revisions without redoing work (convert -r $skipped-1 once , -r $skipped lot times later). maybe you'll fill bug-report such "skippable" changesets mercurial devs result of research (as last resort) , able change @ side
- if task isn't preparing convert's oddities, getting result (usable svn-repo), can think "conversion" svn
hgsubversion, pushing svn-repository (create empty svn-repo, publish any access-protocol exceptfile:///, push repo /probably-f, if "repositories unrelated"/)
Comments
Post a Comment