$darkmode
Elektra 0.11.0
|
Kdb merge tool. More...
#include "kdb.h"
#include "kdbtypes.h"
Enumerations | |
enum | MergeStrategy { MERGE_STRATEGY_ABORT = 1, MERGE_STRATEGY_OUR = 3, MERGE_STRATEGY_THEIR = 4 } |
The strategy to use when a merge conflict occurs. More... | |
Functions | |
KeySet * | elektraMerge (KeySet *our, Key *ourRoot, KeySet *their, Key *theirRoot, KeySet *base, Key *baseRoot, Key *resultKey, enum MergeStrategy strategy, Key *informationKey) |
This function can incorporate changes from two modified versions (our and their) into a common preceding version (base) of a key set. More... | |
int | elektraMergeGetConflicts (Key *informationKey) |
This function returns the number of conflicts that is store in the key. More... | |
KeySet * | elektraMergeGetConflictingKeys (Key *informationKey, Key *root) |
Returns a keyset with all conflicting keys under the specified root. More... | |
bool | elektraMergeIsKeyConflicting (Key *informationKey, Key *root, Key *key) |
Check whether the given key was part of a conflict. More... | |
Kdb merge tool.
enum MergeStrategy |
KeySet* elektraMerge | ( | KeySet * | our, |
Key * | ourRoot, | ||
KeySet * | their, | ||
Key * | theirRoot, | ||
KeySet * | base, | ||
Key * | baseRoot, | ||
Key * | resultRoot, | ||
enum MergeStrategy | strategy, | ||
Key * | informationKey | ||
) |
This function can incorporate changes from two modified versions (our and their) into a common preceding version (base) of a key set.
This lets you merge the sets of changes represented by the two newer key sets. This is called a three-way merge between key sets.
Join three key sets together
our | our key set |
ourRoot | key that has the root of our as name |
their | their key set |
theirRoot | key that has the root of their as name |
base | base key set |
baseRoot | key that has the root of base as name |
resultRoot | the name of this key determines where the resulting key set will be stored |
strategy | specify which merge strategy to choose in case of a conflict |
informationKey | stores errors as well as statistics |
KeySet* elektraMergeGetConflictingKeys | ( | Key * | informationKey, |
Key * | root | ||
) |
Returns a keyset with all conflicting keys under the specified root.
informationKey | stores errors as well as statistics |
root | The root key (either for base, theirs, ours or result) that was used in the merge |
int elektraMergeGetConflicts | ( | Key * | informationKey | ) |
This function returns the number of conflicts that is store in the key.
informationKey | contains the statistics in its meta information |
bool elektraMergeIsKeyConflicting | ( | Key * | informationKey, |
Key * | root, | ||
Key * | key | ||
) |
Check whether the given key was part of a conflict.
NOTE: Even if the conflict was resolved via the provided conflict strategy, the key will still be marked as being part of a conflict.
informationKey | stores errors as well as statistics |
root | The root key (either for base, theirs, ours or result) that was used in the merge |
key | That key that should be checked. Must be located under the specified root key |
1 | if the key was part of a conflict |
0 | if the key was not part of a conflict or the given root was not part of the merge |