I tried to clean up the svn repository and remove a tag that contains a space, so all tags and branches are git conform:
PROJECT=myproject
svnrepo=svn+ssh://[email protected]/var/svn-repos/$PROJECT
svn rm "$svnrepo/tags/version 3.6.2"
but it seems, that doesn't do the job here: How do I convert an svn repo to git using reposurgeon?
How do I remove it entirely?
You have to supply commit log message when you use
svn rmto delete the file in remote repository. When doing delete, rename, copy etc via URL, the action results into immediate commit, i.e. new revision in SVN repository which log message is required.So the command should be :
Beware that using
svn rmwill not remove the tag completely. The revision where this tag was created will still exist in repository history.The only option to remove the path completely is to filter the repository history with
svndumpfiltertool:svnadmin dump /var/svn-repos/$PROJECT > /tmp/$PROJECT.dumpFilter the repository history using
svndumpfilter:svndumpfilter exclude "tags/version 3.6.2" --drop-empty-revs < /tmp/$PROJECT.dump > /tmp/filtered.dump 2>/tmp/filterlog.txtLook though the
filterlog.txtto make sure that the history filtration has completed as expected.Create new empty repository using
svnadmin createcommand.Load the filtered dump to the new repository using
svnadmin loadcommand. The repository will have the whole history but commits related to "tags/version 3.6.2" do not exist anymore.