SlideShare une entreprise Scribd logo
1  sur  13
Version control with Subversion 版本管理基础 ATA研发中心
目录 基础 Copy-Modify-Merge方案 基本工作流程 基本目录 分支与合并 Changeset概念 分支处理流程 Changeset & Merging 合并处理流程 Tags基线
Copy-Modify-Merge方案 对比于Lock-Modify-Unlock,Copy-Modify-Merge方案更高效 所有的现代开发模式都使用Copy-Modify-Merge方案 Merge的代价并不如想象那么高
基本工作流程 Checkout – Modify-Commit 一次Commit尽量修改一个功能,或修复一个缺陷 可以通过选择文件的方式把一批修改分开多次Commit 通过”Refs #112”或”Fixes #112”关联本次Commit到一个功能或一个缺陷
基本目录 Trunk – 主干目录,保存最新主干代码 Branches – 分支目录,临时存放分支代码 Tags – 基线目录,永久存放发布的代码,永远不要在Tags里面提交修改 使用”svn copy”复制代码,不要人工拷贝/添加 “svn copy”不会产生额外的存储空间
Trunk vs. Branches Trunk和Branches都可能成为开发目录 主干默认保存最新的代码 分支有多种使用方法 功能分支 – 在分支上开发特定功能,完成后合并到Trunk 发布分支 – 对即将发布的版本创建分支,力求稳定。Trunk上可以继续开发新的功能 分支是临时的,用完后可以删除
Changeset vs. Revision 一次Commit提交一个Changeset,产生一个Revision Changeset是代码管理的最小单位 Changeset是代码合并的基础 Revision可以用来引用Changeset Revision是一个数字
Changeset包含什么 文件增加 文件删除 代码修改 文件移动 文件复制 对文件和目录的操作应尽量使用SVN功能,而不是直接操作,例如:删除、复制、移动、重命名等
分支处理流程 “svn copy”从trunk或tags目录把代码复制到branches “svn checkout” 从branches获取复制的代码 修改代码 “svn commit”提交修改到分支 如果需要,执行合并
Changeset& Merging Cherry Picking – Merge的最基本使用方法 正确的Merge要求Changeset是有意义的,每次Commit应该是原子的 对于需要Merge的分支或其他目录,应该保持跟踪,持续的Merge代码,而不要等到修改多到无法控制
合并处理流程 “svn merge” 并入其他分支的修改 处理冲突 编译验证,测试验证 “svn commit”提交结果 重复上面步骤
Tags基线 每个正式发布版本必须tag 充分利用Tags Tags并不消耗存储 不要修改Tags,如果需要修改,”svn copy”到Branches,然后再修改Branches下面的代码
END QA time

Contenu connexe

En vedette

Finding Your Internship
Finding Your InternshipFinding Your Internship
Finding Your Internshipbillmorgan231
 
Are we all knowledgeable now
Are we all knowledgeable nowAre we all knowledgeable now
Are we all knowledgeable nowPetr Lupac
 
mobility.ifsworld.com - Mobilita mění Vaše podnikání (1)
mobility.ifsworld.com - Mobilita mění Vaše podnikání (1)mobility.ifsworld.com - Mobilita mění Vaše podnikání (1)
mobility.ifsworld.com - Mobilita mění Vaše podnikání (1)IFS Czech
 
Linked instatwitbooktrest navigating the social seas 
Linked instatwitbooktrest   navigating the social seas Linked instatwitbooktrest   navigating the social seas 
Linked instatwitbooktrest navigating the social seas Christopher Spencer
 
Avoin koodi pähkinänkuoressa - Avoimen koodin hankkiminen
Avoin koodi pähkinänkuoressa - Avoimen koodin hankkiminenAvoin koodi pähkinänkuoressa - Avoimen koodin hankkiminen
Avoin koodi pähkinänkuoressa - Avoimen koodin hankkiminenCOSS
 
Media Rich versus Rich Media (Or Why Video in a Blog Is Not the Same as a Vid...
Media Rich versus Rich Media (Or Why Video in a Blog Is Not the Same as a Vid...Media Rich versus Rich Media (Or Why Video in a Blog Is Not the Same as a Vid...
Media Rich versus Rich Media (Or Why Video in a Blog Is Not the Same as a Vid...vogmae
 
Just Words day 9 (unit 2)
Just Words day 9 (unit 2)Just Words day 9 (unit 2)
Just Words day 9 (unit 2)Angala Maria
 
IFS Řízení projektů
IFS Řízení projektůIFS Řízení projektů
IFS Řízení projektůIFS Czech
 
Media Curriculum
Media CurriculumMedia Curriculum
Media Curriculumvogmae
 
How to invite a friend or client
How to invite a friend or clientHow to invite a friend or client
How to invite a friend or clientCoffeeClub Network
 

En vedette (20)

Post ero
Post eroPost ero
Post ero
 
Finding Your Internship
Finding Your InternshipFinding Your Internship
Finding Your Internship
 
Are we all knowledgeable now
Are we all knowledgeable nowAre we all knowledgeable now
Are we all knowledgeable now
 
StarwarsbyTicko
StarwarsbyTickoStarwarsbyTicko
StarwarsbyTicko
 
mobility.ifsworld.com - Mobilita mění Vaše podnikání (1)
mobility.ifsworld.com - Mobilita mění Vaše podnikání (1)mobility.ifsworld.com - Mobilita mění Vaše podnikání (1)
mobility.ifsworld.com - Mobilita mění Vaše podnikání (1)
 
Linked instatwitbooktrest navigating the social seas 
Linked instatwitbooktrest   navigating the social seas Linked instatwitbooktrest   navigating the social seas 
Linked instatwitbooktrest navigating the social seas 
 
Avoin koodi pähkinänkuoressa - Avoimen koodin hankkiminen
Avoin koodi pähkinänkuoressa - Avoimen koodin hankkiminenAvoin koodi pähkinänkuoressa - Avoimen koodin hankkiminen
Avoin koodi pähkinänkuoressa - Avoimen koodin hankkiminen
 
4TSC Points and Awards
4TSC Points and Awards4TSC Points and Awards
4TSC Points and Awards
 
Media Rich versus Rich Media (Or Why Video in a Blog Is Not the Same as a Vid...
Media Rich versus Rich Media (Or Why Video in a Blog Is Not the Same as a Vid...Media Rich versus Rich Media (Or Why Video in a Blog Is Not the Same as a Vid...
Media Rich versus Rich Media (Or Why Video in a Blog Is Not the Same as a Vid...
 
Just Words day 9 (unit 2)
Just Words day 9 (unit 2)Just Words day 9 (unit 2)
Just Words day 9 (unit 2)
 
Matematicas 2013
Matematicas 2013Matematicas 2013
Matematicas 2013
 
Just Words day 7
Just Words day 7Just Words day 7
Just Words day 7
 
Hygiene and You
Hygiene and YouHygiene and You
Hygiene and You
 
Commerce extérieur france 3e trimestre 2010
Commerce extérieur france 3e trimestre 2010Commerce extérieur france 3e trimestre 2010
Commerce extérieur france 3e trimestre 2010
 
IFS Řízení projektů
IFS Řízení projektůIFS Řízení projektů
IFS Řízení projektů
 
Media Curriculum
Media CurriculumMedia Curriculum
Media Curriculum
 
Premios grammy
Premios grammyPremios grammy
Premios grammy
 
How to invite a friend or client
How to invite a friend or clientHow to invite a friend or client
How to invite a friend or client
 
G:\PresentacióN1
G:\PresentacióN1G:\PresentacióN1
G:\PresentacióN1
 
Premios grammy
Premios grammyPremios grammy
Premios grammy
 

Similaire à Changeset

Subversion
SubversionSubversion
Subversioni7Xh
 
新浪微博大规模基于Docker的混合云应用实践 -王关胜
新浪微博大规模基于Docker的混合云应用实践 -王关胜新浪微博大规模基于Docker的混合云应用实践 -王关胜
新浪微博大规模基于Docker的混合云应用实践 -王关胜Weibo Corporation
 
Uc gui中文手册
Uc gui中文手册Uc gui中文手册
Uc gui中文手册호연 최
 
数据库持续集成
数据库持续集成数据库持续集成
数据库持续集成wait4friend
 
使用 Visual Studio Code 建構 JavaScript 應用程式
使用 Visual Studio Code 建構 JavaScript 應用程式使用 Visual Studio Code 建構 JavaScript 應用程式
使用 Visual Studio Code 建構 JavaScript 應用程式Will Huang
 
Hbase在淘宝的应用与优化 修改
Hbase在淘宝的应用与优化 修改Hbase在淘宝的应用与优化 修改
Hbase在淘宝的应用与优化 修改yp_fangdong
 
Mecurial hg
Mecurial hgMecurial hg
Mecurial hgiaiyang
 
imobile-beta技术沙龙
imobile-beta技术沙龙imobile-beta技术沙龙
imobile-beta技术沙龙posestudio
 
手机之家新系统介绍及架构分享
手机之家新系统介绍及架构分享手机之家新系统介绍及架构分享
手机之家新系统介绍及架构分享Dahui Feng
 
用Bluemix DevOps 建立良好的團隊開發與版本控制
用Bluemix DevOps 建立良好的團隊開發與版本控制用Bluemix DevOps 建立良好的團隊開發與版本控制
用Bluemix DevOps 建立良好的團隊開發與版本控制Hsuan-Ju Lin
 
Times Ten Training
Times Ten TrainingTimes Ten Training
Times Ten TrainingLi Chen
 
大规模数据处理
大规模数据处理大规模数据处理
大规模数据处理Kay Yan
 
前端&服务器
前端&服务器前端&服务器
前端&服务器fangdeng
 
Web testing automation
Web testing automationWeb testing automation
Web testing automationkuozui
 
Visual studio 2012 與 asp.net 4.5 (新功能與開發介紹) 第一天
Visual studio 2012 與 asp.net 4.5 (新功能與開發介紹) 第一天Visual studio 2012 與 asp.net 4.5 (新功能與開發介紹) 第一天
Visual studio 2012 與 asp.net 4.5 (新功能與開發介紹) 第一天Gelis Wu
 
20120613联动优势数据访问层DAL架构和实践4(刘胜)最新特性
20120613联动优势数据访问层DAL架构和实践4(刘胜)最新特性20120613联动优势数据访问层DAL架构和实践4(刘胜)最新特性
20120613联动优势数据访问层DAL架构和实践4(刘胜)最新特性liu sheng
 
淘宝Java中间件之路 it168
淘宝Java中间件之路 it168淘宝Java中间件之路 it168
淘宝Java中间件之路 it168vanadies10
 
CodeIgniter 2.0.X
CodeIgniter 2.0.XCodeIgniter 2.0.X
CodeIgniter 2.0.XBo-Yi Wu
 
虎扑基础设施架构探讨
虎扑基础设施架构探讨虎扑基础设施架构探讨
虎扑基础设施架构探讨hoopchina
 

Similaire à Changeset (20)

Subversion
SubversionSubversion
Subversion
 
新浪微博大规模基于Docker的混合云应用实践 -王关胜
新浪微博大规模基于Docker的混合云应用实践 -王关胜新浪微博大规模基于Docker的混合云应用实践 -王关胜
新浪微博大规模基于Docker的混合云应用实践 -王关胜
 
Uc gui中文手册
Uc gui中文手册Uc gui中文手册
Uc gui中文手册
 
数据库持续集成
数据库持续集成数据库持续集成
数据库持续集成
 
使用 Visual Studio Code 建構 JavaScript 應用程式
使用 Visual Studio Code 建構 JavaScript 應用程式使用 Visual Studio Code 建構 JavaScript 應用程式
使用 Visual Studio Code 建構 JavaScript 應用程式
 
Hbase在淘宝的应用与优化 修改
Hbase在淘宝的应用与优化 修改Hbase在淘宝的应用与优化 修改
Hbase在淘宝的应用与优化 修改
 
Mecurial hg
Mecurial hgMecurial hg
Mecurial hg
 
imobile-beta技术沙龙
imobile-beta技术沙龙imobile-beta技术沙龙
imobile-beta技术沙龙
 
手机之家新系统介绍及架构分享
手机之家新系统介绍及架构分享手机之家新系统介绍及架构分享
手机之家新系统介绍及架构分享
 
用Bluemix DevOps 建立良好的團隊開發與版本控制
用Bluemix DevOps 建立良好的團隊開發與版本控制用Bluemix DevOps 建立良好的團隊開發與版本控制
用Bluemix DevOps 建立良好的團隊開發與版本控制
 
Times Ten Training
Times Ten TrainingTimes Ten Training
Times Ten Training
 
大规模数据处理
大规模数据处理大规模数据处理
大规模数据处理
 
前端&服务器
前端&服务器前端&服务器
前端&服务器
 
Web testing automation
Web testing automationWeb testing automation
Web testing automation
 
Visual studio 2012 與 asp.net 4.5 (新功能與開發介紹) 第一天
Visual studio 2012 與 asp.net 4.5 (新功能與開發介紹) 第一天Visual studio 2012 與 asp.net 4.5 (新功能與開發介紹) 第一天
Visual studio 2012 與 asp.net 4.5 (新功能與開發介紹) 第一天
 
20120613联动优势数据访问层DAL架构和实践4(刘胜)最新特性
20120613联动优势数据访问层DAL架构和实践4(刘胜)最新特性20120613联动优势数据访问层DAL架构和实践4(刘胜)最新特性
20120613联动优势数据访问层DAL架构和实践4(刘胜)最新特性
 
Make talk-cn
Make talk-cnMake talk-cn
Make talk-cn
 
淘宝Java中间件之路 it168
淘宝Java中间件之路 it168淘宝Java中间件之路 it168
淘宝Java中间件之路 it168
 
CodeIgniter 2.0.X
CodeIgniter 2.0.XCodeIgniter 2.0.X
CodeIgniter 2.0.X
 
虎扑基础设施架构探讨
虎扑基础设施架构探讨虎扑基础设施架构探讨
虎扑基础设施架构探讨
 

Changeset