I try to migrate our Subversion repository to git repository with your SubGit tool but only on 1 of my 19 subversion repositories got an error during configuration like:
error: svn: E160013: File not found: revision 33198, path ‘/deepblue-common/branches/DataImportV2/deepblue-common-jsweet’
error: svn: E160013: ‘/svn/DeepBlue/!svn/bc/33198’ path not found: 404 Not Found (https://srv-vitsigmalnk.vitechnology.net)
error: Unexpected error has occurred; please report along with the logs (‘D:\home\subgit-configure-20190820-171417.zip’)
error: to http://issues.tmatesoft.com/, thank you!
These errors indicate that the SVN server was responding but for some reason wasn’t able to find the resource the addon requested for. Actually, the import ran smoothly until the revision 33198 that indicates that the problem most probably is on the SVN side. To check it try to checkout the repository at that revision:
Most probably this command will also fail with the same or similar error.
Another way to check the SVN repository is to verify it locally:
svnadmin verify <path to SVN repository>
This command should show repository problems.
The best way to overcome this issue to resolve the problem in the SVN repository. As a workaround, the mapping configuration can be created manually, without invoking “subgit configure” with “layout auto” option. Let me know if you need any assistance creating the configuration, I’d be glad to help you with that.
However, the issue will definitely appear again on the initial import stage if it isn’t resolved in SVN repository. A possible workaround is to omit this problematic revision setting minimal revision to a revision higher than 33198:
I get all trunk, tags and branches… so I don’t have enought disk space!
Otherwise, can I use subgit configure with layout std or I must specify trunk/tags/branches localization manually? And in the second case, can you help me with a example?
In another test, I were be able to make a bare git repository of this specific svn repository by using TortoiseGit without any problem… what the difference and why it is different? Can I use/merge this bare repository with my failed SubGit repository after creating the configuration?
The ‘verify’ method could also be useful to find out the cause.
It’s hard to tell for sure what is different between TortoiseGit attempt and this one without knowing the details about TortoiseGit setup. My assumption is that the branch ‘DataImportV2’ might be omitted in that attempt and the file just wasn’t requested because of that. As for the merge: it is technically possible to merge, but at this stage, there is nothing in SubGit repository as the ‘configure’ command only prepares a repository for import, but doesn’t import actual data.
The ‘subgit configure’ command with ‘layout std’ option creates a mapping configuration for standard SVN layout with ‘trunk’, ‘branches’ and ‘tags’ SVN directories. If that layout matches your repository actual layout, then it can be left as is. Otherwise, it will require manual adjusting to reflect the actual SVN repository layout. Here are examples for some frequently met cases:
Thank a lot.
The command subgit configure --layout std has worked. And now, I have launch the subgit install but how I can be sure that problem don’t come again?
In same time, how does synchronization between SVN and GIT work? With daemon? Configure by subgit install? How does it start? When?
I’m afraid the problem will happen again as it’s still present in the repository. The ‘subgit install’ will start working but will fail at the same revision with the same error. So either this error should be resolved in SVN prior to the import, or it should be eliminated, either by excluding that revision (using svn.minimalRevision setting) or by excluding the ‘DataImportV2’ branch using svn.excludeBranches setting:
The SVN-to-Git mirroring relies on two parts: SubGit daemon and hooks. The daemon starts with ‘subgit install’ and 'subgit ‘fetch’ commands and it actually does the work translating data between Git and SVN. By default, daemon check SVN for changes every 60 seconds (it can be changes by svn.fetchInterval setting) and if it finds any changes, then it imports them to Git. Hooks work when a push comes to a mirrored SubGit repository: when somebody pushes to a mirrored repository, the pre-receive hook conencts to the daemon (or starts it if the daemon is not running), the daemon then check if there are any changes in SVN, if none found, it translates newly pushed changes to SVN and finally writes them to the Git repository.
The daemon can be started by ‘install’ and ‘fetch’ commands explicitly and by the hooks implicitly when a push comes. Note, that the daemon doesn’t start automatically after the OS reboot unless ‘install’ or ‘fetch’ command is scheduled on startup.
The subgit install has run with success…
So the next step is to create a local repository on my desktop from the remote git repository but after check, only tags are present… No branches found!!!
I have use subgit configure --layout auto or subgit configure --layout std because all SVN repositories are build with standard things like :
<svn_repo>
|--trunk
|--tags
|--branches
So why branches are not present under git repository? Which command to get branches on git repository?
with the standard layout, all the branches should have been imported, so it requires a deeper investigation to find out why they didn’t. May we have the ‘subgit install’ log for analysis?