gpt4 book ai didi

SVN : how to create a branch from certain revision of trunk

转载 作者:行者123 更新时间:2023-12-03 04:38:56 31 4
gpt4 key购买 nike

以下操作只会从主干的头部修订版创建分支。如何从特定修订版创建分支?谢谢。

$ svn copy http://svn.example.com/repos/calc/trunk \
http://svn.example.com/repos/calc/branches/my-calc-branch \
-m "Creating a private branch of /calc/trunk."

最佳答案

查看帮助命令:

svn help copy

-r [--revision] arg : ARG (some commands also take ARG1:ARG2 range)
A revision argument can be one of:
NUMBER revision number
'{' DATE '}' revision at start of the date
'HEAD' latest in repository
'BASE' base rev of item's working copy
'COMMITTED' last commit at or before BASE
'PREV' revision just before COMMITTED

要使用您的示例在命令行上实际指定它:

svn copy -r123 http://svn.example.com/repos/calc/trunk \
http://svn.example.com/repos/calc/branches/my-calc-branch

其中 123 是您要复制的主干中的修订号。正如其他人所指出的,您还可以使用 @ 语法。就我个人而言,我更喜欢将修订号 # 与 URL 更清晰地分开。

正如帮助中所述,您也可以用某些单词替换修订号:

svn copy -rPREV http://svn.example.com/repos/calc/trunk \
http://svn.example.com/repos/calc/branches/my-calc-branch

将复制“提交之前的修订”。

关于SVN : how to create a branch from certain revision of trunk,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2331841/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com