- 浏览: 376087 次
- 性别:
- 来自: 北京
文章分类
最新评论
-
0372:
感谢以后去火车站就知道郑州的代号了哈哈!谢谢!
火车站编码(名称-代号) -
tanliansheng:
感谢分享,学习了.其实开头就该说有pdf版的...这排版不好看 ...
Nginx关于location的匹配规则详解.docx -
mineral:
感谢中英对照地讲解,非常清楚了。登录表示感谢
Nginx关于location的匹配规则详解.docx -
首席拧螺丝:
好文章要顶!
Nginx关于location的匹配规则详解.docx -
duzc2:
hardPass 写道MMap是Direct Buffer 的 ...
JAVA NIO之Direct Buffer 与 Heap Buffer的区别?
Help: Workbench User Guide -> Concepts -> Team programming with CVS
学会看官方资料很重要,理解帮助文档的组织形式。
一、CVS对于团队开发的重要性
我们的项目都是工程级的,一个project需要许多人共同完成,team member之间既相互独立又相互联系。独立的是独立完成一个project的某个module;联系的是最后要merge and share各自的module。这些工作需要借助CVS这样的源代码公里工具。
In the Concurrent Versions System (CVS) team programming environment, team members do all of their work in their own Workbenches, isolated from others. Eventually they will want to share their work . They do this via a CVS Repository.
二、CVS中Branche的概念
2.1 Branch能反映一个项目的推进历程
分支Braches
Branches <script type="text/javascript"><!----></script>
In CVS, teams share and integrate their ongoing work in branches .
Think of a branch as a shared work area that can be updated at any time by team members. In this way, individuals can work on a team project, share their work with others on the team, and access the work of others during all stages of the project. The branch effectively represents the current shared state of the project.
一个team的team member之间需要共享他们进行的工作。Branch就是这么一个东西,每个member能够update别人的成果,也能commit自己的成果。
Thus the branch is constantly changing, moving forward as team members submit new work.
(随着项目组成员不断提交新的工作,Branch其实是一直在变的,一直向前推进的。)
The branch effectively represents the current state of the project.(所以,一个Branch能够反映出一个项目推进的历程,而该历程上的里程碑就是个Version or Tag)
每个team member做的修改最终都提交到一个branch上。
At any point a team member can update their workspaces from the branch and know they are up to date.
As team members produce new work, they share this work by committing those changes to the branch. Similarly, when they wish to get the latest available work, they update their local workspaces to the changes on the branch.
Branches <script type="text/javascript"><!----></script>
Resources can be changed in the Workbench without affecting the branch. Individuals must explicitly provide their changed resources to the branch.
2.2 一个项目可以有多个Branch,至少有一个
Every CVS repository has at least one branch, referred to as HEAD.(每个项目至少有一个Branch,该Branch被称为HEAD)
Under certain conditions, more than one branch may exist in a repository. For example, one branch may be for ongoing work, and another branch may be for maintenance work.
(某些条件下,会有多个Branch,比如一个Branch是用来推进工作的,另一个是用来维护的。这个我们经常遇到,比如我们开发完了一个版本在生产系统上跑着;后来有了新的业务需求,我们需要增加新功能,同时还要能运维以前的版本。)
由Branch够成一个代码树。
开始的时候,任何一个module都有一个主枝被称为'HEAD'。Branch是一棵正常生长的代码树中的枝杈。
一个branch最终要么被合并到主干中去,要么被结束。branch通常用来debug,如果这个bug被fix了,修改bug的代码应该被合并到主枝上去。 一个branch也可能经历多次与主枝的合并。
Branches <script type="text/javascript"><!----></script>
As you make changes locally in your Workbench, you are working alone. When you are ready to make your local resource changes available to other team members, you'll need to commit your work to the branch. All such changes are classified as outgoing changes when you do a synchronization.
Ideally, you should update your local workspace with any changes others have made in a branch ( before committing to it. )
This ensures that you have the very latest work from the other team members.
After you have updated from the branch , merged any conflicting changes in your local Workbench, and tested your changes locally, you can more easily commit your Workbench's changes to the branch. Branches <script type="text/javascript"><!----></script>
When you commit changes to the branch, your changes are copied from your local Workbench to the branch.
As a result, these changes are then seen as incoming changes when other developers update from the branch later. (其他member从Branch下update的时候,他们将会看到有incomming changes产生。)
当我们update了代码后,我们进行edit,这时候你work alone的,只有你commit你的changes时其他team member才能看到。但为了防止其他的team member也对同一个source code进行了修改,所以首先我们执行syn with repository,该工具会把比对的结果都表示出来,比如outgoing changes 和 incomming changes。
理想的情况就是,你在commit之前首先都把其他人做的修改都update了,这样提交就不会有冲突。
三、Sync with Repository 与CVS同步
Synchronizing with a CVS repository <script type="text/javascript"><!----></script>
In the CVS team programming environment, there are two distinct processes involved in synchronizing resources: updating with the latest changes from a branch and committing to the branch.
(两个完全不同的操作 distinct )
当我们使用cvs进行team programming时,两个操作前我们必须先进行sync with repository操作。一个是update the latest changes from a branch ,另一个是commit your local changes to the branch.
When you make changes in the Workbench, the resources are saved locally. Eventually you will want to commit your changes to the branch so others can have access to them. Meanwhile , others may have committed changes to the branch. You will want to update your Workbench resources with their changes.
Important! : It is preferable to update before committing, in case there are conflicts with the resources in your Workbench and the resources currently in the branch.
preferable ['prefərəbl] 更好的;
in case 以防万一,以防止;
相当重要的是:在你commit你的工作前,进行下update。以防止你本地的资源和branch上的资源冲突。
Synchronizing with a CVS repository <script type="text/javascript"><!----></script>
The synchronize view contains filters to control whether you want to view only incoming changes or outgoing changes . (执行sync with repository之后,工具会报告两类changes,一个是outgoing changes(你需要commit的) 另一个是incomming changes(你需要update的))。
Incoming changes come from the branch . If accepted, they will update the Workbench resource to the latest version currently committed into the branch.
Outgoing changes come from the Workbench . If committed, they will change the branch resources to match those currently present in the Workbench.
如果某个时候,同步的结果在同一个文件上既出现了incomming changes又出现了outgoing changes,那么则称为confict 冲突。
【3.2 conflict产生的原因和解决办法】
Regardless of which mode (filter) you select, the Synchronize view always shows you conflicts that arise when you have locally modified a resource for which a more recent version is available in the branch.(这句话描述了什么情况下会产生一个conflict? 答案是: 你在本地修改了某个资源,也就是产生了一个outgoing changes; 与此同时对于该资源 ,此时在branch上却有了一个更新的版本出现(a more recent version)==那么我们想下,branch上什么情况下会出现一个 a more recent version呢? 很明显是有其他team member做了一次commit操作呗。最后的结论是: conflict出现于团队中有两个人同时都同一个资源进行了修改,那么早提交的那个人能够成功提交,后提交的人则被提示conflict。 a more recent version is available for that resource.)
In this situation you can choose to do one of three things: update the resource from the branch, commit your version of the resource to the branch, or merge your work with the changes in the branch resource. Typically you will want to merge, as the other two options will result in loss of work.
当产生冲突时,我们大概能做三件事情:
1、强制update and overwrite;2、强制commit and overwrite; 3、merge your work with the changes in the branch resource。
由于前两种都需要overwrite,会导致其中一个人的work被lost。所以,在eclipse中的cvs客户端提倡merge。当然也可以update and overwrite。
【3.3 sync 的报告以及解释】 VS Workspace Synchronization <script type="text/javascript"><!----></script>
Synchronization state
The synchronize view shows the synchronization state of resources (同步后产生的状态报告 ) in your workspace compared to those in the repository.
(所谓的同步就是和远程资源进行对比,对一个资源我们能有多少操作呢? 无非只有增、删、改、查 。查是不会改变资源的状态的,那么所谓的变化:为非就是增加、删除和修改)
change (add, delete , modify)
direction : local相对remote 还是 remote相对local 还是同时 : incomming ; outgoing 和 conflicting
This state is shown by using icons and can also be configured to show the state as text appended to the resource name. A description of the icons is shown in the table below:
Note : in CVS directories are never really deleted from the repository. Instead, files are deleted and empty directories are pruned from your workspace.
注意:对于资源的删除权限应该是很敏感的,我们可以想象如果某个人不小心把某个资源删除了甚至整个项目给删除了,而且能反映到服务器上去,那是多么不可思议的一件事情;意味着,整个工作的泡汤。所以cvs工具的设计者肯定不会这么干,所以这里的删除并不会从cvs上删除,只是files are deleted and empty directories are pruned from your workspace。 文件和空目录在你的workspace中删除了,cvs上还是有的。
prune [pru:n] v. 修剪,砍掉,删除 (prune an empty directory 删除一个空目录)
Important : It is preferable to update resources in the Workbench first, resolve any conflicts that exist by merging, then commit Workbench resources to the repository
CVS Workspace Synchronization <script type="text/javascript"><!----></script>
Update and Commit Operations
There are several flavours of update and commit operations available in the
Synchronize view. You can perform the standard update
and commit
operation on
all visible applicable changes or a selected subset. You can also choose to
override and update
, thus ignoring any local changes
, or override and commit
,
thus making the remote resource match the contents of the local resource. You
can also choose to clean the timestamps for files that have been modified
locally (perhaps by an external build tool) but whose contents match that of the
server. (对比时一个很重要的依据是依据timestamps)
Conflict Handling
When dealing with conflicts, you can first perform an update and any conflicting changes The update operation will correctly update conflicts that are auto-mergeable (i.e. files content changes do not overlap ) but will skip files that contain changes that overlap.
overlap
['əuvə'læp]
n. 重叠,重复
v. 重叠,重复
当我们处理confilcts时,我们首先执行下update,因为有些冲突是auto-mergealbe的(就是那些非overlap的修改);但是如果修改是overlap修改,那么必须手工进行merge。
alternatively [ɔ:l'tə:nə,tivli] 替代地; 另一种办法。
Alternatively, conflicts can be handled
using a Compare editor. (通过Compare Editor进行处理,也就是update了
,
)
A Compare editor can be opened by double-clicking (or single-clicking if you have change your open strategy in the preferences) on the conflict or by choosing Open in Compare Editor from the context menu. The Compare editor allows you to manually resolve the conflicts in the file. Once completed, perform a Mark as Merged on the conflict to indicate that you are done. This will change the conflict into an outgoing change.
注意: Compare Editor中我们只能编辑local file 不能编辑remote file; 当我们merge完毕后,我们执行 Mark as Merged on the conflict。 这样它就变成了outgoing changes。
发表评论
-
Missing artifact com.sun:tools:jar:1.5.0
2012-03-19 20:12 2480Missing artifact com.sun:tools: ... -
火车站编码(名称-代号)
2012-01-12 16:35 43055@bjb|北京北|VAP| 0@bjd|北 ... -
tcpdump
2010-12-18 11:52 1364简单的TCPDUMP命令: tcpdump -i et ... -
myeclipse太慢,怎么办
2010-07-19 15:48 20751 老是弹出Quick update error 这个 ... -
wireshark过滤器
2009-12-07 16:28 2995<!-- [if !mso]> <styl ... -
抓包工具
2009-09-25 15:25 1528pcap 是一个网络开发包(常用于网络安全),很多sniff ... -
shell脚本
2009-09-08 14:36 1085shell运行脚本 -
动态配置文件
2009-09-03 15:34 1384package com.umpay.util; impo ... -
命令行参数处理小技巧
2009-09-03 15:12 1050private static Properties pa ... -
http代理和socks代理
2009-07-29 11:21 1819什么是HTTP代理:www对于 ... -
代理服务器新手指南
2009-07-29 10:35 1496【提纲】 1、需求: 代理服务器能给我们解决什么问题; ... -
memcached 入门
2009-06-07 18:58 2158memcached的安装 http://www.ccv ... -
公钥体系
2009-02-21 14:28 1535【1、同余关系定义 (模n相等)】 Two integer ... -
java反编译工具
2009-02-17 21:55 1208http://java.decompiler.free.fr/ ... -
麻雀 DbUtils
2009-02-16 23:00 1515http://commons.apache.org/dbuti ... -
ant实践入门
2009-02-15 23:32 1689问题的提出: Ant(蚂蚁是搬东西的):编译,打包,配置,部署 ... -
cvs 概念和操作
2009-01-10 17:55 1724Help: Workbench User Guide -&g ...
相关推荐
文本资料则可能包含了更深入的CVS概念和使用指南,例如CVS的工作原理,CVS关键字扩展,以及与IDE(集成开发环境)的集成方法。这些文档可能会详细解释如何设置CVS客户端,使用`cvs checkout`, `cvs commit`, `cvs ...
【Cvs for Windows】是一种版本控制系统,用于管理软件项目的源代码。Cvs(Concurrent Versions System)...为了充分利用这个工具,开发者需要了解基本的Cvs概念和操作,同时参考提供的文档来解决可能出现的疑难问题。
1. CVS概念:CVS是一个分布式版本控制系统,它允许开发者在一个项目的不同位置工作,并通过网络同步各自的工作,保持代码的一致性。CVS通过记录每次修改,实现了版本历史跟踪,方便回溯和协作。 2. 版本控制的重要...
cvs中文手册,讲述基本的cvs概念,以及cvs服务的搭建等.
**CVS基础概念** 1. **版本控制**:版本控制系统记录了文件和目录的历史更改,允许用户回溯到之前的任何版本,同时支持多人协作,避免了文件冲突。 2. **仓库(Repository)**:CVS中的中央存储库,保存所有文件的...
**CVS基础概念** 1. **版本库(Repository)**:CVS中的中央存储库,保存所有项目文件的不同版本。 2. **工作副本(Working Copy)**:开发者在本地的项目文件,与版本库保持同步。 3. **分支(Branch)**:允许...
一、CVS的基本概念 1. 工作副本:每个开发人员在本地计算机上有一个项目的工作副本,可以自由编辑而不影响其他人的工作。 2. 版本库:存储所有文件的中央仓库,记录着文件的历史变更。 3. 检出(Checkout):从版本...
CVS(Concurrent ...尽管现代的版本控制系统如Git已经取代了CVS在许多场景下的应用,但CVS仍然是理解版本控制概念和工作原理的一个基础工具,尤其对于那些在早期就采用CVS的项目来说,它仍然是不可或缺的一部分。
1. **版本控制系统基础**:理解版本控制系统的基本概念,如版本、分支、合并,以及如何通过版本控制来解决多人协作时的冲突问题。 2. **CVS安装与配置**:熟悉CVS服务器的安装步骤,客户端工具的选择,以及基本的...
1. **CVS基本概念** - **版本控制**:CVS的核心功能是版本控制,它记录了文件的每一个版本,方便开发者查看历史变更,恢复旧版本。 - **工作副本**:每个开发人员在本地计算机上有一个项目的“工作副本”,可以...
一、CVS基本概念 CVS是一个开源的版本控制系统,它跟踪文件的修改历史,允许团队成员同时编辑同一份代码,而不会互相冲突。通过CVS,你可以恢复旧版本的代码,查看谁修改了什么,以及何时修改的,极大地提高了团队...
#### CVS的基本概念 CVS通过维护一个中央仓库(repository),存储项目的各个版本的源代码,以及每次更改的记录。开发者可以从这个仓库“签出”(checkout)当前或特定版本的源代码到本地,进行开发工作。完成修改...
本教程将通过"Cvs使用教程.swf"这个Flash动画,详细讲解CVS的基本概念、安装、配置以及实际操作。 首先,理解CVS的基本概念至关重要。CVS维护了一个中央仓库,其中包含了所有项目文件的历史版本。开发者可以在本地...
- **1.1 编写目的**:此手册旨在帮助用户了解CVS的基本概念,掌握CVS的安装和配置过程,以实现团队间的代码管理与协作,确保代码的一致性和完整性。 - **1.2 参考资料**:虽然本手册未提供具体的参考资料,但通常...
**一、CVS基础概念** 1. **仓库(Repository)**:CVS中的所有版本化文件都存储在仓库中,这是一个中央化的数据库,记录了所有文件的历史版本。 2. **工作拷贝(Working Copy)**:每个开发者本地的项目副本,可以...
1. **TortoiseCVS的基本概念** - **CVS**:CVS是一种分布式版本控制系统,用于跟踪软件项目中的文件更改,允许多个开发者协作而不会发生冲突。 - **客户端/服务器架构**:TortoiseCVS作为CVS的客户端,通过与CVS...
1. **CVS基本概念**:了解CVS的工作原理,包括仓库(Repository)、工作目录(Working Copy)、头信息(Header Information)等核心概念。 2. **安装与配置**:如何在不同的操作系统上安装CVS客户端和服务器,以及...
学习和理解CVS的工作原理和使用方法,对于理解现代版本控制概念以及协作开发的流程有着重要的意义。通过阅读提供的"CVS安装程序和课件",你可以深入了解CVS的安装和使用,从而更好地利用这个工具进行团队开发。
以下是对CVS的一些核心概念和常用操作的详细说明: 1. **CVS基础**:CVS是一个分布式系统,它允许多个开发者在不同的位置同时工作,并能够合并他们的修改。每个开发者都有自己的工作副本,可以独立修改,然后将更改...
### CVS的基本概念 1. **仓库(Repository)**:CVS的核心是仓库,它存储了所有版本的历史信息。仓库通常是一个集中式的服务器,各个开发者从仓库中获取最新的代码,并将更改提交回仓库。 2. **工作拷贝(Working ...