[p4] deleting and renaming jobs...

David Jones drj at ravenbrook.com
Fri Sep 8 10:06:59 PDT 2006


On 8 Sep 2006, at 17:05, G Barthelemy wrote:

>
> However, renaming a job by bringing up the form for a job (p4 job
> JOB-1235) and changing the Job: field to rename it (say to JOB-1236)
> just creates a new job (JOB-1236), leaving JOB-1235 in place (in other
> words it duplicates it with a new name). Changelists are not affected,
> and remain associated with JOB-1235.
>
> Is it a feature or a bug ? Could it be considered that because the job
> deletion is affecting associated changelists, renaming a job should do
> the same ? Or can we rely on editing an existing job for a way of
> duplicating a job (which we sometimes need to do for various reasons).

You can think of p4 job as a poor man's replacement for:

p4 job -o jobXXXX > /tmp/file
vi /tmp/file
p4 job -i < /tmp/file

And thinking of it like that it becomes clear that the final contents  
of the file are simply a new job to feed to p4 job -i.  If its job  
number matches an existing job then it overwrites it, if it doesn't  
match then it creates a new one.

I would say if you really do need to rely on "renaming" creating a  
duplicate, then use "p4 job -o jobXXXX | something | p4 job -i"  
instead.  It'll be more reliable for one thing.

drj



More information about the perforce-user mailing list