[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Branching

From: Mark D. Baushke
Subject: Re: Branching
Date: Wed, 27 Oct 2004 03:22:24 -0700

Hash: SHA1

Gaurav Vaish <address@hidden> writes:

> >
>   I'm not sure if I got it correctly, but here's what I understood:
>   1. You work on the same file. You do not create "a copy of the file"
> after branching.

Well, cvs is creating a 'checked out copy' of the appropriate revision
of the file for you in your checked out tree.

>   2. To actually work on "branch" and "main trunk", this is how I
>   should proceed
>     a. Get the main trunk using "cvs co module".
> That's the HEAD branch. Work on the files that
> you get here and it will be submitted to the
> "main trunk".

Essentially true with a slight terminology nit.

The 'HEAD' has particular meaning to cvs as it is
used to refer to the most recent version of a
branch. Typically, 'mainline' or 'trunk'
correspond what you are calling the 'main trunk'
above and a 'cvs checkout module' command will
indeed grab the 'HEAD' revision for you to use.

>     b. Get the branch using "cvs co -r
> branch_name module". Work on the files that you
> get here and commits will be to this
> branch_name.


>     c. To merge the changes from branch_name to
> "main trunk/HEAD", you "cvs update -j
> branch_name file_set"

Yes, something like either

    cvs checkout -jbranch_name module
    cd ~/mytrees/branch_name
    cvs checkout -rbranch_name module
    ...make local changes...
    cvs commit

    cd ~/mytrees/mailine
    cvs checkout module
    cd module
    cvs update -jbranch_name
    ...resolve merge conflicts...
    cvs commit

    cd ~/mytrees/branch_name/module
    cvs tag branch_name-last-merge
    ...more local changes...
    cvs commit

    cvs ~/mytrees/mailine/module
    cvs update
    cvs up -jbranch_name-last-merge -jbranch_name
    ...resolve merge conflicts
    cvs commit

    cd ~/mytrees/branch_name/module
    cvs tag branch_name-last-merge
    ...see if the versions look like what you just merged...
    cvs tag -F branch_name-last-merge
>    Let me know if whatever I've understood is
>    correct or not.

Looks like you do so far.

        -- Mark
Version: GnuPG v1.2.3 (FreeBSD)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]