<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    空間站

    北極心空

      BlogJava :: 首頁 :: 聯(lián)系 :: 聚合  :: 管理
      15 Posts :: 393 Stories :: 160 Comments :: 0 Trackbacks

    SVN安裝和使用

    SVN的安裝

    訪問SVN網站下載你所需版本的安裝包。以Linux為例,安裝過程為依次執(zhí)行以下步驟:
    rpm -ivh apr-0.9.5-0.2.i386.rpmrpm -ivh apr-util-0.9.5-0.1.i386.rpmrpm -ivh neon-0.24.7-1.i386.rpmrpm -ivh subversion-1.1.1-1.rh80.i386.rpm

    ?

    SVN安裝包的基本命令

    svnThe command-line client program.
    svnversionA program for reporting the state (in terms of revisions of the items present) of a working copy.
    svnlookA tool for inspecting a Subversion repository.
    svnadminA tool for creating, tweaking or repairing a Subversion repository.
    svndumpfilterA program for filtering Subversion repository dumpfile format streams.
    mod_dav_svnA plug-in module for the Apache HTTP Server, used to make your repository available to others over a network.
    svnserveA custom standalone server program, runnable as a daemon process or invokable by SSH; another way to make your repository available to others over a network.

    ?

    配置本地訪問的SVN

    執(zhí)行svn --version,你將看到如下畫面
    [root@localhost local]# svn --version* ra_dav : Module for accessing a repository via WebDAV (DeltaV) protocol.* ra_local : Module for accessing a repository on local disk.* ra_svn : Module for accessing a repository using the svn network protocol.
    如果你有ra_local這個模塊,那么客戶端就可以用file:// URLs的地址來訪問。

    執(zhí)行一下命令

    $ svnadmin create /root/svnrepo$ ls /root/svnrepoconf/ dav/ db/ format hooks/ locks/ README.txt

    接下來,我們建立一個本地工作目錄/root/svnlocal,進入執(zhí)行

    //建立項目[root@localhost svnlocal]# mkdir project [root@localhost svnlocal]# mkdir project/trunk[root@localhost svnlocal]# mkdir project/branches[root@localhost svnlocal]# mkdir project/tags//建立一個模塊exo[root@localhost svnlocal]# mkdir project/exo[root@localhost svnlocal]# vi project/exo/exo.conf[root@localhost svnlocal]# svn import . file:///root/svnrepo -m 'initial'[root@localhost svnlocal]# rm -rf project[root@localhost svnlocal]# svn checkout file://localhost/root/svnrepo/project //check整個項目[root@localhost svnlocal]# svn checkout file://localhost/root/svnrepo/project exo //check 其中一個模塊
    如果成功可以看到文件已經被check出來。地址可以使用file://localhost/root/svnrepo 或者使用file:///root/svnrepo

    其他的命令有

    • Enter your working copy and edit a file's contents.
    • Run svn diff to see unified diff output of your changes.
    • Run svn commit to commit the new version of your file to the repository.
    • Run svn update to bring your working copy “up-to-date” with the repository.

    ?

    SVN的訪問地址

    Schema Access Method
    file:/// direct repository access (on local disk)
    http:// access via WebDAV protocol to Subversion-aware Apache server
    https:// same as http://, but with SSL encryption.
    svn:// access via custom protocol to an svnserve server
    svn+ssh:// same as svn://, but through an SSH tunnel.

    ?

    啟動SVN的svnserve,這樣你就可以通過svn://url的方式來訪問。

    查看啟動參數(shù)
    [root@localhost svnlocal]# svnserve --helpUsage: svnserve [options]Valid options:  -d [--daemon]            : daemon mode  --listen-port arg        : listen port (for daemon mode)  --listen-host arg        : listen hostname or IP address (for daemon mode)  --foreground             : run in foreground (useful for debugging)  -h [--help]              : display this help  --version                : display version  -i [--inetd]             : inetd mode  -r [--root] arg          : root of directory to serve  -R [--read-only]         : deprecated; use repository config file  -t [--tunnel]            : tunnel mode  --tunnel-user arg        : tunnel username (default is current uid's name)  -T [--threads]           : use threads instead of fork  -X [--listen-once]       : listen once (useful for debugging)

    我們執(zhí)行svnserve -d -r /root/svnrepo

    然后在剛才的svnlocal目錄下,執(zhí)行

    [root@localhost svnlocal]# svn checkout svn://localhost/project exo
    就可以通過網絡協(xié)議check出指定的repo或者其中的模塊

    注意:如果我們啟動時候,只是用svnserve -d而沒有制定repo路徑的話,那么你在checkout的時候就必須使用是svn checkout svn://localhost/root/svnrepo/project exo 來指明全路徑。

    接下來,我們隨便修改一個文件,然后執(zhí)行

    [root@localhost exo-build]# svn commit -m "test"
    你會發(fā)現(xiàn)提示說:“提交失敗,svn: Connection is read-only” 這說明svn://訪問方式沒有用戶權限控制,只能最基本的匿名下載使用。

    ?

    權限配置

    先介紹svnserve使用的基于文件的權限控制

    進入/root/svnrepo/conf/ 打開svnserve.conf,修改一下兩行

    [general]anon-access = noneauth-access = write password-db = passwd
    注意:所有的行都必須頂格,否則報錯。

    在相同目錄下建立一個passwd文件,使用vi passwd命令。在里面輸入

    [users]danny = dannybobo = bobo
    重新啟動svnserve,svnserve -d -r /root/svnrepo/ 。

    好,接下來,我們執(zhí)行

    [root@localhost svnlocal]# svn checkout svn://localhost/project exo
    根據提示依次輸入"root"的密碼(任意),用戶登陸名名(danny_xcz)和密碼(pass)。就可以正常chekout需要的目錄了。登陸一次以后再執(zhí)行svn update等命令時無需再次輸入認證密碼。


    Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=202474

    posted on 2006-11-29 22:27 蘆葦 閱讀(556) 評論(0)  編輯  收藏 所屬分類: IDE
    主站蜘蛛池模板: 美女又黄又免费的视频| 亚洲成人在线免费观看| 亚洲爆乳精品无码一区二区| 97性无码区免费| 亚洲精品白色在线发布| 久久这里只精品国产免费10| 亚洲国产成人精品无码区在线观看| 久久精品免费大片国产大片| 一本色道久久综合亚洲精品高清 | 噼里啪啦电影在线观看免费高清| 亚洲高清中文字幕综合网| 99久久免费看国产精品| 91大神亚洲影视在线| 国产91免费视频| 中文字幕无码精品亚洲资源网久久| 大学生一级毛片免费看| 亚洲精品无码一区二区| 四虎永久在线精品免费影视| 特级毛片aaaa级毛片免费| 亚洲午夜精品一级在线播放放| 国产精品美女久久久免费 | 亚洲一级黄色大片| 黑人粗长大战亚洲女2021国产精品成人免费视频 | 亚洲中文字幕在线第六区| 成人A片产无码免费视频在线观看| 亚洲AV电影院在线观看| 91成人免费观看网站| 久久久久久亚洲精品无码| 亚洲色欲久久久久综合网| 欧洲人免费视频网站在线| 亚洲日本人成中文字幕| 亚洲AⅤ无码一区二区三区在线| 成人网站免费看黄A站视频| 亚洲a视频在线观看| 免费很黄很色裸乳在线观看| 免费国产叼嘿视频大全网站| 亚洲中文字幕久久无码| 亚洲无线码在线一区观看| 欧美最猛性xxxxx免费| 黄色视频在线免费观看| 亚洲人成激情在线播放|