|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.perforce.api.SourceControlObject | +--com.perforce.api.Mapping | +--com.perforce.api.Branch
Representation of a source control branch. There are static class methods that can be used to list all P4 branches or to get a particular branch.
Constructor Summary | |
Branch()
Default no-argument constructor. |
|
Branch(String name)
Constructor that is passed the branch name. |
Method Summary | |
void |
commit()
Stores this object back into Perforce, creating it if it didn't already exist. |
static Branch |
getBranch(Env env,
String name,
boolean force)
Returns a Branch with the specified name, or null if not found. |
static Branch |
getBranch(String name)
Returns a Branch with the specified name, or null if not found. |
static Enumeration |
getBranches(Env env)
|
static Iterator |
getBranchIterator(Env env)
|
static Enumeration |
getBranchNames(Env env)
Returns list of all branch names. |
HashDecay |
getCache()
Returns the HashDecay instance for this class |
static Change |
integrate(Env env,
String source,
String branch,
StringBuffer sb,
Change c)
Integrate a set of files using the named branch. |
static Change |
integrate(Env env,
Vector fents,
String branch,
StringBuffer sb,
Change c)
Integrate a set of files using the named branch. |
static Change |
integrate(Env env,
Vector fents,
String branch,
StringBuffer sb,
String description)
Integrate a set of files using the named branch. |
Change |
integrate(String source,
StringBuffer sb,
Change c)
Class method for integrating using the instantiated Branch. |
static void |
loadBranches()
Loads the list of branches using the default environment. |
static void |
loadBranches(Env env)
Loads a list of all the branches into an internal class HashDecay. |
static Enumeration |
lookupBranches(String prefix)
Returns a list of branches that begin with the specified prefix. |
void |
sync()
Brings this object back into sync with Perforce. |
void |
sync(String name)
Synchronizes the Branch with the latest information from P4. |
String |
toXML()
Returns a string containing the object in XML form. |
Methods inherited from class com.perforce.api.Mapping |
addView, addView, compareTo, getDescription, getName, getOwner, getView, getViews, lookupMappings, setDescription, setName, setOwner, toString |
Methods inherited from class com.perforce.api.SourceControlObject |
clearCache, getEnv, getSyncTime, getUpdateTime, inSync, invalidate, outOfSync, refreshUpdateTime, setEnv |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Branch()
public Branch(String name)
Method Detail |
public void commit() throws CommitException
SourceControlObject
commit
in class Mapping
public static Branch getBranch(Env env, String name, boolean force)
env
- Environment to use when working with P4.name
- Name of the branch to find.force
- Indicates that the Branch should be sync'd.public static Branch getBranch(String name)
name
- Name of the branch to find.public static Enumeration getBranches(Env env)
env
- Source control environment.Enumeration
of Branch
es.public static Iterator getBranchIterator(Env env)
env
- Source control environment.Iterator
of Branch
es.public static Enumeration getBranchNames(Env env)
Enumeration
of String
s containing branch names.public HashDecay getCache()
SourceControlObject
getCache
in class SourceControlObject
public static Change integrate(Env env, String source, String branch, StringBuffer sb, Change c) throws PerforceException
env
- environment to use when working with P4.source
- source files to integrate from.branch
- name of the branch to integrate with.sb
- buffer that will contain a log of the integration.c
- Change to be used to contain the integrated files.Change
public static Change integrate(Env env, Vector fents, String branch, StringBuffer sb, Change c) throws PerforceException
env
- environment to use when working with P4.fents
- list of FileEntries to be integrated.branch
- name of the branch to integrate with.sb
- buffer that will contain a log of the integration.c
- Change to be used to contain the integrated files.Change
public static Change integrate(Env env, Vector fents, String branch, StringBuffer sb, String description) throws CommitException, PerforceException
env
- environment to use when working with P4.fents
- list of FileEntries to be integrated.branch
- name of the branch to integrate with.sb
- buffer that will contain a log of the integration.description
- description to be used for the Change created.Change
public Change integrate(String source, StringBuffer sb, Change c) throws PerforceException
source
- source files to integrate from.sb
- buffer that will contain a log of the integration.c
- Change to be used to contain the integrated files.integrate(Env,String,String,StringBuffer,Change)
public static void loadBranches()
Env
public static void loadBranches(Env env)
env
- Environment to use when working with P4HashDecay
public static Enumeration lookupBranches(String prefix)
prefix
- Prefix for all branches to be returnedpublic void sync()
SourceControlObject
sync
in class SourceControlObject
public void sync(String name)
sync
in class Mapping
name
- Name of the Branch to synchronize.public String toXML()
SourceControlObject
toXML
in class Mapping
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |