Subversion: Merging a vendor's source code releases into mainline at regular intervals

依然范特西╮ 提交于 2019-12-07 05:21:13

问题


At regular intervals, I receive a new release of a vendor's software, delivered as source code in a compressed package, and I don't have access to the vendor's source code repository. We make changes to the vendor's source code between their releases. Our changes do not get incorporated into their releases, but I need to merge changes from their releases into my mainline.

My repository layout looks like this:

  • /branches/Vendor X release 1.0
  • /branches/Vendor X release 1.1
  • /trunk/

The workflow I followed was:

  1. I added Vendor X release 1.0 as a branch and then copied it to the trunk.
  2. We made some changes to the source code on the trunk and then received Vendor X release 1.1.
  3. I added Vendor X release 1.1 to a branch. Now, I would like to merge Vendor X release 1.1 into the trunk.

The problem I am having is that no matter how I try this, I end up with either the merge resulting in no changes to the trunk, or every file being reported as a tree conflict.

I think that I would like to somehow do the following: tell Subversion to merge each file without consideration for the revision number of the file. I think that Subversion is reporting a tree conflict for each file, because the files did not originate from the same point in the revision history. However, in many cases these files are identical.

Thank you in advance for any help.


回答1:


In non-subversion terms, you want to integrate the changes between Vendor X release 1.0 and Vendor X release 1.1 into your trunk.

I would create just one Vendor X branch and use tags to identify version numbers. Whenever you receive a new vendor X version, checkout the branch, copy the new version's files into your working directory, apply svn add and svn delete as appropriate, and commit. Subversion now has the correct diff information for everything vendor X did during the two releases. After that, you can merge the changes between the last two vendor releases (aka the last tweo revisions in the vendor X branch) with the trunk.




回答2:


IMHO you can avoid merging. Here is it:

  1. Create 1.0 branch
  2. Copy 1.0 to 1.1
  3. Perform all required changes on 1.1
  4. Copy 1.1 to trunk.

If you still insist to merge then:

  1. Create 1.0
  2. Copy 1.0 to trunk
  3. Copy 1.0 to 1.1
  4. Make required changes to 1.1
  5. Merge changes done to 1.1 to trunk. The changes are from start of 1.1 till it's end.

This also maybe helpfull




回答3:


The solution I followed was:

  1. Created a release/ line for the vendor software.
  2. Added Release 1.0 to the release/ line.
  3. Branched release/ to create trunk/ and then replaced trunk/ with a working copy containing all changes I made after Release 1.0.
  4. Checked out a working copy of release 1.0 and added in release 1.1. Committed.
  5. Merged release/ into trunk/. No tree conflict or merge conflict.


来源:https://stackoverflow.com/questions/1683096/subversion-merging-a-vendors-source-code-releases-into-mainline-at-regular-int

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!