Can't use startrev with base of repository even when layout=single is used

Create issue
Issue #308 new
Gary Miller created an issue

I have a non standard svn repo where trunk doesn't exist but is instead root at /. Trying to do a clone from a startrev generates an error saying startrev can only be used with a single folder. I tried layout=single, assuming this would make / act like a single folder.

If there is another way to do this please let me know.

Comments (5)

  1. Dan Villiom Podlaski Christiansen

    I assume the repository in question isn't public?

    What likely happens is that hgsubversion detects that the repository is using standard layout, possibly in error. As you can see in the sources, we detect the layout by checking if either trunk, tags or branches exist at the last revision pulled.[1] The check for start revision is done afterwards.[2]

    Could you please check with 'svn ls $URL' if any of those three exist? If they do, you can override the heuristic by specifying '--config hgsubversion.layout=single' when cloning.


  2. Gary Miller reporter

    The SVN repo isn't public. I'm in a bit of a catch-22. All attempts at cloning the repo have so far failed, a full import generates a KeyError due to some funny branching.

    Yes, the repo does have a standard layout, but I'm not interested in importing those bits. The --config.hgsubversion.layout=single doesn't work. I've looked at the code, I'm not a Pythoner, but I guess layout is not being set by the time the code get to

    Thanks Gary

  3. Dan Villiom Podlaski Christiansen

    @millergarym Are you sure you used the correct option? Note that there's a space between '--config' and 'hgsubversion.layout=single'. You'll also need to use this option at the initial clone. You might also want to consider cloning just the 'trunk' — that's customary when doing single-directory clones.

    Anyway, it would be great if you could reproduce this with a public repository. (Or even better, a small test-case.)

    You should note that Yonggang Luo's fork is major overhaul of the hgsubversion internals, and although it might address the inability to do a full clone, it won't affect the issues you're having with single-directory clones. Considering the depth of the modifications, I'd hold off on using it for anything important until it's been through a review and integrated into the main repository.

  4. Log in to comment