开发者

Altering Revision History with SVN

Some files in my source repository at work were moved around. Rather than performing a "svn mv $file" operation, the files were moved using "svn rm $old_location/$file" and "SVN add $new_location/$file".

Most of the files are named the same, but are now in differen开发者_运维问答t directories. Is there a way to add back the revision history using SVN? I have a map of the old file locations to the new file locations, so it would be nice if I could write a script to do this.


Use svnadmin to dump your repository until the revision, in this example 3500, before these unwanted moves took place. Delete the repository and reload the dump file.

svnadmin dump RepositoryURL -r0:3500 > svn.dump
rm URL
svnadmin load RepositoryURL < svn.dump


could also do the above with dumpfilter option.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜