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

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

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

    Dedian  
    -- 關(guān)注搜索引擎的開發(fā)
    日歷
    <2006年7月>
    2526272829301
    2345678
    9101112131415
    16171819202122
    23242526272829
    303112345
    統(tǒng)計
    • 隨筆 - 82
    • 文章 - 2
    • 評論 - 228
    • 引用 - 0

    導(dǎo)航

    常用鏈接

    留言簿(8)

    隨筆分類(45)

    隨筆檔案(82)

    文章檔案(2)

    Java Spaces

    搜索

    •  

    積分與排名

    • 積分 - 65504
    • 排名 - 816

    最新評論

    閱讀排行榜

    評論排行榜

     

    --? Getting Ready to Use CVS

    First set the variable CVSROOT to /class/`username`/cvsroot
    [Or any other directory you wish]
    [For csh/tcsh: setenv CVSROOT ~/cvsroot]
    [For bash/ksh: CVSROOT=~/cvsroot;export CVSROOT]

    Next run cvsinit. It will create this directory along with the subdirectory CVSROOT and put several files into CVSROOT.

    -- How to put a project under CVS

    A simple program consisting of multiple files is in /workspaces/project.

    To put this program under cvs first

    cd to /workspaces/project

    Next

    cvs import -m "Sample Program" project sample start

    CVS should respond with
    N project/Makefile
    N project/main.c
    N project/bar.c
    N project/foo.c

    No conflicts created by this import


    If your were importing your own program, you could now delete the original source.
    (Of course, keeping a backup is always a good idea)

    -- Basic CVS Usage

    Now that you have added 'project' to your CVS repository, you will want to be able to modify the code.

    To do this you want to check out the source. You will want to cd to your home directory before you do this.

    cd

    cvs checkout project

    CVS should respond with
    cvs checkout: Updating project
    U project/Makefile
    U project/bar.c
    U project/foo.c
    U project/main.c



    This creates the project directory in your home directory and puts the files: Makefile, bar.c, foo.c, and main.c into the directory along with a CVS directory which stores some information about the files.

    You can now make changes to any of the files in the source tree.
    Lets say you add a printf("DONE\n"); after the function call to bar()
    [Or just cp /class/bfennema/project_other/main2.c to main.c]

    Now you have to check in the new copy

    cvs commit -m "Added a DONE message." main.c

    CVS should respond with
    Checking in main.c;
    /class/'username'/cvsroot/project/main.c,v <-- main.c
    new revision: 1.2; previous revision: 1.1
    done


    Note, the -m option lets you define the checking message on the command line. If you omit it you will be placed into an editor where you can type in the checking message.

    -- Using CVS with Multiple Developers

    To simulate multiple developers, first create a directory for your second developer.
    Call it devel2 (Create it in your home directory).
    Next check out another copy of project.
    • HINT: cvs checkout project
    Next, in the devel2/project directory, add a printf("YOU\n"); after the printf("BAR\n");
    [Or copy /class/bfennema/project_other/bar2.c to bar.c]

    Next, check in bar.c as developer two.
    • HINT: cvs commit -m "Added a YOU" bar.c
    Now, go back to the original developer directory.
    [Probably /class/'username'/project]

    Now look at bar.c. As you can see, the change made by developer one has no been integrated into your version. For that to happen you must

    cvs update bar.c

    CVS should respond with
    U bar.c

    Now look at bar.c. It should now be the same as developer two's.
    Next, edit foo.c as the original developer and add printf("YOU\n"); after the printf("FOO\n");
    [Or copy /class/bfennema/project_other/foo2.c to foo.c]

    Then check in foo.c

    • HINT: cvs commit -m "Added YOU" foo.c
    Next, cd back to developer two's directory.
    Add printf("TOO\n"); after the printf("FOO\n");
    [Or copy /class/bfennema/project_other/foo3.c to foo.c]

    Now type

    cvs status foo.c

    CVS should respond with
    ===================================================================
    File: foo.c             Status: Needs Merge
    
       Working revision:    1.1.1.1 'Some Date'
       Repository revision: 1.2     /class/'username'/cvsroot/project/foo.c,v
       Sticky Tag:          (none)
       Sticky Date:         (none)
       Sticky Options:      (none)
    The various status of a file are:
    Up-to-date
      The file is identical with the latest revision in the repository.
    Locally Modified
      You have edited the file, and not yet committed your changes.
    Needing Patch
      Someone else has committed a newer revision to the repository.
    Needs Merge
      Someone else has committed a newer revision to the repository, and you have also made modifications to the file.

    Therefore, this is telling use we need to merge our changes with the changes made by developer one. To do this

    cvs update foo.c

    CVS should respond with
    RCS file: /class/'username'/cvsroot/project/foo.c,v
    retrieving revision 1.1.1.1
    retrieving revision 1.2
    Merging differences between 1.1.1.1 and 1.2 into foo.c
    rcsmerge: warning: conflicts during merge
    cvs update: conflicts found in foo.c
    C foo.c


    Since the changes we made to each version were so close together, we must manually adjust foo.c to look the way we want it to look. Looking at foo.c we see:
    void foo()
    {
      printf("FOO\n");
    <<<<<<< foo.c
      printf("TOO\n");
    =======
      printf("YOU\n");
    >>>>>>> 1.2
    }

    We see that the text we added as developer one is between the ======= and the >>>>>>> 1.2.
    The text we just added is between the ======= and the <<<<<<< foo.c

    To fix this, move the printf("TOO\n");to after the printf("YOU\n");line and delete the additional lines the CVS inserted. [Or copy /class/bfennema/project_other/foo4.c to foo.c]
    Next, commit foo.c

    cvs commit -m "Added TOO" foo.c

    Since you issued a cvs update command and integrated the changes made by developer one, the integrated changes are committed to the source tree.

    -- Additional CVS Commands

    To add a new file to a module:
    • Get a working copy of the module.
    • Create the new file inside your working copy.
    • use cvs add filename to tell CVS to version control the file.
    • use cvs commit filename to check in the file to the repository.

    Removing files from a module:
    • Make sure you haven't made any uncommitted modifications to the file.
    • Remove the file from the working copy of the module. rm filename.
    • use cvs remove filename to tell CVS you want to delete the file.
    • use cvs commit filename to actually perform the removal from the repository.

    For more information see the cvs man pages or the cvs.ps file in cvs-1.7/doc.

    ---------------
    copy from http://www.csc.calpoly.edu/~dbutler/tutorials/winter96/cvs/
    posted on 2006-07-20 07:06 Dedian 閱讀(511) 評論(0)  編輯  收藏 所屬分類: Java Memo
     
    Copyright © Dedian Powered by: 博客園 模板提供:滬江博客
    主站蜘蛛池模板: 国内精品免费麻豆网站91麻豆| 久久成人18免费网站| 亚洲a一级免费视频| 国产成人亚洲精品91专区手机| 无码的免费不卡毛片视频| 亚洲嫩模在线观看| baoyu122.永久免费视频| 国产亚洲美女精品久久久| 久久久久无码精品亚洲日韩| 亚洲无人区一区二区三区| 在线观看亚洲天天一三视| 野花视频在线官网免费1| 国产真人无遮挡作爱免费视频| 亚洲乱亚洲乱妇无码| 在线观看免费精品国产| 国产精品久久久久久亚洲小说 | 亚洲中文字幕日本无线码| 国产精品入口麻豆免费观看| 中文字幕亚洲综合久久综合| 午夜电影免费观看| 老司机午夜免费视频| 亚洲综合色婷婷七月丁香| 99视频在线看观免费| 2017亚洲男人天堂一| 国产zzjjzzjj视频全免费| 成在线人视频免费视频| 久久亚洲AV成人出白浆无码国产| 在线观看H网址免费入口| 亚洲а∨精品天堂在线| 亚洲一区日韩高清中文字幕亚洲 | 日韩av无码久久精品免费| 亚洲Av高清一区二区三区| 亚洲 无码 在线 专区| 女人隐私秘视频黄www免费| 亚洲熟妇无码爱v在线观看| 国产乱色精品成人免费视频 | 久久久精品国产亚洲成人满18免费网站| 日本免费A级毛一片| 亚洲日产乱码一二三区别| 亚洲深深色噜噜狠狠爱网站 | 成人伊人亚洲人综合网站222|