当前位置:网站首页>SVN使用规范
SVN使用规范
2022-07-03 16:07:00 【星哥玩云】
1.提交必须写明注释
清晰的提交注释有助于别人理解你所做的修改,出现问题时能够快速定位,也有助于项目经理把握开发进度。所以,在提交代码时,要填写明晰的标注,能够概要的描述所提交文件的信息,让项目组其他成员在看到标注后不用详细看代码就能了解你所做的修改。
2.禁止提交未编译通过的代码
代码在提交之前,首先要确认自己能够在本地编译,保证主干永远是畅通的。如果引用了新的文件,要确保所用引用的文件一起提交。
- 代码通过单元测试
- 程序启动正常
3.不要提交自己不明白的代码
代码在提交入SVN之后,这样代码将被项目成员所分享。如果提交了自己不明白的代码,你看不懂,别人也看不懂,这将会成为项目质量的隐患。因此在引入任何第三方代码之前,确保你对这个代码有一个很清晰的了解。
3.不要提交自己的临时测试代码
提交到SVN的代码是比较正式的代码,和其他成员共享,自己的临时测试代码提交前要注释掉,做到不影响其他成员的开发。
4.不要提交本地自动生成文件
开发工具会自动生成一些工程等文件,以及项目编译生成的临时文件等等。提交了这样的文件后,别人在更新后就可能与本地的环境冲突从而影响大家的工作。
由于SVN是在公网上,所以上传这些文件会过于累赘,影响提交及其他成员更新源码的速度,也白白浪费SVN服务器的空间资源。
5.按功能模块整体提交,提交不要过于频繁
完成一个功能模块后,将该模块相关修改作为整体提交。不宜分离过于频繁提交,导致功能上不同步。
6.提交前,先更新再提交
在提交之前先做一次更新操作,这样可以有效防止本地修改的文件产生冲突。
另一个可能就是提交成功了,但会覆盖了前一次其他成员的提交数据。
7.提交后可以就近让方便的同事及时更新
让同事及时更新下来,把代码编译一次,确保程序跑起来。
如果有问题,及时修正缺失遗漏的文件,及修正错误,避免错误造成太大的影响。
8.慎用锁定功能
在项目中要慎用锁定的功能,在你锁定了一个文件之后别人就无法继续修改提交该文件,虽然可以减少冲突的发生率,但是可能会影响项目组中其他人员的工作。平时只有在编辑那些无法合并的文件时(非文本文件),才适当的采用锁定操作。
边栏推荐
- Advanced Mathematics (Seventh Edition) Tongji University exercises 2-1 personal solutions
- Hibernate的缓存机制/会话级缓存机制
- Go language self-study series | if else if statement in golang
- Slam learning notes - build a complete gazebo multi machine simulation slam from scratch (4)
- [web security] - [SQL injection] - error detection injection
- Use percent sign in CString
- Shell script import and export data
- 疫情常态化大背景下,关于远程办公的思考|社区征文
- 利用MySQL中的乐观锁和悲观锁实现分布式锁
- 1287. Elements that appear more than 25% in an ordered array
猜你喜欢
![[proteus simulation] 8 × 8LED dot matrix screen imitates elevator digital scrolling display](/img/46/c7f566f8fd46d383b055582d680bb7.png)
[proteus simulation] 8 × 8LED dot matrix screen imitates elevator digital scrolling display

探索Cassandra的去中心化分布式架构

Initial test of scikit learn Library

From the 18th line to the first line, the new story of the network security industry

Mixlab编辑团队招募队友啦~~

The accept attribute of the El upload upload component restricts the file type (detailed explanation of the case)

Redis在Windows以及Linux系统下的安装
![[系统安全] 四十三.Powershell恶意代码检测系列 (5)抽象语法树自动提取万字详解](/img/cd/00954b9c592c253d42e6a3b8298999.jpg)
[系统安全] 四十三.Powershell恶意代码检测系列 (5)抽象语法树自动提取万字详解

“用Android复刻Apple产品UI”(2)——丝滑的AppStore卡片转场动画

The mixlab editing team is recruiting teammates~~
随机推荐
Using optimistic lock and pessimistic lock in MySQL to realize distributed lock
坚持输出需要不断学习
Automatic generation of client code from flask server code -- Introduction to flask native stubs Library
[combinatorics] summary of combinatorial identities (eleven combinatorial identities | proof methods of combinatorial identities | summation methods)*
Go语言自学系列 | golang switch语句
Subclass hides the function with the same name of the parent class
大csv拆分和合并
SDNU_ ACM_ ICPC_ 2022_ Winter_ Practice_ 4th [individual]
[proteus simulation] 74hc595+74ls154 drive display 16x16 dot matrix
Stm32f103c8t6 firmware library lighting
2022年Q2加密市场投融资报告:GameFi成为投资关键词
Use percent sign in CString
Nine ways to define methods in scala- Nine ways to define a method in Scala?
Hibernate的缓存机制/会话级缓存机制
Find mapping relationship
[list to map] collectors Tomap syntax sharing (case practice)
How to thicken the brush in the graphical interface
App移动端测试【3】ADB命令
Three dimensional reconstruction of deep learning
初试scikit-learn库