转至繁体中文版     | 网站首页 | 图文教程 | 资源下载 | 站长博客 | 图片素材 | 武汉seo | 武汉网站优化 | 
最新公告:     敏韬网|教学资源学习资料永久免费分享站!  [mintao  2008年9月2日]        
您现在的位置: 学习笔记 >> 图文教程 >> 软件开发 >> Delphi程序 >> 正文
2004.11.30.Using Source Control         ★★★★

2004.11.30.Using Source Control

作者:闵涛 文章来源:闵涛的学习笔记 点击数:833 更新时间:2009/4/23 18:28:56

Using Source Control

Borland''''s Delphi 2005 provides a full-featured direct integration with StarTeam, Borland''''s automated change and software configuration management (SCM) system. This integration lets you access StarTeam''''s rich feature set from within the IDE. The integration also provides some Delphi 2005-specific features to allow you to easily check in and check out Delphi 2005 project source files and manage your work more easily. Delphi 2005 also supports several other source control systems through the Microsoft Source Code Control (SCC) API. The SCC interface allows you to perform the most common source control tasks from within the development environment. Additionally, you can write your own interfaces to unsupported source control systems, using the Microsoft SCC API.

Source Control Basics

Each source control system consists of one or more centralized repositories and a number of clients. A repository is a database that contains not only the actual data files, but also the structure of each project you define. Most source control systems adhere to a concept of a logical project, within which files are stored, usually in one or more tree directory structures. A source control system project might contain one or many Delphi 2005 projects in addition to other documents and artifacts. The system also enforces its own user authentication or, very often, takes advantage of the authentication provided by the underlying operating system. Doing so allows the source control system to maintain an audit trail or snapshot of updates to each file. These snapshots are typically referred to as diffs, for differences. By storing only the differences, the source control system can keep track of all changes with minimal storage requirements. When you want to see a complete copy of your file, the system performs a merge of the differences and presents you with a unified view. At the physical level, these differences are kept in separate files until you are ready to permanently merge your updates, at which time you can perform a commit action. This approach allows you and other team members to work in parallel, simultaneously writing code for multiple shared projects, without the danger of an individual team member''''s code changes overwriting another''''s. Source control systems, in their most basic form, protect you from code conflicts and loss of early sources. Most source control systems give you the tools to manage code files with check-in and check-out capabilities, conflict reconciliation, and reporting capabilities. Most systems do not include logic conflict reconciliation or build management capabilities. For details about your particular source control system capabilities, refer to the appropriate product documentation provided by your source control system vendor. Commonly, source control systems only allow you to compare and merge revisions for text-based files, such as source code files, HTML documents, and XML documents. The source control systems supported by Delphi 2005 allow you to include binary files, such as images or compiled code, in the projects you place under control. You cannot, however, compare or merge revisions of binary files. If you need to do more than store and retrieve specific revisions of of these types of files, you might consider creating a manual system for keeping tracking of the changes you make to binary files.

Repository Basics

Source control systems store copies of source files and difference files in some form of database repository. In some systems, such as CVS or VSS, the repository is a logical structure that consists of a set of flat files and control files. In other systems, the repositories are instances of a particular database management system (DBMS) such as InterBase, Microsoft Access, MS SQL Server, IBM DB2, or Oracle. Repositories are typically stored on a remote server, which allows multiple users to connect, check files in and out, and perform other management tasks simultaneously. You need to make sure that you establish connectivity not only with the server, but also with the database instance. Check with your network, system, and database administrators to make sure your machine is equipped with the necessary drivers and connectivity software, in addition to the client-side source control software. Some source control systems allow you to create a local repository in which you can maintain a snapshot of your projects. Over time the local image of your projects differs from the remote repository. You can establish a regular policy for merging and committing changes from your local repository to the remote repository. Generally, it is not safe to give each member of your team a separate repository on a shared project. If you are each working on completely separate projects and you want to keep each project under source control locally, you can use individual local repositories. You can also create these multiple repositories on a remote server, which provides centralized support, backup, and maintenance.

Working with Projects

Source control systems, like development environments, use the project concept to organize and track groups of related files. No matter which source control system you use, you create a project that maintains your file definitions and locations. You also create projects in Delphi 2005 to organize the various assemblies and source code files for any given application. Delphi 2005 stores the project parameters in a project file. You can store this file in your source control system project, in addition to the various code files you create. You might share your project file among all the developers on your team, or you might each maintain a separate project file. Most source control systems consider development environment project files to be binary, whether they are actually binary files or not. As a consequence, when you check a project file into a source control system repository, the source control system overwrites older versions of the file with the newer one without attempting to merge changes. The same is true when you pull a project, or check out the project file; the newer version of the project file overwrites the older version without merging.

Working with Files

The file is the lowest-level object that you can manage in a source control system. Any code you want to maintain under source control must be contained in a file. Most source control systems store files in a logical tree structure. Some systems, such as CVS, actually use terms like branch, to refer to a directory level. You can create files in a Delphi 2005 project and include them in your source control system, or you can pull existing files from the source control system. You can put an entire directory into the source control system, then you can check out individual files, multiple files, or entire subdirectory trees. Delphi 2005 gives you control over your files at two levels—at the project level within Delphi 2005 and in the source control system, through the Delphi 2005 interface to the source control system.

Note: The History View provides revision information for your local source files. The History View can be used to track changes you make to files as you work on them in the Designer or the Code Editor.

 


[VB.NET程序]The UDPChat Source(VB.NET)  [VB.NET程序]Auto Complete combo Box(VB.NET Source Use API…
[Delphi程序]2004.11.30.Using the StarTeam Integration  [Web开发]ShadowStar CodeFast Source Code 我的生日礼物
教程录入:mintao    责任编辑:mintao 
  • 上一篇教程:

  • 下一篇教程:
  • 【字体: 】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
      注:本站部分文章源于互联网,版权归原作者所有!如有侵权,请原作者与本站联系,本站将立即删除! 本站文章除特别注明外均可转载,但需注明出处! [MinTao学以致用网]
      网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)

    同类栏目
    · C语言系列  · VB.NET程序
    · JAVA开发  · Delphi程序
    · 脚本语言
    更多内容
    热门推荐 更多内容
  • 没有教程
  • 赞助链接
    更多内容
    闵涛博文 更多关于武汉SEO的内容
    500 - 内部服务器错误。

    500 - 内部服务器错误。

    您查找的资源存在问题,因而无法显示。

    | 设为首页 |加入收藏 | 联系站长 | 友情链接 | 版权申明 | 广告服务
    MinTao学以致用网

    Copyright @ 2007-2012 敏韬网(敏而好学,文韬武略--MinTao.Net)(学习笔记) Inc All Rights Reserved.
    闵涛 投放广告、内容合作请Q我! E_mail:admin@mintao.net(欢迎提供学习资源)

    站长:MinTao ICP备案号:鄂ICP备11006601号-18

    闵涛站盟:医药大全-武穴网A打造BCD……
    咸宁网络警察报警平台