Subject: Re: help tracking CVS
To: None <brook@biology.nmsu.edu>
From: Greg Troxel <gdt@ir.bbn.com>
List: netbsd-help
Date: 09/30/2005 18:08:12
The right way is after doing an import (with a unique point tag, and
the same vendor tag) to do a fresh checkout with 

  -j previous_import_point_tag -j this_import_point_tag

and then resolve conflicts and commit.  Files present at
previous_import_point_tag but not at this_import_point_tag will be
marked R and correctly removed.  If you don't do this dual-j checkout
and commit then

  * deleted files won't get deleted

  * files locally changed and changed by NetBSD won't pick up the
    NetBSD changes.

I use these to do co and import.  Note especially the last script.

Also, you should after you think you are done do

  cvs diff -N -r most_recent_imported_point_tag

and verify that only intentional changes against netbsd are present.



#!/bin/sh

# $Id: NETBSD-co,v 1.8 2005/02/02 18:09:43 gdt Exp $

# check out NetBSD sources

if [ -d src ]; then
  echo "ERROR: src already exists"
  exit 1
fi

cvsroot="-d our-netbsd-mirror.ir.bbn.com:/NETBSD-CVS"
#branch="-r netbsd-2-0"
#branch="-r netbsd-2"
branch=""
args="$cvsroot -q co $branch" #" -I \! -I CVS"

cvs $args src


#!/bin/sh

# $Id: NETBSD-import,v 1.12 2005/02/02 18:09:43 gdt Exp $

arg="-n";

if [ x$1 = x ]; then
  echo "Usage: NETBSD-import yyyymmdd [real]"
  exit 1
else
  date=$1
  tag=netbsd-current-$date
  echo "date must be ISO-8601 YYYYMMDD:"
  echo "log message: netbsd-current as of $date"
  echo "release tag: $tag"
  sleep 5
fi

if [ x$2 = xreal ]; then
  arg=""
  real=t
  echo "REALLY DOING IMPORT IN 5 SECONDS"
  sleep 5
else
  echo "DOING IMPORT with -n" 
  real=f
fi

TESTFILE=UPDATING
if [ -f $TESTFILE ]; then
  echo "This appears to be a NetBSD src directory."
else
  echo "FATAL: $TESTFILE is missing"
  exit 1
fi

# second tag is netbsd-current.  This was an error; it should have
# just been netbsd, as we planned to follow the 2-0 branch, which then
# became the netbsd-2 branch, but then we decided to follow current.

cvs $arg -d /SINEW-CVS import -m"netbsd-current as of $date" -ko -I \! -I CVS -d netbsd/src netbsd-current $tag > ../IMPORT.LOG 2>&1 &

----------------------------------------
#!/bin/sh

set -x

tag=20050926
oldtag=20050913
echo tag $tag oldtag $oldtag
sleep 5

(cd $HOME/NETBSD &&
  cvs -d our-netbsd-mirror.ir.bbn.com:/NETBSD-CVS co -P src > CO.LOG 2>&1 &&
  cd src &&
  chflags nodump src &&
  ../NETBSD-import $tag real) &&

(cd $HOME/SINEW-current &&
  cvs -d /SINEW-CVS co -j netbsd-current-$oldtag -j netbsd-current-$tag netbsd -P &&
  chflags nodump netbsd)


  
-- 
        Greg Troxel <gdt@ir.bbn.com>