Cornerstone 拉分支 命令版

创建新分支

svn cp -m "名称" +空格+项目的svn地址 +空格+拷贝后的地址


svn cp -m "报价新分支" https://xxx@xxx/svn/Bihuwalking/iosApp/BHGlaucus https://xxx@xxx/svn/Bihuwalking/iosApp/BHGlaucus_1

 

项目编译执行后发现了一个问题,我之前主干上的代码并不是最新的,怎么办呢?

先到主干的工作目录下,将代码全部提交,

然后怎么更新到分支呢?难道要重新创建分支吗?不是,可以从主干合并到分支

 

从主干合并到分支

切换到分支目录下:

cd BHGlaucuss_1

执行;

svn merge https://xxx@xxx/svn/Bihuwalking/iosApp/BHGlaucus

冲突合并提示:

Summary of conflicts:
 Text conflicts: 1
Conflict discovered in file 'Glaucus/Managers/BHDataConfig.h'.
Select: (p) postpone, (df) show diff, (e) edit file, (m) merge,
       (mc) my side of conflict, (tc) their side of conflict,
       (s) show all options: tc
Resolved conflicted state of 'Glaucus/Managers/BHDataConfig.h'
Summary of conflicts:
 Text conflicts: 0 remaining (and 1 already resolved)

选择了 tc.

 

 

合并分支到主干

和从主干到分支一样简单

进入主干的工作目录 执行命令

svn merge --reintegrate https://xxx@xxx/svn/Bihuwalking/iosApp/BHGlaucus_1

 

 

报错 

svn:E155036:工作副本工作副本 'E:\Workspaces\XXX\XXX’格式太旧(格式 10,Subversion1.6创建)

 

cd 到对应目录

svn upgrade

  

报错

Cannot merge into mixed-revision working copy [1308:1309]; try updating first
1

 解决方式

svn update --ignore-externals

  

 报错

can't be accessed because the working copy's format is not supported
 
appears to be part of a subversion 1.7 or great working copy. please upgrade your subversion client to use this 

 解决方式

重新cheak out  然后Format选择 比较高的版本 比如我现在是1.8(2017/11/21) 然后合并代码就可以了

  

 

posted @ 2017-07-24 19:52  xuanInitial  阅读(1307)  评论(0编辑  收藏  举报