Actually, things would be a lot simpler if p4 and p4win both loaded the API
library dynamically instead of statically linking it in. Then, one would
have to just change the API (the engine). This would also work for p4web
arguably.
Rajul
> -----Original Message-----
> From: Rob Jellinghaus [mailto:***@quokka.com]
> Sent: Monday, April 17, 2000 12:10 PM
> To: Rob Jellinghaus; 'Jeff A. Bowles'; Chuck Karish
> Cc: Rajul Vora; perforce-***@perforce.com
> Subject: RE: [p4] Client-Side Submit Triggers
>
>
> I just thought of a counterexample to my own argument, here:
> p4win is totally unextensible right now. Other folks have
> asked for a way to add commands to p4win (i.e. "execute
> script X on the selected file(s)"); it would be equally good
> to have a way to have p4win invoke a p4 wrapper script
> instead of the raw p4 command. Then you could implement
> your p4 wrapper script to do whatever you locally want, and
> p4win could just use that instead. This is still not quite
> like munging p4 itself to support script invocation, but
> it's a step down a slippery slope....
>
> Cheers,
> Rob
>
> -----Original Message-----
> From: Rob Jellinghaus [mailto:***@quokka.com]
> Sent: Monday, April 17, 2000 11:56 AM
> To: 'Jeff A. Bowles'; Chuck Karish
> Cc: Rajul Vora; perforce-***@perforce.com
> Subject: RE: [p4] Client-Side Submit Triggers
>
>
> From: Jeff A. Bowles [mailto:***@pobox.com]
> >At 3:16 PM -0700 4/14/00, Chuck Karish wrote:
> >>What functionality do you want that you can't get with a
> >>wrapper for p4.exe or by writing a tool using the p4 API?
> ...
> >For example, a client-side trigger that says "check for an
> >object file that has a date newer than the file getting
> >checked in" is a *very* basic "did it compile?" test. Not
> >a very good one, mind you, but still it's better than
> >nothing. (This is something a server-side trigger cannot do.)
> ...
> >The reason a hack to "p4.exe" (or a wrapper) or using the P4 API
> >isn't sufficient do these sort of things is that you want to
> ensure that
> >this 'trigger' behavior is run every time, not just when the
> >developer runs "the right client executable/program" to do
> >the submit. That is, by the way, one reason that client-side
> >triggers aren't there at the moment, I suspect: how can you
> >CLEANLY guarantee that the client-side trigger is ALWAYS run
> >on the platforms it's supposed to, and that it has access to
> >the right tools to do its job? (For example, do you want to
> >assume that check-ins from a platform that lacks a C compiler
> >are good? Are never good? There be dragons there....)
>
> I think you've just summarized the reason why Perforce shouldn't
> even really *try* to implement client-side triggers.
>
> Getting the p4 command itself to be portable is hard enough. I
> can see little or no way Perforce could integrate client-side
> extensible scripting (which is sort of what you're asking for)
> into the portable p4 command. Consider all the variants: do you
> want to run a DOS batch file? a Unix shell script? a Perl script?
> Are you on Windows? BeOS? Macintosh? What are the exit code
> conventions? Can every type of script even return the right sorts
> of exit codes? There's far too much local variation here.
>
> What prevents you from setting up your clients' environments such
> that the raw p4 tool is completely inaccessible? You're *always*
> in a situation where the developer needs to run "the right client/
> executable program" to do the submit. The big issue is whether
> you provide two ways to do it--the right way, via myp4wrapper or
> whatever, and the wrong way, via raw p4--or whether you only
> provide one way, namely myp4wrapper, and contrive to hide the raw
> p4 command altogether. Again, the details of how you would do this
> are specific to your OS, your procedures, and your preferred
> support tools, which all argues against Perforce trying to solve
> this particular worm can.
>
> >And to anyone who says "but ClearCase has 'em" (and it does),
> >I'd respond: yes, but getting *consistent* and *helpful* behavior
> >from 'em is no fun.
>
> I suspect that the reasons why this is so are the same reasons why
> it would be equally hard to get good behavior from Perforce client-
> side triggers, were Perforce to implement them.
>
> You said you weren't arguing particularly for or against client-side
> triggers; from my perspective, you were arguing quite effectively
> against :-)
>
> Cheers,
> Rob
>
> _______________________________________________
> perforce-user mailing list - perforce-***@perforce.com
> http://maillist.perforce.com/mailman/listinfo/perforce-user
>