[Top][All Lists]

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

Re: importing vendor branches

From: Rickard Parker
Subject: Re: importing vendor branches
Date: Fri, 04 May 2001 17:34:58 -0400

I want to thank the previous recent posters to this thread. Their
advice came just at the time I was needing to import some third party
software and also checkin in a tree of software that we developed.
In particular I want to thank 

David Martin for his suggestion of
> To make update -A retrieve the trunk revision (1.1) for locally
> unmodified files which have been imported, you could use cvs admin -b

and also Laine Stump for his suggestion of
> Another way to "fix" this is to just force a "null commit"

I prefer David's method because it causes the checkouts to get cvs
revision numbers 1.1 while Laine's method gets the revisions numbered
1.2 There is one other little problem with Laine's method -- the
forced null commit must be done on a file basis, it does not work

To test the various methods to see how they worked, I created a
Bourne shell script to create for each of four tests a directory to
import, a repository to check into and a sandbox to play with commits
and tagging.  Below is a copy in case you wish to run it on your own
repository system to see what happens when you attempt to get files
that were imported from the head of the tree instead of from the
vendor branch.  Read it before running.  It will delete directories

Thanks again,
   Rick Parker


        #du -a $1

        export CVSROOT="$2"

        echo ; echo ; echo ; echo ; echo ; echo ; echo ; echo ; 
        set -x

        : Create a repository
        mkdir -p "$2"
        cvs init

        : Create a sandbox, directories and files to check in with an import
        mkdir -p $sandbox/module/module_subdir
        date >   $sandbox/module/module_subdir/file

        : Import and check repository
        cd $sandbox/module
        cvs import -m "importing" module VENDOR_BRANCH VENDOR_TAG
        show_files $CVSROOT/module

        : We want to get default checkouts from the head
        : Force this with a few methods
        cd $sandbox
        rm -rf  module/*
        cvs get module
        case "$sandbox" in
                *VB) ;; # Do nothing so checkouts will be from vendor branch
                *AB) cvs admin -b module ;;
                *FF) cvs commit    -f -m "Forced commit to rev 1.2"
module/module_subdir/file ;;
                *FM) cvs commit -R -f -m "Forced commit to rev 1.2" module ;;

        : Checkout and look at revision of file checked out
        cd $sandbox
        rm -rf *
        cvs checkout module
        cvs tag TEST module/module_subdir/file
        cvs log      module/module_subdir/file
        cvs status   module/module_subdir/file

        set +x
        echo ; echo ; echo ; echo ; echo ; echo ; echo ; echo ; 


# VB - Checkout from vendor branch
# AB - Do cvs admin -b to cause checkouts from the head
# FF - Do a forced commit on a file to cause checkouts from the head
# FM - Do a forced commit on a module to cause checkouts from the head
#      Note: FM does not work because the "null commit" is not recursive

check_vendor_to_head ${HOME}/SANDBOX/VB ${HOME}/REPO/cvs_vb
check_vendor_to_head ${HOME}/SANDBOX/AB ${HOME}/REPO/cvs_ab
check_vendor_to_head ${HOME}/SANDBOX/FF ${HOME}/REPO/cvs_ff
check_vendor_to_head ${HOME}/SANDBOX/FM ${HOME}/REPO/cvs_fm


reply via email to

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