[p4] p4 submit numbered changelist

Milton Ngan milton at valvesoftware.com
Thu Jul 2 13:03:05 PDT 2009


The Change number is stored in $cn. So add "-c $cn" to the submit  
command

On Jul 2, 2009, at 11:42 AM, Todd Zarnes wrote:

> I have an inherited Perl script that integrates changes across  
> branches.
> It creates the changelist, performs the resolve and adds a  
> description.
> The script does everything I want it to do except Sumit the changelist
> after the resolve is finished.  When I run p4 submit on a command line
> it complains there are no files in my default changelist, which is  
> true
> - they are in a numbered changelist created by this script.  Seems  
> like
> if the Submit command was executed in the script as the Change command
> it would know which Changelist number to Submit.  From this snippet  
> does
> anybody have suggestions on how to get an auto Submit of these  
> changes?
>
>
> sub integChanges {
> 	open (INFILE, "FileChange.txt");
> 	print "Integrating Changes			\n";
> 	`p4 -p perforce:1666 sync //Solar/Rel8.6.5/...`;
>  my $cn = `p4 -p perforce:1666 change -o | sed -e \"s/.enter
> description here./SCMPOMUPD. Integrating approved changes from dev to
> cut\./\" | grep -A1 -B9999 -e \"^Description.\" | p4 change -i`;
> 	my @array =split(/ /,$cn);
> 	$cn = $array[1];
> 	while (<INFILE>) {
> 		chomp;
> 		my @array = split(/ /);
> 		#change=$array[1], fromfile=$array[3],
> 		my $tofile=$array[3];
> 		$tofile =~ s/\/dev\//\/cut\//;
> 		my $output = `p4 -p perforce:1666 integ -c $cn -o
> $array[3]\@$array[1],$array[1] $tofile`;
> 		print ".\n";
> 	}
> 	`p4 -p perforce:1666 resolve -as //<depot_path>/...`;
> 	`p4 -p perforce:1666 submit`;  (trying to add auto submit)
> 	print "\n";
> 	close (INFILE);
>
> [exec] No files to submit from the default changelist.
>
> ToddZarnes | Activant WDN | Release Manager | Tel: 303.938.8801 Ext:
> 1544
>
>
> Notice: This transmission is for the sole use of the intended  
> recipient(s) and may contain information that is confidential and/or  
> privileged.  If you are not the intended recipient, please delete  
> this transmission and any attachments and notify the sender by  
> return email immediately.  Any unauthorized review, use, disclosure  
> or distribution is prohibited.
> _______________________________________________
> perforce-user mailing list  -  perforce-user at perforce.com
> http://maillist.perforce.com/mailman/listinfo/perforce-user




More information about the perforce-user mailing list