3#if !defined(ORG_FOSSIL_SCM_FSL_VPATH_H_INCLUDED)
4#define ORG_FOSSIL_SCM_FSL_VPATH_H_INCLUDED
21#if defined(__cplusplus)
78#define fsl_vpath_empty_m {0,0,fsl_id_bag_empty_m,0,0,0,0}
172 bool directOnly,
bool oneWayOnly );
233#if defined(__cplusplus)
int32_t fsl_id_t
fsl_id_t is a signed integer type used to store database record IDs.
The main Fossil "context" type.
A container type for lists of db record IDs.
Holds information for a single node in a path of checkin versions.
bool fromIsParent
True if pFrom is the parent of rid.
fsl_vpath_node * pPeer
List of nodes of the same generation.
union fsl_vpath_node::@166032324341334222304251103243013332167162031034 u
fsl_vpath_node * pAll
List of all nodes.
fsl_id_t rid
ID for this node.
fsl_vpath_node * pFrom
Node this one came from.
fsl_vpath_node * pTo
Next on path from beginning to end.
bool isPrimary
True if primary side of common ancestor.
A utility type for collecting "paths" between two checkin versions.
fsl_id_bag seen
Nodes seen before.
fsl_vpath_node * pEnd
Most recent node in the path.
fsl_vpath_node * pPivot
Common ancestor of pStart and pEnd.
fsl_vpath_node * pCurrent
Current generation of nodes.
int nStep
Number of steps from first to last.
fsl_vpath_node * pAll
All nodes.
fsl_vpath_node * pStart
Earliest node in the path.
FSL_EXPORT void fsl_vpath_reverse(fsl_vpath *path)
Reconstructs path from path->pStart to path->pEnd, reversing its order by fiddling with the u->pTo fi...
FSL_EXPORT const fsl_vpath fsl_vpath_empty
An empty-initialize fsl_vpath object, intended for copy initialization.
FSL_EXPORT fsl_vpath_node * fsl_vpath_last(fsl_vpath *p)
Returns the last node in p's path.
FSL_EXPORT int fsl_vpath_shortest_store_in_ancestor(fsl_cx *const f, fsl_id_t iFrom, fsl_id_t iTo, uint32_t *pSteps)
This variant of fsl_vpath_shortest() stores the shortest direct path from version iFrom to version iT...
FSL_EXPORT void fsl_vpath_clear(fsl_vpath *path)
Frees all nodes in path (which must not be NULL) and resets all state in path.
FSL_EXPORT fsl_vpath_node * fsl_vpath_first(fsl_vpath *p)
Returns the first node in p's path.
FSL_EXPORT fsl_vpath_node * fsl_vpath_next(fsl_vpath_node *p)
Returns the next node p's path.
FSL_EXPORT int fsl_compute_direct_ancestors(fsl_cx *const f, fsl_id_t rid)
Computes a list of direct (non-merge) ancestors of the given checkin RID and stores it in the TEMP ta...
FSL_EXPORT int fsl_vpath_length(fsl_vpath const *p)
Returns p's path length.
FSL_EXPORT int fsl_vpath_shortest(fsl_cx *const f, fsl_vpath *const path, fsl_id_t iFrom, fsl_id_t iTo, bool directOnly, bool oneWayOnly)
Computes the shortest path from checkin versions iFrom to iTo (inclusive), storing the result state i...
FSL_EXPORT fsl_vpath_node * fsl_vpath_midpoint(fsl_vpath *path)
Find the mid-point of the path.