开发者

What is the best way to exclude a revision from trunk and then bring it back in later?

开发者 https://www.devze.com 2023-03-23 11:56 出处:网络
We use svn and have code that is supposed to go out in a few days, but there is one revision that we want to exclude from our build since we won\'t have time to fully QA it.What\'s the b开发者_开发知识

We use svn and have code that is supposed to go out in a few days, but there is one revision that we want to exclude from our build since we won't have time to fully QA it. What's the b开发者_开发知识库est way to exclude that revision from trunk?

Should we create a branch, with that revision in it, revert the changes of that revision in trunk, and then once the code goes out merge the revision from that branch back into trunk?


How are you indicating what goes into the build? Is it the whole tree in the repository, or are you using svn:externals or what?

If you're using svn:externals, then you can just apply a revision number to that component.

If you're checking out the whole tree, then you can back out the change until you've made the release. You don't need to save it on a branch, it's still there in the repository.

So

svn merge -c -<revision-no>

should back out the changes that made that particular revision. (You'll then need to commit).

If the revision affected more than just that component, then you can restrict the merge to just that component.

Then afterwards you do another 'merge' to reapply the change:

svn merge -c <revision-no>

(Notice the lack of '-' before the revision number).


You could just revert the changes from this revision and commit, that would still leave the old revision in but it would not be easily found later on.

What you suggest is IMHO the best way to proceed.

Create a branch or a tag to keep the changes and then revert on trunk. Later when you're ready to integrate the changes you just have to merge back the branch and recommit.

0

精彩评论

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

关注公众号