Tags in SVN do not mirror to Git, Tags in Git do not mirror to SVN

Hi guys,

We have a custom tagging script that creates tags on SVN in a specific fashion.
The tags are organized in a standardized fashion such as: tags/{project}/{program}/Beta/1.0.0001
In the subgit config file, we have the following mapping created:
tags = tags/{project}/{program}/:refs/tags/{project}/{program}/

We have a collection of tags in the subdirectories of he defined SVN source, yet these tags do not appear in the equivalent Git repository. In addition, whenever tags are created on the Git-side, those do not mirror to SVN either.

Thank you for your assistance in advance.

Hi Shane,

thank you for reaching out to us on that matter!

If tags are organised like tags/{project}/{program}/Beta/1.0.0001 then the mapping

tags = tags/{project}/{program}/:refs/tags/{project}/{program}/

does not seem to be correct, for this structure mapping should be set like this:

tags = tags/{project}/{program}/Beta/*:refs/tags/{project}/{program}/Beta/*

or

tags = tags/{project}/{program}/*/*:refs/tags/{project}/{program}/*/*

if Beta part can also be changed. Additionally, it’s not clear if that mapping has been applied – SubGit does not apply changes in the configuration file automatically, it requires subgit install or subgit fetch command to be invoked to evaluate and apply the configuration changes.

Ok I will give this a try, thank you!

We implemented the new tag mapping definition and removed the previous mappings in our configuration and restarted subgit.

Feb 01 11:14:58 pmsi-Ubuntu18LTS daemon_startup.sh[683]: INSTALLATION FAILED
Feb 01 11:14:58 pmsi-Ubuntu18LTS daemon_startup.sh[683]: error: Unable to activate configuration file '/var/opt/gitlab/git-data/repositories/@hashed/ae/a9/aea92132c4cbeb263e6ac2bf6c183b5d81737f179f21efdc5
Feb 01 11:14:58 pmsi-Ubuntu18LTS daemon_startup.sh[683]: error: The following new mappings have been removed from [svn] section:
Feb 01 11:14:58 pmsi-Ubuntu18LTS daemon_startup.sh[683]: error: tags/NOAH/Editors/Beta/:refs/tags/
Feb 01 11:14:58 pmsi-Ubuntu18LTS daemon_startup.sh[683]: error: tags/1.0.1/trunk:refs/tags/1.0.1/trunk
Feb 01 11:14:58 pmsi-Ubuntu18LTS daemon_startup.sh[683]: error: tags/REF/Ver108/Beta/1.00:refs/tags/REF/Ver108/Beta/1.00
Feb 01 11:14:58 pmsi-Ubuntu18LTS daemon_startup.sh[683]: error: tags/REF/Ver108/Beta/trunk:refs/tags/REF/Ver108/Beta/trunk
Feb 01 11:14:58 pmsi-Ubuntu18LTS daemon_startup.sh[683]: error: tags/REF/Ver108/:refs/tags/REF/Ver108/
Feb 01 11:14:58 pmsi-Ubuntu18LTS daemon_startup.sh[683]: error: Only branches that are not yet present in Subversion history could be removed.
Feb 01 11:14:58 pmsi-Ubuntu18LTS daemon_startup.sh[683]: error: Revert these deletions and run ‘install’ command, or force rebuild with ‘–rebuild’ option.

We removed the previous mappings we had but now when subgit starts up this happens. Is there a way to migrate these previous tags from the incorrect mappings or must we rebuild?

Hi Shane,

I’m afraid that removing a mapping that maps an existing SVN entity cannot be applied on the fly and SubGit indeed needs to rebuild the repository: such changes affect the final Git repository state and SHAs, so the rebuild is the most safe way to apply such change. So if the old mapping is to be removed, then I suppose rebuild would be the best way to do it.