[p4] cvs2p4 - Creating uppercase branch names

Weintraub, David david.weintraub at bofasecurities.com
Thu Aug 24 12:15:32 PDT 2006


Okay, I dived into the source code, and it wasn't pretty. However, I was
able to grab onto the $BRANCH_FLASH environment variable and from there,
traced out how the program currently changes the name of the branch. If
"$BRANCH_FLASH" is set, that suffix is removed from the CVS name of the
branch when converted over to Perforce. I modified the program to take a
two column WANTLINES list in the config file. The first is the CVS
branch you want. The optional second parameter is the Perforce name.
 
I don't check the Perforce name to make sure it isn't a duplicate, but
it seems to work.
 
I'll submit my change to whoever is responsible for maintaining the
cvs2p4 utility.


________________________________

	From: Weintraub, David 
	Sent: Thursday, August 24, 2006 8:58 AM
	To: Perforce Users
	Subject: cvs2p4 - Creating uppercase branch names
	
	
	Is there a way using cvs2p4 to mangle the names of branches?
That is, you have a branch "foo-bar" in CVS which becomes "BAR-FOO" in
Perforce?
	 
	I'd like to make all branch names uppercase as specified in the
book Practical Perforce. I'd also like to clean up branch names making
something like Branch-1-4-3 to CELOX-1.4.3.
	 
	Would it be possible to take a checkpoint, modify the checkpoint
file, then rebuild the database? Or, would it be easier to modify the
cvs2p4 programs to do just that?



More information about the perforce-user mailing list