5

something that shouldn't happen, happened to me today. We were working on a feature branch in svn (Server afaik 1.6, client 1.7). This branch was reintegrated yesterday, while i was not in the office. Now i'm left with some local changes in my working copy, pointing to the already reintegrated branch. Of course its partially my fault of leaving changes locally after work, but thats another story ;-)

I know that reintegrating the branch again is not an option, so What are the best ways to bring my changes into the trunk? A Coworker suggested using patches, which i never used before. I also thought about cherry picking my changes, after commiting them into the branch, but i'm not sure if this would work. Are there any other options?

Any help is greatly appreciated.

Best regards Nico

4

2 回答 2

4

After reintegration, the branch and the trunk should be identical (let's say the head revision is at 100). So, you could just commit your changes in the feature branch (creating rev 101), and merge to the trunk the feature branch from 100 (exclusive) to 101 (inclusive). Then delete the feature branch.

于 2011-12-15T11:16:43.940 回答
1

Create a new branch for your features and switch (as in svn switch) the uncommitted working copy to it. Test, commit, and then merge into trunk.

于 2011-12-15T11:17:33.113 回答