info-cvs
[Top][All Lists]
Advanced

[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

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Gaurav Vaish <address@hidden> writes:

> > https://www.cvshome.org/docs/manual/cvs-1.11.17/cvs_5.html#SEC57
> 
>   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.

Yes.

>     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
or
    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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)

iD8DBQFBf3bg3x41pRYZE/gRAqBXAKDB1a55Vi0NoRu05H7cRRpM0ZOOyQCg1Kwm
Ixa8W0gyPQ3r0W4s7G6NoBc=
=r4mE
-----END PGP SIGNATURE-----




reply via email to

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