views:

152

answers:

2

Hi,

Is it possible to somehow listen to all perforce cammands issued from my machine to the perforce server?

I did some googling yesterday and found a page somewhere about a perforce proxy or broker that would intercept perforce commands and allow you to do what you wanted with them before sending them to the server...and now can't find the page!

I am trying to debug our build process (built using Maven) that is failing while running the maven-release-plugin (prepare).

Cheers.

+1  A: 

It was maybe P4Broker (it seems hard to find an official link, hence the google search).

Pascal Thivent
According to this http://www.perforce.com/perforce/conferences/eu/2008/presentations/perforce_tony_smith_presentation.pdf it's "unsupported", "effectively a beta release", and available here ftp://ftp.perforce.com/perforce/r09.2/ (click into the appropriate platform folder and it should be in there).
raven
@raven Thanks for the links. For what the OP is trying to achieve, I'm not sure lack of support is a problem though.
Pascal Thivent
A: 

Thanks for the reply - was the link I was looking for though turned out it wasn't what I wanted.

In the end I ended up modifying my Windows PATH so that 'p4' would not directly call perforce but instead execute a bat file:

@echo off

set PERFORCE_HOME="C:\Program Files (x86)\Perforce\p4.exe"
set OUTPUT_FILE=C:\batScripts\output\p4out.txt"

echo =========================== >> %OUTPUT_FILE%
echo ===== PERFORCE DEBUG ====== >> %OUTPUT_FILE%
echo =========================== >> %OUTPUT_FILE%
echo $ p4 %* >> %OUTPUT_FILE%
echo =========================== >> %OUTPUT_FILE%
echo Timestamp: %Date% %Time% >> %OUTPUT_FILE%
echo Vars: >> %OUTPUT_FILE%
%PERFORCE_HOME% set >> %OUTPUT_FILE%
echo ` >> %OUTPUT_FILE%

%PERFORCE_HOME% %*
Ed