开发者

predict "conflicts" with own revisions?

开发者 https://www.devze.com 2023-02-03 16:56 出处:网络
I\'ve checked out multiple copies of a particular \"library\" from my SVN repository -- one copy for each of my work-related projects that use the same code. I\'ve made modifications in one that I\'ve

I've checked out multiple copies of a particular "library" from my SVN repository -- one copy for each of my work-related projects that use the same code. I've made modifications in one that I've committed to the repository, and I would like to update the copies in the rest of my projects to reflect these changes.

However, I would like to reserve the right to reject a small number of changes for one of my ongoing pr开发者_C百科ojects, so it would be great if there was some way I can get a warning for conflicts with files named as filename.mine, filename.rOLDREV, and filename.rNEWREV as if another user had committed these changes (but these changes have already been committed to the repository by me), rather than automatically updating all affected files (with svn update).

Is this possible?


You should use branches instead of checkouting the same project multiple times.

imagine this repos:

repos
  |-- trunk/
  |-- branches/
        |-- projectX
        |-- projectY
        `-- projectZ

Let's say you develop a feature, and wanted to add it in the projectY only, you could the merge the code from trunk to branches/projectY.

If another feature was to be include in the projectX and projectZ, you the merge the feature to those two branches.

That way, you control what goes in each projects, and the history follow in each projects.


If you have a project A that needs to stay at an old revision of a dependency B, then you can set up a svn:externals property in project A which points to B with an explicit revision number. For example, the trunk folder of project A would have a svn:externals property with this content:

-r148 http://svn.example.com/projects/B/trunk B

When you checkout project A, this will cause a folder B to appear containing revision 148 of the trunk of project B. Changes to project B will not affect A until you explicitly change the revision number in the svn:externals property.

0

精彩评论

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

关注公众号