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

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

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

    空間站

    北極心空

      BlogJava :: 首頁 :: 聯系 :: 聚合  :: 管理
      15 Posts :: 393 Stories :: 160 Comments :: 0 Trackbacks

    SVN安裝和使用

    SVN的安裝

    訪問SVN網站下載你所需版本的安裝包。以Linux為例,安裝過程為依次執行以下步驟:
    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

    執行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的地址來訪問。

    執行一下命令

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

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

    //建立項目[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的方式來訪問。

    查看啟動參數
    [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)

    我們執行svnserve -d -r /root/svnrepo

    然后在剛才的svnlocal目錄下,執行

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

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

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

    [root@localhost exo-build]# svn commit -m "test"
    你會發現提示說:“提交失敗,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/ 。

    好,接下來,我們執行

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


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

    posted on 2006-11-29 22:27 蘆葦 閱讀(556) 評論(0)  編輯  收藏 所屬分類: IDE
    主站蜘蛛池模板: 一级毛片免费播放试看60分钟| 亚洲综合激情五月丁香六月| 国产高清对白在线观看免费91| 日本人的色道www免费一区| 亚洲中文久久精品无码1| 大地资源在线观看免费高清| 亚洲狠狠成人综合网| 99久久综合国产精品免费| 久久国产亚洲精品| 永久黄网站色视频免费| 看免费毛片天天看| 国产精品亚洲视频| 男人都懂www深夜免费网站| 少妇中文字幕乱码亚洲影视| 最近最新高清免费中文字幕 | 免费高清资源黄网站在线观看| 亚洲1234区乱码| 日韩免费观看视频| 一进一出60分钟免费视频| 国产亚洲一区二区三区在线观看| 一区二区三区无码视频免费福利| 亚洲国产美国国产综合一区二区| 91九色精品国产免费| 日韩亚洲翔田千里在线| 亚洲精品无码不卡在线播放HE| 久久aⅴ免费观看| 亚洲视频在线观看2018| 亚洲黄片毛片在线观看| 特级精品毛片免费观看| ASS亚洲熟妇毛茸茸PICS| 亚洲精品国产va在线观看蜜芽| 国产在线观看免费视频软件| 亚洲国产成人精品无码一区二区| 国产美女a做受大片免费| 久久青青草原国产精品免费| 亚洲国产区男人本色在线观看| 亚洲精品国产高清嫩草影院| 2021在线观看视频精品免费| 国产亚洲漂亮白嫩美女在线| 久久亚洲国产精品成人AV秋霞| 国产精品美女自在线观看免费|