日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 编程问答 >内容正文

编程问答

版本控制之SVN

發(fā)布時(shí)間:2023/12/4 编程问答 41 豆豆
生活随笔 收集整理的這篇文章主要介紹了 版本控制之SVN 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
SVN在windows下有很不錯(cuò)GUI可以用,如果在linux可以 使用命令行,下面的介紹摘自http://www.divvun.no/doc/tools/docu-svn-user.htm
工作其實(shí)還會(huì)試用git svn,這個(gè)比較復(fù)雜,暫時(shí)沒發(fā)現(xiàn)有GUI可以用,都是命令,所以了解一些命令還是很有用的;

svn on the command line

To?check out?means that you copy all the documents that our projects are working on to your computer.

The first commands

Go to your home directory (write?cd), and give the following command:

svn co https://victorio.uit.no/langtech/trunk main --username <your_username>

... where you have replaced <your_username> with the username you have aquired from the admin. This will enable you to check in your work. If you don't have a user name or just want to browse our code, just skip the username.

After you have checked out, please run the following script, and follow the on-screen instructions:

main/gt/script/gtsetup.sh

With the above commands, you have now on your local computer a copy of the source code and the environment is set up properly.

Frequently used commands

Now that you have checked out your repository, you can use a set of commands to manipulate your copy of the source code. We recommend to always?update?the repository before you begin to edit files inside it. After having edited some files you usually want to have an overview of which files have been?modified. To share our work with the others we?check in?our work. We can also?add,?delete,?move?and?copy?files inside the repository. A brief overview of the commands needed for these actions is given below, for further details see the references at the end of this document.

Update your working copy
svn up
Scedule a file for addition
svn add filename
Scedule a file for deletion
svn delete filename
You may also copy and move files and directories with these two commands, but read about them in the svn book first:
svn copy filename
svn move filename
Examine your changes
svn status
Examine the file history
svn log FILE
Change the commit message for a specific revision
svn propedit svn:log --revprop -r REV FILE?
This will bring up the existing log text for the specified revision in your default editor (typically Emacs), where you can edit and change it as you want. This is useful if you accidentally committed some changes with an empty or uninformative log message.
Compare your modified file to the version in the repository
svn diff FILE
Compare some earlier versions, say here versions 123 and 120
svn diff -r 123:120 FILE
Undo your local changes (ie revert to the repository status)
svn revert FILE
Resolve Conflicts (Merge Others' Changes)
svn update
svn resolved
Commit your changes
svn ci -m "Your description of the changes here." FILE?
(Note that the above changes, add, delete, copy, move, must all be committed by ci in order to take effect)

Ignoring items

The Subversion?svn:ignore?property is very similar in syntax and function to the CVS?.cvsignore?file. In fact, if you are migrating a CVS working copy to Subversion, you can directly migrate the ignore patterns by using the?.cvsignore?file as input file to the?svn propset?command:

$ svn propset svn:ignore -F .cvsignore . property 'svn:ignore' set on '.' $

More details about ignoring files can be found in?Chapter 3: Advanced Topics, in the section?Ignoring Unversioned Items, in the?SVN book.

Daily routines

  • Update in the morning, and allways before you check in.
  • Always check in the files at the end of the day.
  • If you know that other people are working on the same file, you should check in several times a day.
  • Check in after you have done major revisions.
  • Remember to compile the program before you check in, so that you know you do not check in a defect file.

What do I write in the log message

The best way to learn to write good log messages is to read other log messages. Pick a file (e.g. twol-sme.txt, sme-lex.fst), and read the log (the command is?svn log filename | less). If the log message tells you what you want to know, then it is a good log message.

In svn it is possible to edit and correct bad log messages. See the list of useful commands above for how to do this.

Further reading

The?Basic work cycle?in the?SVN book?covers daily usage in great detail.?Appendix B?covers some details for users accustomed to CVS.

The?RapidSVN wiki?has a?tutorial?that covers our daily usage pattern.

轉(zhuǎn)載于:https://www.cnblogs.com/avenwu/archive/2012/06/24/2559900.html

總結(jié)

以上是生活随笔為你收集整理的版本控制之SVN的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。