您的位置:首页 > 编程语言 > Java开发

[置顶] Eclipse下svn的创建分支/合并/切换使用 collabnet合并插件的安装 图文:eclipse中SVN分支合并到主干

2018-01-19 11:47 633 查看
部分内容来自from: http://blog.csdn.net/lisq037/article/details/17501327 https://www.open.collab.net/downloads/desktops/installing_cdee.html?_=d

最近接项目要求,要在svn主干上创建分支,用分支来进行程序的bug修改,而主干上进行新功能的开发。分支上的bug修改完,发布后,可以合并到主干上。项目程序可以在主干和分支之间进行切换,来实现主干和分支的同时维护。
       1.创建分支
        创建分支实际上就是将程序copy一份到指定的分支目录,如下图示:



在项目名称上点击右键,弹出菜单,选择“Team”,再选择“Branch/Tag”,弹出下面的页面: 



 
上图中的“Copy to URL”填写创建新分支的路径地址,后面会将程序copy到该目录下,形成新的分支。点击“Next”:
 



 
选择当前最新的版本,点击“Next”



 
如果勾选了上图下面的switch working copy to new branch/tag,eclipse的程序项目会自动切换到分支下。这里我们不选择,待会自己切换。
这样就创建了一个1.0的分支
         2.合并
         可以从主干合并到分支,也可以从分支合并到主干,根据需要可以选择合适的选项,如下图:



 
上图中的选项:
        1) 从主干合并到分支
        2) 从分支合并到主干
        3) 将主干上的修改合并到分支
        4) 合并2个分支到主干
        5) 从主干到分支,手工指定不需要合并的修改
        6) 从主干到分支,手工指定要合并的修改



 
上图显示没有任何修改,所以不用进行合并。
 
3.切换
在项目名称上点击右键,选择“Team” –> “switch to another Branch/Tag/Revision”。



 
选择需要切换的目的地址,点击ok即可。
 
这样,在项目里就可以在主干和若干分支间进行任意切换,来实现对不同版本/分支的程序进行修改提交操作。

合并需要用到一个插件,如图:
请根据官网(https://www.open.collab.net/downloads)的提示插件地址安装步骤进行安装即可
也可以下载离线版:
http://download.csdn.net/download/wuqilianga/10213818



collabnet插件操作

=====================================================================

The CollabNet Desktop – Eclipse Edition

CollabNet Desktop – Eclipse Edition is a freely downloadable set of plugins that CollabNet provides for the Eclipse IDE. This desktop works with and is part of the CollabNet Platform.

To download and install the latest functionality, follow the instructions in the next two sections:
Install CollabNet Desktop – Eclipse Edition
Check for updates to CollabNet Desktop – Eclipse Edition Features
Once you complete the installation, you will be asked if you want to restart the Eclipse SDK. This is not required, but it is recommended.

Install CollabNet Desktop – Eclipse Edition

To install the new CollabNet Desktop – Eclipse Edition, follow these steps:
From the Eclipse Help menu, select Install New Software.



Click to enlarge

In the Available Software window, click Add...



Click to enlarge
In the Add Repository dialog box:



Click to enlarge

Type a name into the Name text box.
If the software site is located on the web, type the Web Site location (URL) of the site into the Location text box. You may also paste or drag and drop a URL from a web browser into this text box.

You may copy one of the following into the URL field:

For Eclipse 4.6, copy this URL:  http://downloads.open.collab.net/eclipse/update-site/e4.6 For Eclipse 4.5, copy this URL:  http://downloads.open.collab.net/eclipse/update-site/e4.5 For Eclipse 4.4, copy this URL:  http://downloads.open.collab.net/eclipse/update-site/e4.4 For Eclipse 4.3, copy this URL:  http://downloads.open.collab.net/eclipse/update-site/e4.3 For Eclipse 4.2, copy this URL:  http://downloads.open.collab.net/eclipse/update-site/e4.2 For Eclipse 3.8, copy this URL:  http://downloads.open.collab.net/eclipse/update-site/e3.8 For Eclipse 3.7, copy this URL:  http://downloads.open.collab.net/eclipse/update-site/e3.7 For Eclipse 3.6, copy this URL:  http://downloads.open.collab.net/eclipse/update-site/e3.6 For Eclipse 3.5, copy this URL:  http://downloads.open.collab.net/eclipse/update-site/e3.5
Note: You can also use the development builds with most recent features and fixes. Just replace ‘update-site’ in the above URLs with ‘dev-builds’. For example, the dev build URL for http://downloads.open.collab.net/eclipse/update-site/e4.4 would be http://downloads.open.collab.net/eclipse/dev-builds/e4.4

If you want to download the software update site to your local file system and install the same, download the version of the CollabNet Desktop – Eclipse Edition you want to install:

Get the latest verion of CollabNet Desktop - Eclipse Edition from here
http://www.collab.net/downloads/integrations.
If the software site is in your local file system (including a CD), click Local... to specify the directory location of the site.
If the software site is in your local file system but is packaged as a jar or zip file, click Archive... to specify the name of the file.
In the Select Local Site Archive window, navigate to the location where you saved the CollabNet Desktop – Eclipse Edition and select Open.





Then Select Local Site Archive window



Click to enlarge

Click OK

Select CollabNet Desktop and click Next.



Click to enlarge
Review the Install details.



Click to enlarge
Review the license terms on the Feature License screen. If you agree to these terms, select "I accept the terms in the license agreements" and click FINISH to start the installation.

Note: You can have multiple instances of Eclipse on your machine, running different feature configurations.



Click to enlarge
The software installation starts.



Click to enlarge

Note: If you see a warning in the Verification window about installing an unsigned feature, you can ignore it. The CollabNet features are not signed.



Click to enlarge
When the installation is complete, click Yes to restart Eclipse.



Click to enlarge

Check for updates to CollabNet Desktop – Eclipse Edition Features

To check for updates to CollabNet Desktop – Eclipse Edition, follow these steps:/p>
From the Eclipse Help menu, select Check for Updates. Updates, if available, are shown in the Available Updates window.



Click to enlarge

Select CollabNet Desktop and click Finish.

Note: When you check for updates, Eclipse checks if any updates are available for all the software you have including CollabNet Desktop. As a result, the time taken to check for updates may be longer depending on the number of software you may have. If you just want to install/update CollabNet Desktop, it is recommended to use the installation steps as discussed earlier in this page.

图文:eclipse中SVN分支合并到主干

============================================================================

在项目开发中,需要添加一些新的功能,但是又不想影响到其他开发人员的项目进度,所以决定使用SVN分支进行开发,分支开发完毕后再合并到主干。本文介绍如何在eclipse中合并分支到主干。
1. 要想将分支合并到主干,首先需要切换到主干。
在项目上面点右键,选择Team – 切换,URL地址为主干的访问路径。


切换到主干
2. 在项目上面点右键,选择合并,选中“merge two different trees”。


合并分支
3. 在接下来的界面中选择如下:
From的路径填写主干的访问路径。在下面的版本选择中可以选择HEAD Revision(主干的最新版本),或者指定其他版本。
To的路径为分支的访问路径。可以在版本选择中选择HEAD Revision(分支的最新版本),或者指定其他版本。


分支合并说明
点击Finish后会进行合并操作。
4. 解决冲突,提交到主干。
合并完成后会将分支和主干的文件进行合并。如果在分支和主干中同时修改了一个文件,这时可能会出现冲突,需要手动更新这个文件来解决冲突。当所有的冲突解决后,需要将修改提交到主干中,这样分支合并就完成了。分支可以继续保留在SVN中,如果不需要也可以删除。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: