???SVN???SVN???trunk???branches???tag??????????????????????????????
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了???SVN???SVN???trunk???branches???tag??????????????????????????????相关的知识,希望对你有一定的参考价值。
?????????top ???????????? rom code strong ?????? info this svn?????????
svn????????????????????????????????????????????????trunk???branches???tags?????????????????????trunk??????????????????????????????branches???????????????????????????tags???????????????????????????????????????????????????
tags????????????branches???????????????????????????????????????????????????branches??????????????????????????????????????????tags??????????????????????????????????????????????????????
??????tags????????????????????????????????????????????????Release0.91???Release1.23???
1?????????????????????????????????????????????????????????????????????????????????trunk???branches???tags????????????
?????????????????????????????????????????????????????????????????????????????????trunk, branches, tags?????????????????????????????????trunk?????????????????????
trunk????????????????????????????????????????????????
branches??????????????????????????????release????????????????????????????????????????????????????????????????????????branches????????????????????????????????????????????????????????????????????????????????????????????????
tags?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
2.????????????????????????????????????????????????
1.??????????????????????????????
[[email protected]_0_12_centos repository]# svnadmin create ./danger??????#???????????? [[email protected]_0_12_centos repository]# ls ./danger/????????????????????????#?????????????????? conf db format hooks locks README.txt
2.???????????????????????????????????????????????????????????????(??????conf????????????????????????:)
authz???????????????????????????????????????????????????????????????
passwd?????????????????????????????????????????????
svnserve.conf???svn?????????????????????
authz???????????????????????????????????????r??????????????????w???????????????:
passwd???????????????????????????????????????
?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
?????? = ??????
?????????admin = 123456
??????svnserve.conf????????????????????????????????????????????????????????????
3.?????????????????????????????????trunk???tags???branches??????:
[email protected]1535 MINGW64 ~/Desktop/svnproject $ svn co svn://qiaoliqiang.cn:3690/danger??????#????????????????????????svn checkout url Checked out revision 0. [email protected]-1535 MINGW64 ~/Desktop/svnproject $ ls danger/
?????????????????????????????????SVN?????????:
[email protected]1535 MINGW64 ~/Desktop/svnproject $ cd danger/ [email protected]-1535 MINGW64 ~/Desktop/svnproject/danger $ ls [email protected]-1535 MINGW64 ~/Desktop/svnproject/danger $ mkdir trunk branches tags??????????????????#?????????????????? [email protected]-1535 MINGW64 ~/Desktop/svnproject/danger $ ls branches/ tags/ trunk/
[email protected]1535 MINGW64 ~/Desktop/svnproject/danger $ svn add *??????????????????#?????????????????? A branches A tags A trunk [email protected]-1535 MINGW64 ~/Desktop/svnproject/danger $ svn ci -m "add 3 dirs"??????#?????????????????????????????????svn commit -m "xxx" Adding branches Adding tags Adding trunk Committed revision 1.
4.????????????trunk???????????????trunk????????????????????????????????????:
[email protected]1535 MINGW64 ~/Desktop/svnproject/danger $ svn diff??????????????????#????????????????????? Index: trunk/myProject/test.txt =================================================================== --- trunk/myProject/test.txt (revision 0) +++ trunk/myProject/test.txt (working copy) @@ -0,0 +1 @@ +111 [email protected]-1535 MINGW64 ~/Desktop/svnproject/danger $ svn ci -m "add a file"??????????????????#?????????????????? Adding trunkmyProject Adding trunkmyProject est.txt Transmitting file data . Committed revision 2.
5.????????????????????????????????????????????????:
[email protected]1535 MINGW64 ~/Desktop/svnproject/danger $ svn cp svn://qiaoliqiang.cn:3690/danger/trunk svn://qiaoliqiang.cn:3690/danger/branches/qlqbranch -m "add qlqbranch"??????#???????????? Committed revision 3.
svn cp ????????? svn copy
[email protected]1535 MINGW64 ~/Desktop/svnproject/danger $ svn switch svn://qiaoliqiang.cn:3690/danger/branches/qlqbranch svn: E195012: Path ???.??? does not share common version control ancestry with the requested switch location. Use --ignore-ancestry to disable this check. svn: E195012: ???svn://qiaoliqiang.cn/danger/branches/qlqbranch??? shares no common ancestry with ???C:UsersAdministratorDesktopsvnprojectdanger??? [email protected]-1535 MINGW64 ~/Desktop/svnproject/danger $ svn switch svn://qiaoliqiang.cn:3690/danger/branches/qlqbranch --ignore-ancestry??????#???????????????qlqbranch D tags D trunk D branches A myProject A myProject est.txt Updated to revision 3. [email protected]-1535 MINGW64 ~/Desktop/svnproject/danger $ ls myProject/
???????????????????????????????????????
[email protected]1535 MINGW64 ~/Desktop/svnproject/danger $ svn switch svn://qiaoliqiang.cn:3690/danger/trunk --ignore-ancestry #??????????????????
??????????????????svn info????????????????????????????????????
$ svn info #??????url?????????????????????????????? Path: . Working Copy Root Path: C:UsersAdministratorDesktopsvnprojectdanger URL: svn://qiaoliqiang.cn/danger/branches/qlqbranch?????? Relative URL: ^/branches/qlqbranch Repository Root: svn://qiaoliqiang.cn/danger Repository UUID: 5fd66061-fba7-44bc-bfef-b078c6e4d2c6 Revision: 4 Node Kind: directory Schedule: normal Last Changed Author: qiaolq Last Changed Rev: 4 Last Changed Date: 2018-07-19 16:03:42 +0800 (????, 19 7?? 2018)
6.??????????????????????????????
???????????????????????????????????????
[email protected]1535 MINGW64 ~/Desktop/svnproject/danger $ svn diff Index: myProject/test.txt =================================================================== --- myProject/test.txt (revision 3) +++ myProject/test.txt (working copy) @@ -1 +1,7 @@ 111 +111 +111 +111 +111 +111 +111 [email protected]-1535 MINGW64 ~/Desktop/svnproject/danger $ svn ci -m "qlqbranch modify test.txt" Sending myProject est.txt Transmitting file data . Committed revision 4.
????????????????????????????????????????????????????????????:
[email protected]1535 MINGW64 ~/Desktop/svnproject/danger $ svn switch svn://qiaoliqiang.cn:3690/danger/trunk --ignore-ancestry??????#????????????????????? U myProject est.txt Updated to revision 4. [email protected]-1535 MINGW64 ~/Desktop/svnproject/danger $ cat ./myProject/test.txt??????????????????#???????????? 111 [email protected]-1535 MINGW64 ~/Desktop/svnproject/danger $ svn switch svn://qiaoliqiang.cn:3690/danger/branches/qlqbranch --ignore-ancestry??????#?????????qlqbranch?????? U myProject est.txt Updated to revision 4. [email protected]-1535 MINGW64 ~/Desktop/svnproject/danger??????????????????#???????????? $ cat ./myProject/test.txt 111 111 111 111 111 111 111
7. ??????qlqbranch?????????trunk??????
- ????????????????????????????????????????????????
[email protected]1535 MINGW64 ~/Desktop/svnproject/danger $ svn switch svn://qiaoliqiang.cn:3690/danger/trunk --ignore-ancestry #???????????? At revision 4.
$ svn info??????#??????????????????url?????????url???????????????????????? Path: . Working Copy Root Path: C:UsersAdministratorDesktopsvnprojectdanger URL: svn://qiaoliqiang.cn/danger/trunk Relative URL: ^/trunk Repository Root: svn://qiaoliqiang.cn/danger Repository UUID: 5fd66061-fba7-44bc-bfef-b078c6e4d2c6 Revision: 4 Node Kind: directory Schedule: normal Last Changed Author: qiaolq Last Changed Rev: 2 Last Changed Date: 2018-07-19 15:54:21 +0800 (????, 19 7?? 2018)
- ????????????????????????????????????(r3???????????????????????????????????????3???????????????????????????3?????????????????????)
[email protected]1535 MINGW64 ~/Desktop/svnproject/danger $ svn log --verbose --stop-on-copy | tail -10 M /branches/qlqbranch/myProject/test.txt qlqbranch modify test.txt ------------------------------------------------------------------------ r3 | qiaolq | 2018-07-19 15:57:37 +0800 (????, 19 7?? 2018) | 1 line Changed paths: A /branches/qlqbranch (from /trunk:2) add qlqbranch
- ??????qlqbranch?????????????????????
[email protected]1535 MINGW64 ~/Desktop/svnproject/danger $ svn merge -r 3:4 svn://qiaoliqiang.cn/danger/branches/qlqbranch #???????????????svn merge oldver:newver oldurl
8.????????????tag(??????copy)
- ??????tag
[email protected]1535 MINGW64 ~/Desktop/svnproject/danger $ svn copy svn://qiaoliqiang.cn:3690/danger/trunk svn://qiaoliqiang.cn:3690/danger/tags/release-1.0 -m "1.0released" Committed revision 5.
- ?????????tag??????
[email protected]1535 MINGW64 ~/Desktop/svnproject/danger $ svn switch svn://qiaoliqiang.cn:3690/danger/tags/release-1.0 --ignore-ancestry #???????????????tag U myProject est.txt Updated to revision 5. [email protected]-1535 MINGW64 ~/Desktop/svnproject/danger $ svn info??????????????????#???????????????????????? Path: . Working Copy Root Path: C:UsersAdministratorDesktopsvnprojectdanger URL: svn://qiaoliqiang.cn/danger/tags/release-1.0 Relative URL: ^/tags/release-1.0 Repository Root: svn://qiaoliqiang.cn/danger Repository UUID: 5fd66061-fba7-44bc-bfef-b078c6e4d2c6 Revision: 5 Node Kind: directory Schedule: normal Last Changed Author: qiaolq Last Changed Rev: 5 Last Changed Date: 2018-07-19 16:38:49 +0800 (????, 19 7?? 2018)
以上是关于???SVN???SVN???trunk???branches???tag??????????????????????????????的主要内容,如果未能解决你的问题,请参考以下文章
SVN中trunk,branches,tags用法详解[重要]
SVN中trunk,branches,tags的使用明细--项目代码的管理