public class StrategyOneSided extends MergeStrategy
This strategy can be used to cauterize an entire side branch of history, by setting the output tree to one of the inputs, and ignoring any of the paths of the other inputs.
OURS, RECURSIVE, RESOLVE, SIMPLE_TWO_WAY_IN_CORE, THEIRS| Modifier | Constructor and Description |
|---|---|
protected |
StrategyOneSided(String name,
int index)
Create a new merge strategy to select a specific input tree.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getName() |
Merger |
newMerger(Repository db)
Create a new merge instance.
|
Merger |
newMerger(Repository db,
boolean inCore)
Create a new merge instance.
|
get, get, register, registerprotected StrategyOneSided(String name, int index)
name - name of this strategy.index - the position of the input tree to accept as the result.public String getName()
getName in class MergeStrategypublic Merger newMerger(Repository db)
MergeStrategynewMerger in class MergeStrategydb - repository database the merger will read from, and eventually
write results back to.public Merger newMerger(Repository db, boolean inCore)
MergeStrategynewMerger in class MergeStrategydb - repository database the merger will read from, and eventually
write results back to.inCore - the merge will happen in memory, working folder will not be
modified, in case of a non-trivial merge that requires manual
resolution, the merger will fail.Copyright © 2014. All rights reserved.