Issue #403 new

Clone omits most files in svn repo

Greg Ward
created an issue

I'm cloning a small project with a short history: 1 directory, 16 files, 5 revisions. Shouldn't be too hard. But recent versions of hgsubversion only clone partial history: all revisions are present, but only 4 of the 16 files are in the hg repo.

Here's what the svn history looks like (slightly mangled to protect privacy):

$ svn log svn+ssh://svn@SERVER/dev-repository/PROJECT/trunk  | grep '^r'
r40755 | USER | 2013-07-17 11:15:16 -0400 (Wed, 17 Jul 2013) | 1 line
r40754 | USER | 2013-07-17 11:00:50 -0400 (Wed, 17 Jul 2013) | 1 line
r40753 | USER | 2013-07-17 10:58:13 -0400 (Wed, 17 Jul 2013) | 1 line
r40752 | USER | 2013-07-17 10:51:59 -0400 (Wed, 17 Jul 2013) | 1 line
r40751 | USER | 2013-07-17 10:19:55 -0400 (Wed, 17 Jul 2013) | 1 line

And here is the list of files according to svn:

$ svn ls -R svn+ssh://svn@SERVER/dev-repository/PROJECT/trunk
Makefile.routed
Makefile.sift
README
antisort.py
census.py
centrifuge.py
clude.py
covers.py
flipsort.py
orderPrefixes.pl
pfxset.py
selection-process.rst
sift.py
space.pl
tinypfx.pl
tools.py

Here's what cloning the svn project looks like:

$ hg --traceback clone svn+ssh://svn@SERVER/dev-repository/PROJECT/trunk ttt2
[r40751] USER: add project for SECRET MISSION
[r40752] USER: abduct from OLDPATH
[r40753] USER: abduct from OLDPATH
Marked branch default as closed.
[r40754] USER: abduct from OLDPATH
[r40755] USER: abduct from OLDPATH
Marked branch default as closed.
pulled 3 revisions
updating to branch default
4 files updated, 0 files merged, 0 files removed, 0 files unresolved

Good: it saw all 5 svn revisions. Bad: only 4 files!

Now here's what the new hg repo looks like:

$ cd ttt2
$ hg locate
Makefile.routed
Makefile.sift
README
centrifuge.py
$ find .hg/store/data -type f
.hg/store/data/centrifuge.py.i
.hg/store/data/_makefile.sift.i
.hg/store/data/_makefile.routed.i
.hg/store/data/_r_e_a_d_m_e.i

The other 12 files just aren't there.

Comments (2)

  1. Greg Ward reporter

    Bisection blames this changeset:

    The first bad revision is:
    changeset:   1032:328fd6ba21fb
    user:        David Schleimer <dschleimer@fb.com>
    date:        Wed Jun 05 12:51:53 2013 -0700
    summary:     svnmeta: remove unneeded special-case of single in update_branch_tag_map_for_rev
    

    Incidentally, cloning with a good hgsubversion is subtly different from cloning with a bad version:

    [r40751] USER: add project for SECRET MISSION
    [r40752] USER: abduct from OLDPATH
    [r40753] USER: abduct from OLDPATH
    [r40754] USER: abduct from OLDPATH
    [r40755] USER: abduct from OLDPATH
    pulled 5 revisions
    updating to branch default
    16 files updated, 0 files merged, 0 files removed, 0 files unresolved
    

    Note that the bad clone run included two occurrences of "Marked branch default as closed.". Not sure if that is a red herring or not.

  2. David Schleimer

    Does hg svn verify pass or fail when you run it in a busted repo?

    Can you share svn log --verbose output for that repo? Also, what version of subversion are you using, and which subversion binding?

    Apologies for not getting to this sooner, it just got pointed out to me today.

  3. Log in to comment