[p4] deleting and renaming jobs...
Shawn Hladky
p4shawn at gmail.com
Fri Sep 8 11:18:22 PDT 2006
There is no way to rename directly. You'd have to script it:
create new job
p4 fix -d for each fix on the old job
p4 fix for each change on the new job
p4 job -d old job
It seems a little strange that you'd want to re-name a job anyway. The job
name should be some sort of an identifier. And in general relational
database sense, you don't ever change an identifier.
As for deleting jobs, you should be able to prevent that with a form-delete
trigger. What bothers me more, is that there is no way to prevent a user
from deleting a fix record... and there's no traceability to even know that
the fix was deleted.
On 9/8/06, G Barthelemy <gb.perforce at googlemail.com> wrote:
>
> Our development process relies heavily on jobs: we enforce that jobs
> be associated with changelists when changes are submitted to the
> depot. Our in-house developed bug tracking database actually generates
> the perforce jobs, and the relation between a bug and the
> corresponding fix(es) in Perforce is tracked using the job name,
> which must be the same as the bug name. Not fancy but efficient.
>
> Anyway, we have noticed that when deleting a job (job -d JOB-1234) the
> job would be removed from all the changelists it was associated with.
> Fine, it's easy to imagine how that would work in a relational
> database.
>
> 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).
>
> On a related note: amazingly it only recently struck us that any user
> could delete any job. I would like to be able to prevent that from
> happening while letting anyone creating jobs. What would be the best
> way to do that ? I thought I read somewhere that protect could be used
> to restrict the use of commands, but I can't find anything about this
> (I must have been dreaming !).
>
> --
> Guillaume
> _______________________________________________
> 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