Using TortoiseSVN how do I merge changes from the trunk to a branch and vice versa?

前端 未结 5 484
栀梦
栀梦 2020-12-07 07:25

I\'ve been reading up on branching/merging with Subversion 1.5 using the excellent and free Version Control with Subversion book. I think that I understand how to use the S

5条回答
  •  温柔的废话
    2020-12-07 07:39

    The behavior depends on which version your repository has. Subversion 1.5 allows 4 types of merge:

    1. merge sourceURL1[@N] sourceURL2[@M] [WCPATH]
    2. merge sourceWCPATH1@N sourceWCPATH2@M [WCPATH]
    3. merge [-c M[,N...] | -r N:M ...] SOURCE[@REV] [WCPATH]
    4. merge --reintegrate SOURCE[@REV] [WCPATH]

    Subversion before 1.5 only allowed the first 2 formats.

    Technically you can perform all merges with the first two methods, but the last two enable subversion 1.5's merge tracking.

    TortoiseSVN's options merge a range or revisions maps to method 3 when your repository is 1.5+ or to method one when your repository is older.

    When merging features over to a release/maintenance branch you should use the 'Merge a range of revisions' command.

    Only when you want to merge all features of a branch back to a parent branch (commonly trunk) you should look into using 'Reintegrate a branch'.

    And the last command -Merge two different trees- is only usefull when you want to step outside the normal branching behavior. (E.g. Comparing different releases and then merging the differenct to yet another branch)

提交回复
热议问题