[p4] Script to ship resolves?

Brad Holt brad.holt at autodesk.com
Mon Jul 24 10:04:34 PDT 2006


Hey,

Like most of you, we've got piles of branches that are getting
integrated back and forth every day.  I've got it scripted now so that
the changes get integrated over by-changelist, which is an improvement.
However, it still eats up way too much of my time when trying to take
care of the resolve conflicts.  Doing them all myself is time consuming,
and dreary, plus I'd rather have the folks with the context knowledge
tackling them.

So what I need to write is some sort of script that will bundle up the
conflicted file revisions (the theirs, yours, and base) and send them
off.  I've done something similar in the past, but it was unfinished and
a bit sloppy.  This must be something that many of you have to wrestle
with, so I've been a bit surprised that I haven't seen it in the
discussion previously.  So I'm probably just missing something.

I can see this being done in one of 2 ways:
- either -

1. The resolve conflict is shipped out as just the 3 files attached in
an email for the dev to resolve.  They take care of it and send me back
the result which I then slot into my pending resolve and "Accept Merged"
(unless they find that I can take the straight "Yours" or "Theirs").  I
have a sloppy version of this now, but it is not automated to the point
that I need.  Providing the target and source is simple enough (though
there is a danger that the target#head may vary between the time I send
the mail out and get the reply), but getting the base/common ancestor is
more of a problem.  Perhaps "integrate -o" would work to derive this?
Maybe "merge3"?

- or -

2. I have my script write a script that gets sent to the dev.  This
script would create a temporary client rooted in %TEMP% and would then
run the integration to populate a changelist which they could then
resolve and submit.  Sounds reasonable, but I can see problems with it
in the details (cleaup of temp client, resetting dev's defaults,
password stuff, notification that they have finished, etc.)

Any of you lot written anything like this?  I try to stick to perl as
everyone here has to have it on their boxes.  I'll take whatever ideas
or suggestions you have as well.

Thanks much.

-Brad




More information about the perforce-user mailing list