Category - SCM-tool

? gitlab ?    2019-01-17 11:46:46    1324    1    0
? accurev ?    2019-01-11 16:23:16    2496    0    0

基本概念

Workspace    - Private developer work area.

Stream          - Configuration of related elements. Code may be promoted into or inherited from streams.

Depot            - Main repository on a server for all related source code.

Snapshot       - Static (protected) stream that cannot be moved, renamed, or altered 

? gitlab ?    2019-01-11 16:22:44    1633    0    2
? accurev ?    2019-01-11 16:22:44    2806    0    0

系统: ubuntu 14

场景 :安装软件 Accurev 

依赖: java

遇见的问题及解决:

jdk 已经安装,路径也全部配置正确,但是安装程序仍报以下错误:

./AccuRev_6_0_2_LinuxClientOnly_x86_2_4.bin: 3420: exec: /tmp/install.dir.4419/Linux/resource/jre/bin/java: not found 

? bugzilla ?    2019-01-11 16:22:44    2374    1    0

 

1. 修改密码

Preferences  --> Name and Password

可以修改密码,姓名,邮箱地址

? bugzilla ? ? python ?    2019-01-11 16:22:44    1169    0    0

需求:

1. 根据bug list 导出表格

2. 指定显示固定字段

3.使用bugzilla 自有的导出CSV 格式

 

思路:

1. bugzilla 导出查询结果的功能已有,可以直接在页面点击csv , 通过浏览器直接下载表格。

2. 需求转化为如何生成下载csv 的url 。

3. 取一个url 进行分析 ,抽取其中的 bug list 和固定字段 进行切割,使下载链接模板化。

4. 使用bug list 和固定字段作为参数,对url 模板进行实例化。

5. 其他: 模拟浏览器 ,进行登录,下载 。

6. 扩展: 修改值,提交修改。

? gitlab ?    2019-01-11 16:21:47    621    0    0

git 常用操作

参考 https://git-scm.com/book/zh/v2


 
配置credential.helper

每次与git做通讯时,需要输入用户密码,记住密码的方式如下:

 
  1. git config --global credential.helper store
 
此时查看配置
 
  1. git config --list
  2. ##可见一行credential.helper=store
  3. ##表示认证信息将会存储


.................

? gitlab ?    2019-01-11 16:21:47    1159    0    0
 
 

redhat 安装 git 图形化工具 gitk

 
  1. yum install gitk
  2. ##安装过程yum 会自动检测依赖的软件是否安装及版本是否匹配,并进行依赖安装或升级

.........

? svn ? ? shell ?    2019-01-11 16:17:34    4968    1    0

Linux 端的svn 定时自动提交

 如果一个提交操作是定向定时的重复动作,我们可以把commit 的操作和参数对象抽象出来,封装在脚本中执行。并将脚本配置在crontab 中定时执行。


 

commit 操作解析

1. 当前workcopy 里各文件的状态 : svn stat


 

2. 当前状态分析:

?     Tests/dxj/case 1.1.1.test

!     Tests/dxj/modify sgw

M     Tests/dxj/modify sgw

? 表示新增文件,需要用svn add file 加入版本控制标识,才能使用commit 默认提交 。

!表示本地已删除的受控文件,需要用svn delete file 加入版本控制标识,才能使用commit 默认提交 。

M表示本地与上次更新的文件比较有修改,会默认在commit 的时候提交


 

3. 分离不同状态的文件并获取列表:

     svn st | grep "? \+" | sed "s/? \+//" > $Add_File

     "? \+" 表示匹配"?问号及其后的连续空格"。正则式 + 用转义符 \+ 表示多次匹配前一个字符,前一个字符是空格。

     sed "s/? \+//" :sed "s/A/B/"  表示用B 替换A 。 这里A="?问号及其后的连续空格" ,B=空, 即去掉前面一截,只保留文件列表 ,并写到$Add_File中


 

4. 把列表中的文件传给svn add 命令,加入版本控制:

     cat $Add_File | xargs svn add >>$LogFile

     为文件添加版本控制标识,命令为 svn add filename 。

     这里用管道|接收上一个命令cat 的结果,并用xargs 把前面的结果做为后一个命令的参数。


 

5. 带参数commit

     svn ci -m 'auto commit by script' --username svnmgr --password xxx >>$LogFile

     ci 表示 commit 

     -m  后面用引号加上 massage 

     --username 用户名

     --password 密码


 

crontab 配置

> crontab -e  

进行编辑定时任务列表,加入一行

10 5

3/3