How do I remove an SVN tag completely that contains spaces?

妖精的绣舞 提交于 2019-11-29 15:38:27
bahrep

You have to supply commit log message when you use svn rm to 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 :

PROJECT=myproject
svnrepo=svn+ssh://rubo77@myserver.de/var/svn-repos/$PROJECT
svn rm -m "Removed the tag" "$svnrepo/tags/version 3.6.2"

Beware that using svn rm will 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 svndumpfilter tool:

  1. Dump the repository using svnadmin dump /var/svn-repos/$PROJECT > /tmp/$PROJECT.dump
  2. Filter the repository history using svndumpfilter:

    svndumpfilter exclude "tags/version 3.6.2" --drop-empty-revs < /tmp/$PROJECT.dump > /tmp/filtered.dump 2>/tmp/filterlog.txt

  3. Look though the filterlog.txt to make sure that the history filtration has completed as expected.

  4. Create new empty repository using svnadmin create command.

  5. Load the filtered dump to the new repository using svnadmin load command. The repository will have the whole history but commits related to "tags/version 3.6.2" do not exist anymore.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!