简体   繁体   中英

Subversion: How do you get back a commit which was reverse-merged out of a branch?

We have a SVN repository, and were attempting to create a release branch off of trunk . We created the branch, then did a reverse merge of the commits in trunk which were not yet ready to be released.

This worked fine for that release, but now some of those commits have been approved and we're ready to bring them back into the release branch. However, SVN doesn't see them as being mergable, and when we try to force it nothing happens.

This appears to be intended behavior (or at least known behavior), based on this SVN 1.5 document , which says that

[There will be no mergeinfo if] reverse merging a change from a path's own history. This is the common use case where merge is used to revert a committed change. This works, but mergeinfo is not updated because the current mergeinfo design has no way to explicitly record reverse merges.

So, given that that was written for 1.5, and we're currently on SVN 1.8... is there any way to make this work? How can I merge back a commit which was reverse-merged out of a branch? Can I manually create the mergeinfo property to enable it? Is there a way to force it? Or is this branch hosed and we should handle it differently?

You should've used blocking changes instead of reverse merges. I guess that SVNBook | Blocking Changes section should help.

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