History lost in svn conversion

Hans Meine meine at informatik.uni-hamburg.de
Tue Jul 14 03:54:00 CDT 2009


On Monday 13 July 2009 23:57:13 Neil Curzon wrote:
> I've recently been trying to convert my project from subversion to
> mercurial. The convert extension seems to be working mostly fine. The only
> issue I have is that file history is sometimes lost. The thing is that
> usually with commits that move a small number of files, history is tracked
> across the moves (verified by moving to various points in the earlier
> history). I have one commit of about 250 changed files, many of those
> moves, that the history is lost for. I am remembering to use hg log
> --follow.
>
> I've tried using MQ to go back to that commit, roll it out with qdelete -k,
> apply the patch via patch command, explicitly marking all moves with hg mv
> -A oldname newname, and reapplying all changes. Unfortunately, this didn't
> seem to solve the problem: file history still disappeared at the large
> commit.
>
> In the source subversion repository, svn log <file> produces a correct
> history, across the large commit to the beginning.

I have had similar problems in the past with repositories that retroactively 
moved stuff into the /trunk /branches etc. layout.  See e.g.

http://selenic.com/pipermail/mercurial/2008-June/019687.html
http://www.ultraviolet.org/mail-archives/mercurial.2009/msg00382.html

So you might want to try
  hg convert --config convert.svn.trunk=""
or Bill Barry's suggestion to use svnadmin (which I did not try yet).

HTH,
  Hans


More information about the Mercurial mailing list