myeclipse 中 svn 更新 提交 同步资源库 详细解释下他们的功能

转载至:http://www.cnblogs.com/keyi/p/5772762.html
原理是这样的 svn服务器一般放在公共的服务器上,大家连这个服务器,在MyEclipse上使用svn控件 可以下载svn上的项目至本地,所以很多公司将开发要用到的软件都放在svn上,有同事来只要连上svn 就可以把需要的东西下下来了

1.update更新
更新,是指 服务器上变动了的 而你本地没有变动,需要你更新
只是把服务器上最新版本下载到客户端,规则如下:
    1、如果你本地的某个文件没有修改过,而服务器上的这个文件别人已经提交过新版本,那么会用服务器上最新的文件覆盖你本地的文件;
    2、如果你本地的某个文件你修改过了还没有提交,服务器端的这个文件还没被别人改过,那么对你本地的这个文件没有任何影响;
    3、如果你本地的某个文件你修改过了还没有提交,服务器端的这个文件已经被别人改过,那么会提示你发生冲突,会将服务器上最新版文件、你     新修改的文件、发生分歧前的那个版本的文件都存放到你的本地

 
2.commit提交
提交,是指服务器上没有的,也就是你改过的东西,你需要将代码提交,其他同事更新你的代码
3.synchronize同步
同步,是在更新提交之前做的工作,更新提交前先同步,可以知道哪些东西要提交哪些东西要更新,哪些东西是冲突的(你和同事 改了同一个文件,可能会出现冲突),
出现冲突不能提交也不能更新,只有先将冲突的文件选择用本地的文件覆盖或用服务器的文件覆盖本地后才能更新或提交,具体的用法还需要楼主多实践,这东西用过一次就会了
上面术语在MyEclipse里的选项是
同步:synchronize with repository   (如果你的项目连了svn 右键你的项目 team...就能看到)
点击同步后会进入到synchronize 的界面  再右键项目就有
Mark as mergerd  (冲突时点它 冲突的文件会用本地的覆盖服务器的,意思就是说 用你的!)
override and update (冲突时 右键文件 选此项表示 用服务器的!)

SVN使用---与资源库同步

1.同步
在Eclipse下,右击你要同步的工程->team->与资源库同步->这时会进入同步透视图,会显示出本机与SVN上内容有不同的文件,双击文件名,会显示出两个文件中哪里不同;
2.提交
在同步透视图下有"灰色向右的箭头,表示你本机修改过",右击该文件,可以选择提交操作;
3.覆盖/更新
在同步透视图下有"蓝色向左的箭头,表示svn修改过",右击该文件,可以选择覆盖/更新操作;

Eclipse使用SVN图标说明
1.灰色向右箭头:本地修改过

2.灰色向右且中间有个加号的箭头:本地比SVN上多出的文件

3.灰色向右且中间有个减号的箭头:本地删除了,而SVN上未删除的文件

4.蓝色向左箭头:SVN上修改过
5.蓝色向左且中间有个加号的箭头:SVN上比本地多出的文件
6.蓝色向左且中间有个减号的箭头:SVN上删除了,而本地未删除的文件
7.红色双向箭头:SVN上修改过,本地也修改过的文件

 转至 http://blog.sina.com.cn/s/blog_80c69e390101e7ph.html

eclipse中svn的各种图标详解

- 已忽略版本控制的文件。可以通过Window → Preferences → Team → Ignored Resources.来忽略文件。
A file ignored by version control. You can control what resources will be ignored by going to Window → Preferences → Team → Ignored Resources.

未纳入版本控制的文件,一般是新增,尚未提交的文件。
A file not under version control. These are typically new files that you have not committed to the repository yet.

- 本地重命名或移动到其它目录的文件。
A versioned file that needs to be added to the remote repository. These are typically files you have either renamed, or moved to a different directory.

- 本地删除的目录。
A deleted folder. These are folders that you have deleted locally without yet committing the changes to the repository. Note that files are usually removed from the view when they're deleted locally, so they are normally not seen with this icon.

- 没有任何改动的文件。
A file with no local changes.

- 发生改动,尚未提交的文件。
A file with local, uncommitted changes.

- 处于锁定状态的文件。
A locked file.

- 有冲突没有解决,就更新或提交的文件。
A conflicted file. These are typically files that had a commit/update conflict that you marked to resolve later.

- 有目录树冲突的文件。一般在最近一次更新后,资源库上的文件被移动、删除或重命名。
A file that has a tree conflict. These are typically files that have local changes, but have since been moved, removed, or renamed in the repository since the last local copy update.

- 引用外部项目的文件,不能提交到本项目的资源库里。
A file that is external to the project. Linked external files cannot be committed to the repository.

- 有分支版本的文件。这些文件属于另外一个不同的工作目录而不是属于本地的父目录。
A file that has been switched. These are files which belongs to a different working copy than their local parent directory.

 

  • 迁出 Outgoing view

 

- 本地有更改的文件。
A file whose contents have been modified and will be committed to the repository.

- 本地新增的文件。
A file that will be newly added to the repository. This may coincide with a file removal in cases where a file is moved or renamed..

- 本地删除的文件。
A file that will be removed from the repository. This may coincide with a file addition in cases where a file is moved or renamed.

- 本地文件属性发生变化了的文件。
A file with property changes, in the Commit dialog. On the Synchronize tab, property changes are currently reflected as a normal file modification ().

 

  • 迁入 Incoming view

 

- 需要更新的文件。
A file that has content changes committed to the repository that will be applied to the local copy.

- 需要迁入的新增文件。
A new file that will be added to the local copy from the repository. Like the outgoing file addition, this may be the result of a move or rename.

- 资源库中删除了的文件。
A file that will be removed from the local copy because it has been removed from the repository. Like the outgoing file removal, this may be the result of a move or rename.

 

  • 冲突 Conflict view

 

- 资源库和本地同时有修改的文件。
A file that has been changed in both the local copy and repository independently, causing a need for conflict resolution. Fixing this condition involves opening up the conflict view or forcibly overwriting changes locally or remotely.

- 远程资源库上已经被重命名或移动、删除的文件。
A file that has a tree conflict. This can occur when there are new changes to a file on one end (either local or remote), and the file is moved, removed, or renamed on the other.

 

  • “与资源库同步”选项打开的界面上的一些按钮 Others :

 

Finally, the Synchronize with Repository option opens the Synchronize tab () with the following buttons:

- 同步选中的文件,下拉箭头切换不同的远程目录。
Synchronizes the local copy with the currently selected repository when clicked. Selecting from the drop-down allows switching between different remote code bases.

- 只显示需要迁入的文件。

Shows only incoming changes (remote → local).

- 只显示需要提交的文件。

Shows only outgoing changes (local → remote).

- 同时显示需要更新或提交文件。

Shows both incoming and outgoing changes (remote ↔ local).

- 只显示有冲突的文件。

Shows conflicting changes.

- 更新全部文件。

Updates all local resources with incoming changes after prompt.

- 提交全部文件。

Brings up the commit dialog to commit all outgoing changes.


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值