I have installed SubGit and successfully ran subgit configure and subgit install. I was able to view the source changes and history in our git repository.
We are using VisualSVN Server and Gitea. Subgit is configured for a local SVN repository.
After running the install command, I tested a new commit to SVN. The commit succeeded, but did not appear in the Git repository. The daemon log shows the following at the time of the commit:
[2023-01-31 13:52:35.882][daemon][17] svn: E204900: Ref refs/svn/map was unexpectedly updated by another process:
expected commit: f21f4e02ab52430117c55cb00a417ca375872465, actual commit: f21f4e02ab52430117c55cb00a417ca375872465
com.syntevo.svngitkit.core.b.i: svn: E204900: Ref refs/svn/map was unexpectedly updated by another process:
expected commit: f21f4e02ab52430117c55cb00a417ca375872465, actual commit: f21f4e02ab52430117c55cb00a417ca375872465
at com.syntevo.svngitkit.core.b.i.a(SourceFile:29)
at com.syntevo.svngitkit.core.c.C.b(SourceFile:745)
at com.syntevo.svngitkit.core.c.C.a(SourceFile:439)
at com.syntevo.svngitkit.core.c.C.a(SourceFile:398)
at com.syntevo.svngitkit.core.c.C.a(SourceFile:344)
at com.syntevo.svngitkit.core.c.C.a(SourceFile:170)
at com.syntevo.svngitkit.core.c.O.c(SourceFile:43)
at com.syntevo.svngitkit.core.c.O.b(SourceFile:36)
at org.tmatesoft.translator.k.aj.a(SourceFile:1465)
at org.tmatesoft.translator.k.aj.c(SourceFile:998)
at org.tmatesoft.translator.k.aj.a(SourceFile:1021)
at org.tmatesoft.translator.k.aj.b(SourceFile:1079)
at org.tmatesoft.translator.k.aj.a(SourceFile:683)
at org.tmatesoft.translator.k.aj.a(SourceFile:652)
at org.tmatesoft.translator.k.c.h.a(SourceFile:79)
at org.tmatesoft.translator.daemon.Y.run(SourceFile:259)
Caused by: org.tmatesoft.svn.core.SVNException: svn: E204900: Ref refs/svn/map was unexpectedly updated by another process:
expected commit: f21f4e02ab52430117c55cb00a417ca375872465, actual commit: f21f4e02ab52430117c55cb00a417ca375872465
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:91)
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:75)
at com.syntevo.svngitkit.core.internal.d.G.a(SourceFile:260)
at com.syntevo.svngitkit.core.internal.d.G.closeDir(SourceFile:132)
at org.tmatesoft.svn.core.internal.wc.SVNCancellableEditor.closeDir(SVNCancellableEditor.java:102)
at org.tmatesoft.svn.core.internal.io.fs.FSUpdateContext.updateEntry(FSUpdateContext.java:534)
at org.tmatesoft.svn.core.internal.io.fs.FSUpdateContext.diffDirs(FSUpdateContext.java:357)
at org.tmatesoft.svn.core.internal.io.fs.FSUpdateContext.drive(FSUpdateContext.java:310)
at org.tmatesoft.svn.core.internal.io.fs.FSRepository.finishReport(FSRepository.java:560)
at com.syntevo.svngitkit.core.internal.x.report(SourceFile:31)
at org.tmatesoft.svn.core.internal.io.fs.FSRepository.update(FSRepository.java:634)
at com.syntevo.svngitkit.core.c.C.a(SourceFile:1268)
at com.syntevo.svngitkit.core.c.C.a(SourceFile:1048)
at com.syntevo.svngitkit.core.c.C.a(SourceFile:789)
at com.syntevo.svngitkit.core.c.C.b(SourceFile:707)
... 14 more
Caused by: com.syntevo.svngitkit.core.b.i: Ref refs/svn/map was unexpectedly updated by another process:
expected commit: f21f4e02ab52430117c55cb00a417ca375872465, actual commit: f21f4e02ab52430117c55cb00a417ca375872465
at org.tmatesoft.translator.k.at.c(SourceFile:208)
at org.tmatesoft.translator.k.at.d(SourceFile:454)
at org.tmatesoft.translator.k.at.a(SourceFile:425)
at org.tmatesoft.translator.k.at.a(SourceFile:263)
at org.tmatesoft.translator.k.at.a(SourceFile:241)
at com.syntevo.svngitkit.core.internal.d.h.a(SourceFile:292)
at com.syntevo.svngitkit.core.internal.d.h.a(SourceFile:216)
at com.syntevo.svngitkit.core.internal.d.n.a(SourceFile:88)
at com.syntevo.svngitkit.core.internal.d.n.closeDir(SourceFile:281)
at com.syntevo.svngitkit.core.internal.d.A.closeDir(SourceFile:86)
at com.syntevo.svngitkit.core.internal.d.p.closeDir(SourceFile:115)
at com.syntevo.svngitkit.core.internal.d.G.closeDir(SourceFile:129)
... 25 more
I don’t know if it’s related but there are also numerous instances of this log event:
After posting this I found the instructions in the recovery section of the SubGit Book. I completed those steps and the new SVN commits were successfully translated to Git. However, immediately after attempting a fresh commit, SubGit fails again with the same error:
[2023-01-31 14:30:03.809][daemon][17] svn: E204900: Ref refs/svn/map was unexpectedly updated by another process:
expected commit: 5287b68329c159b51857f5dc7dc43ddd7e6d617f, actual commit: 5287b68329c159b51857f5dc7dc43ddd7e6d617f
com.syntevo.svngitkit.core.b.i: svn: E204900: Ref refs/svn/map was unexpectedly updated by another process:
expected commit: 5287b68329c159b51857f5dc7dc43ddd7e6d617f, actual commit: 5287b68329c159b51857f5dc7dc43ddd7e6d617f
at com.syntevo.svngitkit.core.b.i.a(SourceFile:29)
at com.syntevo.svngitkit.core.c.C.b(SourceFile:745)
at com.syntevo.svngitkit.core.c.C.a(SourceFile:439)
at com.syntevo.svngitkit.core.c.C.a(SourceFile:398)
at com.syntevo.svngitkit.core.c.C.a(SourceFile:344)
at com.syntevo.svngitkit.core.c.C.a(SourceFile:170)
at com.syntevo.svngitkit.core.c.O.c(SourceFile:43)
at com.syntevo.svngitkit.core.c.O.b(SourceFile:36)
at org.tmatesoft.translator.k.aj.a(SourceFile:1465)
at org.tmatesoft.translator.k.aj.c(SourceFile:998)
at org.tmatesoft.translator.k.aj.a(SourceFile:1021)
at org.tmatesoft.translator.k.aj.b(SourceFile:1079)
at org.tmatesoft.translator.k.aj.a(SourceFile:683)
at org.tmatesoft.translator.k.aj.a(SourceFile:652)
at org.tmatesoft.translator.k.c.h.a(SourceFile:79)
at org.tmatesoft.translator.daemon.Y.run(SourceFile:259)
Caused by: org.tmatesoft.svn.core.SVNException: svn: E204900: Ref refs/svn/map was unexpectedly updated by another process:
expected commit: 5287b68329c159b51857f5dc7dc43ddd7e6d617f, actual commit: 5287b68329c159b51857f5dc7dc43ddd7e6d617f
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:91)
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:75)
at com.syntevo.svngitkit.core.internal.d.G.a(SourceFile:260)
at com.syntevo.svngitkit.core.internal.d.G.closeDir(SourceFile:132)
at org.tmatesoft.svn.core.internal.wc.SVNCancellableEditor.closeDir(SVNCancellableEditor.java:102)
at org.tmatesoft.svn.core.internal.io.fs.FSUpdateContext.updateEntry(FSUpdateContext.java:534)
at org.tmatesoft.svn.core.internal.io.fs.FSUpdateContext.diffDirs(FSUpdateContext.java:357)
at org.tmatesoft.svn.core.internal.io.fs.FSUpdateContext.drive(FSUpdateContext.java:310)
at org.tmatesoft.svn.core.internal.io.fs.FSRepository.finishReport(FSRepository.java:560)
at com.syntevo.svngitkit.core.internal.x.report(SourceFile:31)
at org.tmatesoft.svn.core.internal.io.fs.FSRepository.update(FSRepository.java:634)
at com.syntevo.svngitkit.core.c.C.a(SourceFile:1268)
at com.syntevo.svngitkit.core.c.C.a(SourceFile:1048)
at com.syntevo.svngitkit.core.c.C.a(SourceFile:789)
at com.syntevo.svngitkit.core.c.C.b(SourceFile:707)
... 14 more
Caused by: com.syntevo.svngitkit.core.b.i: Ref refs/svn/map was unexpectedly updated by another process:
expected commit: 5287b68329c159b51857f5dc7dc43ddd7e6d617f, actual commit: 5287b68329c159b51857f5dc7dc43ddd7e6d617f
at org.tmatesoft.translator.k.at.c(SourceFile:208)
at org.tmatesoft.translator.k.at.d(SourceFile:454)
at org.tmatesoft.translator.k.at.a(SourceFile:425)
at org.tmatesoft.translator.k.at.a(SourceFile:263)
at org.tmatesoft.translator.k.at.a(SourceFile:241)
at com.syntevo.svngitkit.core.internal.d.h.a(SourceFile:292)
at com.syntevo.svngitkit.core.internal.d.h.a(SourceFile:216)
at com.syntevo.svngitkit.core.internal.d.n.a(SourceFile:88)
at com.syntevo.svngitkit.core.internal.d.n.closeDir(SourceFile:281)
at com.syntevo.svngitkit.core.internal.d.A.closeDir(SourceFile:86)
at com.syntevo.svngitkit.core.internal.d.p.closeDir(SourceFile:115)
at com.syntevo.svngitkit.core.internal.d.G.closeDir(SourceFile:129)
... 25 more
From the description and logs part is looks like there is another SubGit process (supposedly, another daemon) that serves the same repository, could it be the case here? As far as I know, Gitea should not touch the refs/svn/map reference, so it’s not completely clear what process could it be. Also, could you please describe your setup in a little more detail – namely, where is Gitea installed, on a real/virtual machine or in a docker container or in Kubernetes? Same for SubGit, where exactly is it installed – same machine where Gitea lives or in a separate machine or container? Is there any antivirus or any other similar software installed on Gitea/SubGit machine? Finally, could it be possible to share full SubGit logs, both daemon’s and hooks’ logs?
There was a point where I tested SubGit in the past, but it was uninstalled. I double checked that there are no extra installations of SubGit and verified no additional hooks are in place. The Gitea repositories were created yesterday.
VisualSVN and Gitea are both installed on the same server. No Docker or Kubernetes is involved. The SVN repositories are served by the Apache instance installed by VisualSVN and Gitea hosts its own internal web server. Externally, either repository is accessed via https. All of our projects are hosted in a single SVN repository.
We do have AVG Antivirus, but disabling it has no effect.
The repositories are located in D:\SVN and D:\Gitea, respectively. To install Subgit, I ran the following commands:
cd /D D:\SVN\Repository
subgit configure .
Then I made the necessary configuration changes in SubGit and ran
I’ve got another question, though: from the commands you mentioned it looks that you’ve configured a local mirror which is actually a deprecated mode that we don’t recommend for production use since it’s not being actively developed for years and is there only for backward compatibility. Could you please advise is this use of the local mirror mode is intentional? Would the recommended remote mirror mode also work for you?
Correct, it is intentionally a Local Mirror because Gitea, VisualSVN, and SubGit are all installed on the same server. I did not see anything in the documentation to indicate that Local Mirror should not be used, so it seemed like the best fit.
I will uninstall SubGit and try again with remote mirror mode.