Pet*_*ikh 26 svn command-line branch copy command-line-arguments
到目前为止,我看到的所有svn分支的例子都是这样的
svn cp -m 'Making test branch' svn://svnrepo/hellosite svn://svnrepo/hellosite2
所以为了分支,我需要每次都指定远程存储库的完整URL.但:
那么为什么我每次都要输入完整的URL?!! 或者我会错过什么?是否有一些允许引用当前远程存储库的快捷方式?就像是
svn cp -m 'Making test branch' //hellosite //hellosite2
Rup*_*Rup 44
使用SVN 1.6或更高版本,如果您当时在工作副本中,则可以使用插入符号作为存储库根目录的快捷方式,例如
svn cp -m 'Making test branch' ^/trunk ^/branches/hellosite
Run Code Online (Sandbox Code Playgroud)
请注意,在Windows上至少你需要^/trunk用双引号括起来以通过shell.
svn cp -m "Making test branch" "^/trunk" "^/branches/hellosite"
Run Code Online (Sandbox Code Playgroud)