|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.cruisecontrol.labelincrementers.P4ChangelistLabelIncrementer
This class uses the most current changelist of the user in Perforce as the label for the builds. It can also sync the Perforce managed files to that changelist number, as well as clean out the existing managed files.
Nested Class Summary | |
protected static interface |
P4ChangelistLabelIncrementer.P4CmdParser
|
protected static class |
P4ChangelistLabelIncrementer.P4CmdParserAdapter
|
protected static class |
P4ChangelistLabelIncrementer.ParseChangelistNumbers
|
protected static class |
P4ChangelistLabelIncrementer.ParseOutputParam
|
Constructor Summary | |
P4ChangelistLabelIncrementer()
|
Method Summary | |
protected Commandline |
buildBaseP4Command()
|
protected org.apache.tools.ant.taskdefs.Delete |
createDelete(org.apache.tools.ant.Project p)
|
protected org.apache.tools.ant.types.FileSet |
createFileSet(org.apache.tools.ant.Project p)
|
protected org.apache.tools.ant.Project |
createProject()
|
protected void |
deleteView()
|
protected java.lang.String |
getCurrentChangelist()
|
java.lang.String |
getDefaultLabel()
The instance must be fully initialized before calling this method. |
protected org.apache.tools.ant.types.FileSet |
getWhereView(org.apache.tools.ant.Project p)
If the view mapping contains a reference to a single file, |
java.lang.String |
incrementLabel(java.lang.String oldLabel,
org.jdom.Element buildLog)
Retrieves the current changelist, or, if given, the specified changelist, and also performs any necessary actions the user requested. |
boolean |
isPreBuildIncrementer()
Some implementations of LabelIncrementer , such as those involving
dates, are better suited to being incremented before building rather
than after building. |
boolean |
isValidLabel(java.lang.String label)
Verify that the label specified is a valid label. |
protected void |
parseStream(java.io.InputStream stream,
P4ChangelistLabelIncrementer.P4CmdParser parser)
|
protected void |
runP4Cmd(Commandline cmd,
P4ChangelistLabelIncrementer.P4CmdParser parser)
|
void |
setChangelist(int syncChange)
Set the changelist number that you want to build at. |
void |
setClean(boolean b)
Perform a "p4 sync -f [view]#0" before syncing anew. |
void |
setClient(java.lang.String p4Client)
|
void |
setDelete(boolean b)
Perform a recursive delete of the clientspec view. |
void |
setNoSync(boolean b)
Disables the label incrementer from synchronizing Perforce to the view. |
void |
setPasswd(java.lang.String p4Passwd)
|
void |
setPort(java.lang.String p4Port)
|
void |
setUser(java.lang.String p4User)
|
void |
setView(java.lang.String p4View)
|
protected void |
syncTo(java.lang.String viewArg)
|
void |
validate()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public P4ChangelistLabelIncrementer()
Method Detail |
public java.lang.String incrementLabel(java.lang.String oldLabel, org.jdom.Element buildLog)
incrementLabel
in interface LabelIncrementer
oldLabel
- Label from previous successful build.buildLog
- JDOM Element
representation of the build.
public boolean isPreBuildIncrementer()
LabelIncrementer
LabelIncrementer
, such as those involving
dates, are better suited to being incremented before building rather
than after building. This method determines whether to increment before
building or after building.
isPreBuildIncrementer
in interface LabelIncrementer
public boolean isValidLabel(java.lang.String label)
isValidLabel
in interface LabelIncrementer
label
- user-supplied label
public java.lang.String getDefaultLabel()
getDefaultLabel
in interface LabelIncrementer
java.lang.IllegalStateException
- if the instance is not properly initializedpublic void setChangelist(int syncChange)
syncChange
- the changelist number to perform the sync to.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 setNoSync(boolean b)
b
- public void setClean(boolean b)
b
- public void setDelete(boolean b)
b
- public void validate() throws CruiseControlException
CruiseControlException
protected java.lang.String getCurrentChangelist() throws CruiseControlException
CruiseControlException
protected void syncTo(java.lang.String viewArg) throws CruiseControlException
CruiseControlException
protected void deleteView() throws CruiseControlException
CruiseControlException
protected org.apache.tools.ant.types.FileSet getWhereView(org.apache.tools.ant.Project p) throws CruiseControlException
CruiseControlException
protected org.apache.tools.ant.Project createProject()
protected org.apache.tools.ant.taskdefs.Delete createDelete(org.apache.tools.ant.Project p) throws CruiseControlException
CruiseControlException
protected org.apache.tools.ant.types.FileSet createFileSet(org.apache.tools.ant.Project p) throws CruiseControlException
CruiseControlException
protected Commandline buildBaseP4Command()
protected void runP4Cmd(Commandline cmd, P4ChangelistLabelIncrementer.P4CmdParser parser) throws CruiseControlException
CruiseControlException
protected void parseStream(java.io.InputStream stream, P4ChangelistLabelIncrementer.P4CmdParser parser) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |