Elektra  0.9.10
Functions
kdbmerge.h File Reference

Kdb merge tool. More...

#include "kdb.h"
Include dependency graph for kdbmerge.h:

Functions

KeySet * elektraMerge (KeySet *our, Key *ourRoot, KeySet *their, Key *theirRoot, KeySet *base, Key *baseRoot, Key *resultKey, int 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 getConflicts (Key *informationKey)
 This function returns the number of conflicts that is store in the key. More...
 

Detailed Description

Kdb merge tool.

Function Documentation

◆ elektraMerge()

KeySet* elektraMerge ( KeySet *  our,
Key *  ourRoot,
KeySet *  their,
Key *  theirRoot,
KeySet *  base,
Key *  baseRoot,
Key *  resultRoot,
int  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

Parameters
ourour key set
ourRootkey that has the root of our as name
theirtheir key set
theirRootkey that has the root of their as name
basebase key set
baseRootkey that has the root of base as name
resultRootthe name of this key determines where the resulting key set will be stored
strategyspecify which merge strategy to choose in case of a conflict
informationKeystores errors as well as statistics
Returns
the merged key set and NULL on error

◆ getConflicts()

int getConflicts ( Key *  informationKey)

This function returns the number of conflicts that is store in the key.

Parameters
informationKeycontains the statistics in its meta information
Returns
the number of conflicts stored in the key