svn switch解决svn服务器地址改变工作拷贝问题我的指令:
来源:互联网 发布:同名文件查找软件 编辑:程序博客网 时间:2024/04/30 03:15
svn switch解决svn服务器地址改变工作拷贝问题
svn sw --relocate svn://192.168.1.144/device/branches svn://192.168.1.56/device/branches .Name
svn switch — Update working copy to a different URL.
Synopsissvn switch URL [PATH]switch --relocate FROM TO [PATH...]DescriptionThis subcommand updates your working copy to mirror a new URL—usually a URL which shares a common ancestor with your working copy, although not necessarily. This is the Subversion way to move a working copy to a new branch. Seethe section called “Switching a Working Copy” for an in-depth look at switching.
Alternate Namessw
ChangesWorking copy
Accesses RepositoryYes
Switches--revision (-r) REV--non-recursive (-N)
--quiet (-q)
--diff3-cmd CMD
--relocate
--username USER
--password PASS
--no-auth-cache
--non-interactive
--config-dir DIRExamples
If you're currently inside the directory vendors which was branched tovendors-with-fix and you'd like to switch your working copy to that branch:
$ svn switch http://svn.red-bean.com/repos/branches/vendors-with-fix .U myproj/foo.txt
U myproj/bar.txt
U myproj/baz.c
U myproj/qux.c
Updated to revision 31.
And to switch back, just provide the URL to the location in the repository from which you originally checked out your working copy:
$ svn switch http://svn.red-bean.com/repos/trunk/vendors .U myproj/foo.txt
U myproj/bar.txt
U myproj/baz.c
U myproj/qux.c
Updated to revision 31.Tip
You can just switch part of your working copy to a branch if you don't want to switch your entire working copy.
Sometimes an administrator might change the “base location” of your repository—in other words, the contents of the repository doesn't change, but the main URL used to reach the root of the repository does. For example, the hostname may change, the URL scheme, or any part of the URL which leads to the repository itself. Rather than checkout a new working copy, you can have thesvn switch command “rewrite” the beginnings of all the URLs in your working copy. Use the--relocate option to do the substitution. No file contents are changed, nor is the repository contacted. It's similar to running a Perl script over your working copy.svn/ directories which runs s/OldRoot/NewRoot/.
$ svn checkout file:///tmp/repos testA test/a
A test/b
…
$ mv repos newlocation
$ cd test/
$ svn update
svn: Unable to open an ra_local session to URL
svn: Unable to open repository 'file:///tmp/repos'
$ svn switch --relocate file:///tmp/repos file:///tmp/newlocation .
$ svn update
At revision 3.Warning
Be careful when using the --relocate option. If you mistype the argument, you might end up creating nonsensical URLs within your working copy that render the whole workspace unusable and tricky to fix. It's also important to understand exactly when one should or shouldn't use --relocate. Here's the rule of thumb:
If the working copy needs to reflect a new directory within the repository, then use justsvn switch.
If the working copy still reflects the same repository directory, but the location of the repository itself has changed, then usesvn switch --relocate.
- svn switch解决svn服务器地址改变工作拷贝问题我的指令:
- svn 的服务器地址改变
- svn的服务器地址改变后如何修改
- SVN 服务器安装问题的解决过程
- 修改svn服务器地址(不改变svn数据)
- svn如何使用import目录作为工作拷贝+我的svn学习笔记
- svn如何使用import目录作为工作拷贝+我的svn学习笔记
- 关于服务器svn位置改变的解决流程
- svn 查看项目的 svn 服务器地址
- 解决SVN服务器更改ip地址后,本地svn重新连接问题
- SVN 服务器地址的变更
- svn地址改变,提交
- svn地址改变处理
- 我的SVN工作模式
- xcode更新svn地址 switch svn url
- 轻松解决svn服务器ip改变后,eclipse如何改变?
- svn服务器ip地址冲突后,无法连接的问题
- SVN地址命名的问题
- C语言中mysql查询
- myEclipse 注册码在线生成
- ExtJS的使用方法汇总3——树形结构
- 条件熵 信息增益
- Lisp 语言: Emacs和Slime的配置
- svn switch解决svn服务器地址改变工作拷贝问题我的指令:
- 一个ajax做的联想查询文本框
- 修改时区不用重启
- Select at least one project解决办法
- 【小蒙淘金】1.11金评-黄金白银分析及部分操作建议
- Android的Service && service 的开机自启动 && service被杀死后自启动 && service中动态定义receiver接收broadcast
- C++的沉迷与爱恋(侯捷)
- WORD域代码详解
- WinCE6.0HIVE注册表