|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.perforce.p4java.impl.mapbased.rpc.func.client.ClientMerge
public class ClientMerge
Support methods for the RPC merge protocols. Will grow as we implement more types of merge; current version is very bare bones and oriented solely at non-interactive three-way merges of text files.
Nested Class Summary | |
---|---|
static class |
ClientMerge.ResolveChoice
Possible choices available to a merge / resolve; should be fairly self-explanatory. |
Field Summary | |
---|---|
static String |
DEFAULT_TMPFILE_PFX
|
static String |
DEFAULT_TMPFILE_SFX
|
static String |
MARKER_BOTH
|
static String |
MARKER_END
|
static String |
MARKER_ORIGINAL
|
static String |
MARKER_THEIRS
|
static String |
MARKER_YOURS
|
protected static String |
MERGE_BASE_TMP_FILE_KEY
|
protected static String |
MERGE_BASE_TMP_STREAM_KEY
|
protected static String |
MERGE_STATE_KEY
|
protected static String |
MERGE_THEIRS_TMP_FILE_KEY
|
protected static String |
MERGE_THEIRS_TMP_STREAM_KEY
|
protected static String |
MERGE_YOURS_TMP_FILE_KEY
|
protected static String |
MERGE_YOURS_TMP_STREAM_KEY
|
static String |
SYSTEM_TMPDIR_DEFAULT
|
static String |
SYSTEM_TMPDIR_PROPS_KEY
|
static String |
TRACE_PREFIX
|
Constructor Summary | |
---|---|
ClientMerge(Properties props)
|
Method Summary | |
---|---|
protected RpcPacketDispatcher.RpcPacketDispatcherResult |
clientCloseMerge(RpcConnection rpcConnection,
CommandEnv cmdEnv,
Map<String,Object> resultsMap)
Close the merge write (above) and act on the results. |
protected RpcPacketDispatcher.RpcPacketDispatcherResult |
clientOpenMerge3(RpcConnection rpcConnection,
CommandEnv cmdEnv,
Map<String,Object> resultsMap,
boolean twoWayMerge)
Implement a non-interactive version of the three-way client-side merge. |
protected RpcPacketDispatcher.RpcPacketDispatcherResult |
clientWriteMerge(RpcConnection rpcConnection,
CommandEnv cmdEnv,
Map<String,Object> resultsMap)
Write merge data to the client if necessary. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String MARKER_ORIGINAL
public static final String MARKER_THEIRS
public static final String MARKER_YOURS
public static final String MARKER_BOTH
public static final String MARKER_END
public static final String DEFAULT_TMPFILE_PFX
public static final String DEFAULT_TMPFILE_SFX
public static final String SYSTEM_TMPDIR_PROPS_KEY
public static final String SYSTEM_TMPDIR_DEFAULT
public static final String TRACE_PREFIX
protected static final String MERGE_STATE_KEY
protected static final String MERGE_BASE_TMP_FILE_KEY
protected static final String MERGE_BASE_TMP_STREAM_KEY
protected static final String MERGE_THEIRS_TMP_FILE_KEY
protected static final String MERGE_THEIRS_TMP_STREAM_KEY
protected static final String MERGE_YOURS_TMP_FILE_KEY
protected static final String MERGE_YOURS_TMP_STREAM_KEY
Constructor Detail |
---|
public ClientMerge(Properties props)
Method Detail |
---|
protected RpcPacketDispatcher.RpcPacketDispatcherResult clientOpenMerge3(RpcConnection rpcConnection, CommandEnv cmdEnv, Map<String,Object> resultsMap, boolean twoWayMerge) throws ConnectionException
ConnectionException
protected RpcPacketDispatcher.RpcPacketDispatcherResult clientWriteMerge(RpcConnection rpcConnection, CommandEnv cmdEnv, Map<String,Object> resultsMap) throws ConnectionException
For the external stream merge case, this is a no op, but for the normal three-way merge case, we not only need to write the relevant files, but we also need to keep track of the differences so we can determine whether an automatic and / or safe merge is even possible. This determination is done in clientCloseMerge using chunk difference counts as supplied by the server in the bits parameter.
For the two-way merge, all we really need to do is write the "their" file and keep digesting under the covers...
ConnectionException
protected RpcPacketDispatcher.RpcPacketDispatcherResult clientCloseMerge(RpcConnection rpcConnection, CommandEnv cmdEnv, Map<String,Object> resultsMap) throws ConnectionException
ConnectionException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |