Change SVN commit message retroactively?

前端 未结 6 1148
忘了有多久
忘了有多久 2020-12-22 22:36

I would like to re-write a big number of SVN commit messages to a different structure, e.g. prefix a category. From:

\"foo\" now accepts \"bar\" format for con

6条回答
  •  天命终不由人
    2020-12-22 23:04

    You can certainly change log messages retroactively, it's covered in the FAQ. I'm not sure how the command line interface for VisualSVN works, but for vanilla svn the command would be

    svn propset -r N --revprop svn:log "new log message" URL
    

    If you want to do this for all revisions without dumping the repository and re-loading, you could script this command to work on a list of all revisions. It would take some time to do this way, depending on the size of your repository, but in principle there's no reason you can't do it, and it does not involve a dump and reload.

    Also, vanilla SVN has a command svnlook which is sort of an administrative tool that works directly with the repository files. That tool doesn't understand URLs (you must have filesystem-level access to the repository), but is much faster. The syntax is a little different, but you can modify properties in the same way using that tool.

提交回复
热议问题