3

The Scene

I'm trying to convert a Mercurial repository to SVN. (I don't plan to leave it in SVN forever. Please believe that I do need it in SVN. We'll eventually move this to Git, but not today.)

Commands

cd into Hg working copy.
hg convert --source-type hg  --dest-type svn . ..\svn_repo_output_dir\

Output

It aborts before it is complete with:

unexpected svn output:
abort: unable to cope with svn output

Does anyone know how I can find out what SVN output the "hg convert" command keeps dying on, so I can solve this problem?

Update (Debug Info Added)

With three new agruments (--verbose, --debug, --traceback), here is the command:

hg convert --verbose --debug --traceback --source-type hg  --dest-type svn . ..\svn_layout7\

And here is its failure output:

Committing transaction...
Committed revision 89.
running: svn propset hg:convert-rev 4e6d788ad9389d8b8740f1c69dd3b8c76afc9e29 --revprop "--revision=89"
svn: E165006: Repository has not been enabled to accept revision propchanges;
ask the administrator to create a pre-revprop-change hook
77 #2140: Fixed "APP_NOT_INSTALLED" error in case InDesign CS5.5 is installed
source: e634a2c46761335bc78a04d97908ef64792c1742
76 Merge
source: 1a6a7e9ae244ff9976a7d1b84ff9241ea76169d4
running: svn commit "--username=ALady" "--file=c:\users\my_username\appdata\local\temp\hg-convert-jvaadp" "--encoding=utf-8"
unexpected svn output:
run hg source post-conversion action
Traceback (most recent call last):
  File "mercurial\scmutil.pyo", line 165, in callcatch
  File "mercurial\dispatch.pyo", line 367, in _runcatchfunc
  File "mercurial\dispatch.pyo", line 1021, in _dispatch
  File "mercurial\dispatch.pyo", line 756, in runcommand
  File "mercurial\dispatch.pyo", line 1030, in _runcommand
  File "mercurial\dispatch.pyo", line 1018, in <lambda>
  File "mercurial\util.pyo", line 1670, in check
  File "hgext\convert\__init__.pyo", line 450, in convert
  File "hgext\convert\convcmd.pyo", line 616, in convert
  File "hgext\convert\convcmd.pyo", line 525, in convert
  File "hgext\convert\convcmd.pyo", line 492, in copy
  File "hgext\convert\subversion.pyo", line 1332, in putcommit
Abort: unable to cope with svn output
abort: unable to cope with svn output
Mister
  • 90
  • 1
  • 7
  • Does this answer your question? [Repository has not been enabled to accept revision propchanges; ask the administrator to create a pre-revprop-change hook](https://stackoverflow.com/questions/44240410/repository-has-not-been-enabled-to-accept-revision-propchanges-ask-the-administ) – StayOnTarget Jul 30 '21 at 16:40
  • No, it didn't, @StayOnTarget. But thanks. That propchange message shows for every commit, even commits that convert to SVN repository format just fine. And creating that hook makes the message go away, but the problem does not go away. I think the problem comes when we hit a Mercurial merge that TortoiseHg lists zero files changed in. So maybe "commit without any changed files" isn't something hg convert can turn into an SVN repository transaction/event/occurrence. – Mister Aug 09 '21 at 11:32
  • 1
    That's a good theory. You might try to make a tiny test repo which has a commit like that and see if that would reproduce the issue. That would also give you a sandbox to experiment with workarounds. (All I can think of would be to introduce some dummy file which always has a nominal change in those commits. If that worked, you could use histedit to introduce that into your real repo although doing that could be quite laborious depending on how many commits you had to "fix") – StayOnTarget Aug 09 '21 at 11:57
  • Actually, maybe even histedit wouldn't help there because I think it will not work on merge commits. – StayOnTarget Aug 09 '21 at 11:58

1 Answers1

1

This is not an exact solution but might help you get to one.

I found one report of a similar error where they recommended:

From hg help -v convert:

  -v --verbose           enable additional output
     --debug             enable debugging output

The following might help developers figuring out exactly where in the process it failed:

--traceback         always print a traceback on exception

These are good debugging tips for many circumstances, actually.

(You may want to try these options & add more info to the question if it appears to be relevant).

StayOnTarget
  • 11,743
  • 10
  • 52
  • 81
  • Thanks, @StayOnTarget. I've run the command with those three arguments added and updated this post with the output. – Mister Jul 29 '21 at 20:20