We have SubGit running within a GitLab managed repository, syncing with our SVN repo. Somehow the sync stopped working and we get errors in the pre-receive hook:
[2023-05-23 09:03:26.274][pre-receive] Received '(message (39:Fetching revisions from SVN repository: ))'.
[2023-05-23 09:03:26.316][pre-receive] Received '(message (12: up to date ))'.
[2023-05-23 09:03:26.316][pre-receive] Received '(message (34:Sending commits to SVN repository: ))'.
[2023-05-23 09:03:26.807][pre-receive] Received '(warning (120:Failed to push some refs to Subversion repository because they are out of date.
Run
$ git pull --rebase
and try again.
))'.
[2023-05-23 09:03:26.807][pre-receive] No error report file found.
[2023-05-23 09:03:26.807][pre-receive] Failed to push some refs to Subversion repository because they are out of date.
Run
$ git pull --rebase
and try again.
[2023-05-23 09:03:26.807][pre-receive] at hook_execute (hook.c:288)
[2023-05-23 09:03:26.807][pre-receive] at internal_pre_receive (pre-receive.c:235)
[2023-05-23 09:03:26.807][pre-receive]
Enumerating objects: 114, done.
Counting objects: 100% (114/114), done.
Delta compression using up to 16 threads
Compressing objects: 100% (54/54), done.
Writing objects: 100% (67/67), 5.76 KiB | 2.88 MiB/s, done.
Total 67 (delta 43), reused 19 (delta 5), pack-reused 0
remote: Fetching revisions from SVN repository:
remote: up to date
remote: Sending commits to SVN repository:
remote:
remote: SubGit ERROR REPORT (SubGit version 3.3.17 ('Bobique') build #4455):
remote:
remote: You've received this message because SubGit (http://subgit.com/) is installed in your repository
remote: and an error that needs to be dealt with has occurred in SubGit translation engine.
remote:
remote: Failed to push some refs to Subversion repository because they are out of date.
remote: Run
remote: $ git pull --rebase
remote: and try again.
remote:
To ssh://gitlab.domain.com:2224/repo.git
! [remote rejected] features/XXXX-8614 -> features/XXXX-8614 (pre-receive hook declined)
error: failed to push some refs to 'ssh://gitlab.domain.com:2224/repo.git'
Trying to run git pull --rebase
does not fix the issue as the problem is not with Git but with the missing changes from SVN.
We already ran subgit install
in hopes that this might fix the issue, but unfortunately SubGit does not recognize the commits in the SVN repo, not being part of the Git repo.
$ subgit verify .
SubGit version 3.3.17 ('Bobique') build #4455
(c) TMate Software 2012-2021 (http://subgit.com/)
Verifying repository at '/var/opt/gitlab/git-data/repositories/@hashed/85/da/85daaf6f7055cd5736287faed9603d712920092c4f8fd0097ec3b650bf27530e.git'.
Subversion revisions verified: 170628
Mirror is operating normally.
VERIFICATION SUCCESSFUL
$ subgit fetch .
SubGit version 3.3.17 ('Bobique') build #4455
Fetching revisions from SVN repository:
up to date
Sync completed successfully
Please let me know if you need any further information from my side.
Thank you.