svn switch的用法

由于服务器地址变更,SVN的操作会受到影响。之前的working copy,请在根目录下使用svn switch切换服务器地址。
 
svn switch的用法如下:
 
switch (sw): Update the working copy to a different URL.
usage: 1. switch URL[@PEGREV] [PATH]
       2. switch --relocate FROM TO [PATH...]

  1. Update the working copy to mirror a new URL within the repository.
     This behavior is similar to 'svn update', and is the way to
     move a working copy to a branch or tag within the same repository.
     If specified, PEGREV determines in which revision the target is first
     looked up.
 
     If --force is used, unversioned obstructing paths in the working
     copy do not automatically cause a failure if the switch attempts to
     add the same path.  If the obstructing path is the same type (file
     or directory) as the corresponding path in the repository it becomes
     versioned but its contents are left 'as-is' in the working copy.
     This means that an obstructing directory's unversioned children may
     also obstruct and become versioned.  For files, any content differences
     between the obstruction and the repository are treated like a local
     modification to the working copy.  All properties from the repository
     are applied to the obstructing path.
 
     Use the --set-depth option to set a new working copy depth on the
     targets of this operation.
 
  2. Rewrite working copy URL metadata to reflect a syntactic change only.
     This is used when repository's root URL changes (such as a scheme
     or hostname change) but your working copy still reflects the same
     directory within the same repository.
 
以solution/sc8810/branches/GC为例,在working copy的根目录下:
 
1) 查看以前的版本库目录:
lyf@ntd-home:~/sc8810/GC$ svn info
Path: .
URL: svn://172.16.1.27/solution/sc8810/branches/GC
Repository Root: svn://172.16.1.27/solution/sc8810
Repository UUID: a3d0e4bb-684d-4f22-b509-0e5f8c0de5bb
Revision: 1346
Node Kind: directory
Schedule: normal
Last Changed Author: ZCL
Last Changed Rev: 1345
Last Changed Date: 2012-11-09 16:39:04 +0800 (浜? 09 11?2012)
 
2) 执行svn switch命令切换版本库:
svn switch --relocate svn://172.16.1.27/solution/sc8810/branches/GC svn://172.16.2.53/solution/sc8810/branches/GC --username xxx --password xxx
 
3) 查看切换后的版本库目录:
lyf@ntd-home:~/sc8810/GC$ svn info
Path: .
URL: svn://172.16.2.53/solution/sc8810/branches/GC
Repository Root: svn://172.16.2.53/solution/sc8810
Repository UUID: a3d0e4bb-684d-4f22-b509-0e5f8c0de5bb
Revision: 1346
Node Kind: directory
Schedule: normal
Last Changed Author: ZCL
Last Changed Rev: 1345
Last Changed Date: 2012-11-09 16:39:04 +0800 (浜? 09 11?2012)
...
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值