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, register
protected 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 MergeStrategy
public Merger newMerger(Repository db)
MergeStrategy
newMerger
in class MergeStrategy
db
- repository database the merger will read from, and eventually
write results back to.public Merger newMerger(Repository db, boolean inCore)
MergeStrategy
newMerger
in class MergeStrategy
db
- 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 © 2013. All rights reserved.