[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Request for Help: Bulk adding new files to a branch
From: |
Rob Helmer |
Subject: |
Re: Request for Help: Bulk adding new files to a branch |
Date: |
Wed, 6 Mar 2002 19:59:33 -0800 |
User-agent: |
Mutt/1.2.5i |
On Wed, Mar 06, 2002 at 04:54:53PM -0800, Terry Spafford wrote:
>
> 1. Create a branch with the name I want off of the Trunk filled with the
> current code.
> 2. Check out that new branch.
> 3. Clear out the current code from that branch, leaving the CVS directories.
> 4. Copy over the old code that we wanted.
> 5. Go throuhg and do a CVS Remove for any files that were in the Trunk
> but not the branch. (TEDIOUS!)
> 6. Do a CVS add for any files in the branch but not in the Trunk (also
> Tedious)
> 7. Commit all the files under the new branchname, making sure that no
> merging is done.
Well, it's only tedious if you do all the work yourself, why
not let the computer handle it?
Assuming you haven't created directories named CVS ( which you
shouldn't, CVS won't work ) or any files with the word CVS in them, why not :
cvs tag -b branch_name
cvs update -r branch_name
cvs rm -f `find ./ | grep -v "CVS"`
cvs commit -m "cleaning up branch"
cp -rp /newfiles/* .
cvs add `find ./ | grep -v "CVS"`
cvs commit -m "populating branch for customer"
Anyone see problems with this?
If you do have files with the string CVS in them, you can
be creative with a regex to grep.
I was curious to see if this would work, so I did it in
a test repo/module I keep around, works for me :)
HTH,
Rob Helmer