0

This is a followup question from Sync svn and mercurial repo

The solution worked nicely, however what we want to do is to break up a tree by cloning a number of specific folders to a mercurial repo so we modified the command to

hg clone https://username@serverAddress/svn/MainRepo/SubFolder/Folder/ --insecure

This gives us a

error: [SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:661)

Any help?

Thanks for reading

Community
  • 1
  • 1
Bernard
  • 995
  • 2
  • 9
  • 20
  • The ssl unknown protocol was due to having an invalid proxy config in mercurial.ini file. However we still need to be able to select a specific folder to clone – Bernard Mar 13 '17 at 15:10
  • Can you confirm that the exact same command without the subfolder, i.e. `hg clone https://username@serverAddress/svn/MainRepo/ --insecure`, works properly now? Please update your question to show what actually happens now. – alexis Mar 13 '17 at 15:10

1 Answers1

1

Mercurial's design is incompatible with partial checkouts. I haven't looked at the hgsubversion internals, but I would expect support for partial checkouts to be neither easy nor a priority to implement. Note also that the official hgsubversion wiki states:

Right now, you can only clone repositories that use a more-or-less standard Subversion layout. That is, the default location where work is done is called trunk, branches are located in a sibling of that directory called branches. Tags are expected to be another sibling of trunk called tags, but that is configurable.

Again this suggests that cloning a subdirectory will probably violate these assumptions, since the subdirectory has no trunk and branches subfolders.

As a work-around, consider doing a full checkout and then splitting it up into subrepos (keeping the history), as shown in this question. If you want to continue two-way synchronization with svn, this will require you to do it in two steps, first importing all changes from the subrepos into the hg mirror and then pushing these to svn.

Community
  • 1
  • 1
alexis
  • 48,685
  • 16
  • 101
  • 161