简体   繁体   中英

Merging users' history in SVN

有什么方法可以将两个用户的历史记录合并到SVN中的一个用户中?

You can change the author of a revision with this command:

svn propset --revprop -r <revision number> svn:author <username>

You will just have to extract which revisions were made by one author in order to rename them.

The hook script of your repository have to allow author renaming though (namely pre-revprop-change ).

Try using svnadmin to dump the repository to a text file, use some text tool to replace the one author for the other. Then use svnadmin to load the file into a new repository.

You'll need to dump the svn repository to a dump file, modify it, then load it to create a new repository. The tool to use for the modification would most likely be svndumptool ; IIRC, you should be able to use the 'transform-revprop' functionality to change author names.

Now, the subversion dumpfile may look like a text file, but it isn't quite. It has length specifiers embedded in it and such-like, so you can modify it by hand to some extent, but you have to be very careful about it.

Disclaimer: I have contributed to svndumptool in the past

On the other hand, RedGlyph's approach may be simpler.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM