开发者

How to fix version of project in SVN working history?

I work on project, which may contains several version to several clients. I.e. 2.65 - version for client 1, and 2.67 - version for client 2; generally, differences between 2.65 and 2.67 really small - and due this, it's no nee开发者_JS百科d in several branches for each client. All what I need - fix version in working history and, if need in future, checkout espessially selected version (i.e. checkout 2.65 version when working copy is 3.4 - and add some changes for corresponding client).

I use VisualSVN on server and TortoiseSVN in client. thx)


What is the problem with using a branch for every client, apply the needed changes to each branch and then create a new tag for each branch?

Example:

Currently branch client1 has the tag '2.65' and branch client2 has the tag '2.67'.
Now you do some fixes on trunk and want to pass them back to branch client1 only since client2 doesn't have the feature where the fix was applied.

Merge the changes from trunk to branch client1, create a new tag 'whatever' and give this new labeled version to the customer.

BTW: TortoiseSVN has an integrated Merge functionality that I never got working (maybe didn't understand it). Using Git in another project showed me that an intelligent (automatic) merging could really work...


You are describing one of the prototypical use cases for branches. Seriously.

However, I guess that you are discarding branches because porting changes across branches is a difficult and time consuming task. It's slow and you have to fix conflicts that are hard to understand. Well, that's not a limitation of branches: it's a limitation of Subversion. Apparently, Subversion does not store enough information about your changes and that makes it really difficult to get a merge right.

Other modern version control systems are said to handle branching way better than Subversion: git, Mercurial, Bazaar... You might consider a switch.

Whatever, you can handle parallel branches even in Subversion. Have a look at the "Branching and Merging" in the "Version Control with Subversion" book. TortoiseSVN can be very handy because when you attempt to perform a merge it grays out the revisions that have already been ported.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜