[Techtalk] cvs tags and branches

Cynthia Kiser cnk at ugcs.caltech.edu
Tue Nov 11 12:19:57 EST 2003


If I were you, instead of having your new client as a branch in the
repository of the first client, I would create a working copy of the
code you want to reuse between the two and start treating yourself as
a vendor. You can find discussion of stuff sort of like this in
http://ccm.redhat.com/asj/version-control/. 

But for your immediate situation, first, I would make the non-paying
client the branch because there will be fewer changes in that
code. It is generally more convenient to work on the trunk so I would
have the new, active client take over the trunk.

Other that CVS fun and games, you have not done any work for the new
guy that needs saving, right? So I would start over. First, go to the
working copy of the old client - a directory that is where you want
the starting point for the divergence to be. You can delete the pesky
tag that is giving you hassles: 

cvs tag -d newclientname

It is always nice to know where on the trunk you branched from, so
first put a pre-branch tag on the trunk: 

cvs tag  before-branching-oldclient

Then make a new tag for the branch that is going to be your old
client's maintenence branch: 

cvs tag -b oldclient-maintenence-branch

Then check out that branch into the location you want your old client
maintenence to occur

cvs checkout -r oldclient-maintenence-branch \ 
   -d /maintenence/server/dir repositoryname

And checkout the trunk for the new client: 

cvs checkout repositoryname -d /new/client/server/dir

------------------


If you want to do the create a new repository for the shared code, and
then do vendor merges to yourself, just take a cvs export of the old
client's code, delete anything that is too specific to them, then make
a new repostory, and use a cvs export of that to create the starting
repository for your new client. 

You can make updates to a working copy of your shared base code and
then use the instructions at
http://ictinike.org/cnk/unix/archive/project-management to do vendor
imports into your new and old client projects. 


Quoting Emma Jane Hogbin <emmajane at xtrinsic.com>:
> Hi everyone,
> 
> I'm completely confused by sticky tags and branches. I thought I
> understood, but I don't. I've tried reading "Essential CVS" by Jennifer
> Vesperman and http://docs.freebsd.org/info/cvs/cvs.info.CVS_commands.html
> 
> I have three different development directories for different servers for
> one client. Many hassles later I am no longer doing work for them and want
> to "freeze" the work I was doing for them when they decided to stop paying
> me. Now over in a completely unrelated directory I'm starting to work for
> a new client with the same code base (it's all open source and kosher to
> use the same code). I'd like the new client to have a "branch" of the
> original code. In theory the old client may someday have new budget to pay
> me for the work I did (yeah, dream on, I know).
> 
> It looks like I can't create a new branch without having named the first
> batch of programming. Somehow I've managed to get a sticky tag on the new
> programming and now when I try to commit files in the new directory it
> says, "cvs commit: sticky tag `mimic' for file `templates/light.php' is
> not a branch".
> 
> I'm not even sure what information I need to give to sort things out.
> 
> Any help would be much appreciated!
> emma
> 
> OLD
> emmajane at debian:/web/lms/sandbox/server_name/cell$ cvs status cal.php 
> ===================================================================
> File: cal.php           Status: Up-to-date
> 
>    Working revision:    1.4     Wed Oct  1 16:15:51 2003
>    Repository revision: 1.4     /cvsroot/proj_name/cal.php,v
>    Sticky Tag:          (none)
>    Sticky Date:         (none)
>    Sticky Options:      (none)
> 
> 
> NEW
> emmajane at debian:/web/new/cell$ cvs status cal.php
> ===================================================================
> File: cal.php           Status: Up-to-date
> 
>    Working revision:    1.4     Wed Oct  1 16:15:35 2003
>    Repository revision: 1.4     /cvsroot/proj_name/cal.php,v
>    Sticky Tag:          newclientname (revision: 1.4)
>    Sticky Date:         (none)
>    Sticky Options:      (none)
> 
> 
> 
> -- 
> Emma Jane Hogbin
> [[ 416 417 2868 ][ www.xtrinsic.com ]]
> _______________________________________________
> Techtalk mailing list
> Techtalk at linuxchix.org
> http://mailman.linuxchix.org/mailman/listinfo/techtalk

-- 
Cynthia N. Kiser
cnk at ugcs.caltech.edu

Contrary to popular belief, Unix is user friendly. It just happens to
be very selective about who it decides to make friends with. 

	Anonymous


More information about the Techtalk mailing list