我的指令:
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...]Description
This 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. See
the section called “Switching a Working Copy”
for an in-depth look at switching.
Alternate Names
sw
Changes
Working copy
Accesses Repository
Yes
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 to
vendors-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 the
svn 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 test
A 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 just
svn switch
.
-
If the working copy still reflects the same repository directory, but the location of the repository itself has changed, then use
svn switch --relocate
.
回退(revert)到某一版本(方法2)马克- to-win:马克 java社区:防盗版实名手机尾号: 73203
马克-to-win:假设现在我们最新版本是14,但是我们想回到10版本开发。我们有另一方案可以选择,见上图的第一图,
switch
to Revision 10,这样项目可以切换到版本10,但是不能提交,必须还得与资源库同步update更新一次
服务器
。之后再像上面一样,一个一个文件的compare with/修订版,再获取内容。马克-to-win:两种方法的实现原理不一样:第一种方法是在最新的版
在做项目的时候,
svn
更新或者提交的时候可能出现
Error:
svn
: E155004: There are unfinished work items in 'E:\xxx\intellij_work\Trunk'; run '
svn
cleanup' first.
原因不清楚,自己猜测可能是在idea更新项目的时候,因为网络或者电脑卡顿或者我们人为的将其打断,导致更新项目失败,
svn
对文件
subversion error options of ‘https://你的
svn
地址
’: Server certificate verification faild: certificate issued for a different hostname, issuer is not trusted(ht...
在建立项目版本库时,可首先建好项目文件夹,并在其中建立trunk, branches, tags三个空的子目录。这样在trunk中开始进行开发
trunk是主分支,是日常开发进行的地方。
branches是分支。一些阶段性的release版本,这些版本是可以继续进行开发和维护的,则放在branches目录中。又比如为不同用户客制化的版本,也可以放在分支中进行开发。
tags目录一般...
1. 隐藏文件.
svn
目录删除了怎么办
Checkout后,
工作
空间下.
svn
目录下有大量隐藏文件,占用比较大的空间,他们是
工作
空间的管理文件,不能删除,如果不小心删除了也不要抓狂,不会影响
服务器
端的,重新checkout就又可以
工作
了。如果想不包含这些隐藏文件导出,可以用T
SVN
菜单里的export完成。
2.文件名大小写
问题
,在下载代码时,下载到一半,系统提示不能找到……文件,
idea集成
svn
提交出现 E55007 或E155010 xxx is not a working copy 或者is scheduled for addition, but is missing
bug 样子
11:24 Commit failed with error
0 files committed, 78 files failed to commit: 工程调整,抽取mybatis plus配置,通用配置类提出
svn
: E155007: ‘D:\esp\communication\a
百度很多
解决
Path is not a working copy directory的方法,唯一一个觉得很好的
解决
方法是http://hi.baidu.com/leige87/item/b9aff86d17d6f61ca1cf0fcb这个说的办法,
在其他目录下创建一个文件夹,然后CheakOut出你的project,然后导入到你的eclipse中就可以了。
-----------
由于
服务器
地址
变更,
SVN
的操作会受到影响。之前的working copy,请在根目录下使用
svn
switch
切换
服务器
地址
。
svn
switch
的用法如下:
switch
(sw): Update the working copy to a different URL.
usage: 1.
switch
URL[@PEGREV] [PATH]
2. swit
由于公司业务的需要,新购买了一批机器,那么面临着的就是
svn
等一系列东西进行迁移的
问题
,在
svn
迁移以后,本地的
svn
代码在切换时出现了
SVN
Error: 旧
服务器
地址
is not the same repository as 新
服务器
地址
的
问题
。
二、
解决
办法
在eclipse中进行该项操作总是会报这个错误。最后经查资料通过以下方式得到
解决
:
1.安...
由于
SVN
服务器
IP变化,所以项目需要迁移,但Relocate的过程中出了
问题
:
SVN
Error: xxx is not the same repository as xxx,只不过是IP变了,居然出现这样的错误。其中一个项目是IP发生变化之后又进行了操作,添加了一些文件,出现
问题
也能理解;但是什么都没有动的项目也出现这样的
问题
。M0W编程技术_踩坑日志_进阶指南_无知人生M0W编程技术_踩坑日...