|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.cruisecontrol.sourcecontrols.P4
This class implements the SourceControlElement methods for a P4 depot. The call to CVS is assumed to work without any setup. This implies that if the authentication type is pserver the call to cvs login should be done prior to calling this class.
P4Element depends on the optional P4 package delivered with Ant v1.3. But since it probably doesn't make much sense using the P4Element without other P4 support it shouldn't be a problem. P4Element sets the property ${p4element.change} with the latest changelist number or the changelist with the latest date. This should then be passed into p4sync or other p4 commands.
Nested Class Summary | |
protected static class |
P4.ServerInfoConsumer
|
Constructor Summary | |
P4()
|
Method Summary | |
Commandline |
buildChangesCommand(java.util.Date lastBuildTime,
java.util.Date now,
boolean isWindows)
p4 -s [-c client] [-p port] [-u user] changes -s submitted [view@lastBuildTime@now] |
Commandline |
buildDescribeCommand(java.lang.String[] changelistNumbers)
p4 -s [-c client] [-p port] [-u user] describe -s [change number] |
Commandline |
buildUserCommand(java.lang.String username)
p4 -s [-c client] [-p port] [-u user] user -o [username] |
protected long |
calculateServerTimeOffset()
Calculate the difference in time between the Perforce server and the CruiseControl server. |
java.util.List |
getModifications(java.util.Date lastBuild,
java.util.Date now)
Get a List of modifications detailing all the changes between now and the last build. |
java.util.Map |
getProperties()
Any properties that have been set in this sourcecontrol. |
protected java.util.List |
parseChangeDescriptions(java.io.InputStream is)
|
protected java.lang.String[] |
parseChangelistNumbers(java.io.InputStream is)
|
void |
setClient(java.lang.String p4Client)
|
void |
setCorrectForServerTime(boolean flag)
Indicates whether to correct for time differences between the p4 server and the CruiseControl server. |
void |
setPasswd(java.lang.String p4Passwd)
|
void |
setPort(java.lang.String p4Port)
|
void |
setProperty(java.lang.String propertyName)
|
void |
setUseP4Email(boolean flag)
Sets if the Email address for the user should be retrieved from Perforce. |
void |
setUser(java.lang.String p4User)
|
void |
setView(java.lang.String p4View)
|
void |
validate()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public P4()
Method Detail |
public void setPort(java.lang.String p4Port)
public void setClient(java.lang.String p4Client)
public void setUser(java.lang.String p4User)
public void setView(java.lang.String p4View)
public void setPasswd(java.lang.String p4Passwd)
public void setCorrectForServerTime(boolean flag)
public void setUseP4Email(boolean flag)
flag
- true to retrieve email addresses from perforce.public void setProperty(java.lang.String propertyName)
public java.util.Map getProperties()
SourceControl
getProperties
in interface SourceControl
public void validate() throws CruiseControlException
validate
in interface SourceControl
CruiseControlException
public java.util.List getModifications(java.util.Date lastBuild, java.util.Date now)
getModifications
in interface SourceControl
lastBuild
- time of last buildnow
- time this build started
protected java.lang.String[] parseChangelistNumbers(java.io.InputStream is) throws java.io.IOException
java.io.IOException
protected java.util.List parseChangeDescriptions(java.io.InputStream is) throws java.io.IOException
java.io.IOException
public Commandline buildChangesCommand(java.util.Date lastBuildTime, java.util.Date now, boolean isWindows)
public Commandline buildDescribeCommand(java.lang.String[] changelistNumbers)
public Commandline buildUserCommand(java.lang.String username)
protected long calculateServerTimeOffset() throws java.io.IOException, java.lang.InterruptedException
java.io.IOException
java.lang.InterruptedException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |