I am in the process of doing a complex migration of 3 SVN repositories into 1 new one with a different structure.
I have just discovered that two of the repositories have thousands of blank commits "This is an empty revision for padding." all against the root and all without any author information. Unbelievable.
svnfiltereddump falls over on these commits because it needs an svn:author so I need a technique to get round this problem.
I'm wondering if I can use
svndumptool.py transform-revprop svn:author SOMETHING gareth.hughes input.dump utput.dump
but I can't figure out what the regular expression would be to match only an empty author field.
Otherwise I'm looking for ways to add an svn:author into about 8000 commits in a repository, not sequential. Or, a tool that can filter them out of a dump, after all they are all junk.
Many thanks
and the answer is that normal svndumpfilter worked
svndumpfilter --drop-empty-revs --renumber-revs include /somepath
but then further errors occurred and I found the incredibly useful
./svndumpfilter3 --untangle=/path/to/repo /somepath
could cope with those errors.
Good news is that you can handle this before you do your dump and load instead of trying to handle the issue during the dump and load process. The svn:author
revision property contains the author who committed that revision. Since this is a revision property you can change this without having to create a new revision in your Subversion repository. Just do this:
$ svn propset --revprop -r$rev svn:author $default_author $repository_url
on each revision that doesn't have an author. You can easily do this:
$ svn log -r1:LAST $repository_url
to get a list of all log entries in your revision. If you find a revision without an author, you can then set the svn:author
revision property on that URL. I don't even believe you need a working directory in order to do this.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.