libfossil
fsl_annotate_step Struct Reference

Callback state for use by fsl_annotate_step_f(). More...

#include "repo.h"

Collaboration diagram for fsl_annotate_step:

Data Fields

fsl_uuid_cstr fileHash
 The hash of the file version from which this->line was pulled.
char const * line
 NUL-terminated current line of the input file, minus any newline and/or carriage return.
uint32_t lineLength
 The number of bytes in this->line.
uint32_t lineNumber
 Line number for the current file.
double mtime
 The mtime field from the [event] table (timeline) entry associated with this version.
int stepNumber
 Step number in this annotation run.
fsl_annotate_step_e stepType
 Tells the caller the "type" of annotation step this call represents.
char const * username
 The user name this change was attributed to, noting that merges are attributed to the one who did the merge.
fsl_uuid_cstr versionHash
 The hash of the checkin version from which this->line was pulled.

Detailed Description

Callback state for use by fsl_annotate_step_f().

ACHTUNG: this state gets repopulated for each call to the fsl_annote_step_f() callback and any pointers it holds must be treated as if they are invalidated as soon as the callback returns (whether or not that is the case is undefined, though).

Not all state is set on each call involving this object. See the stepType member for details.

Definition at line 3476 of file repo.h.

Field Documentation

◆ fileHash

fsl_uuid_cstr fsl_annotate_step::fileHash

The hash of the file version from which this->line was pulled.

Definition at line 3525 of file repo.h.

◆ line

char const* fsl_annotate_step::line

NUL-terminated current line of the input file, minus any newline and/or carriage return.

Definition at line 3516 of file repo.h.

◆ lineLength

uint32_t fsl_annotate_step::lineLength

The number of bytes in this->line.

Definition at line 3520 of file repo.h.

◆ lineNumber

uint32_t fsl_annotate_step::lineNumber

Line number for the current file.

Definition at line 3511 of file repo.h.

◆ mtime

double fsl_annotate_step::mtime

The mtime field from the [event] table (timeline) entry associated with this version.

This is a Julian Date and, because it is updated by annotations which modify timestamps in the [event] table, it reflects any "edited" time (if any).

See also
fsl_julian_to_iso8601()

Definition at line 3540 of file repo.h.

◆ stepNumber

int fsl_annotate_step::stepNumber

Step number in this annotation run.

When this->stepType is FSL_ANNOTATE_STEP_VERSION, this value is the relative number of the version, starting at 0 and incremented by 1 on each call. In the other modes it is 0-based relative version from which the current line is from, or negative if that information is incomplete due to a limited annotation run. e.g. a value of 3 indicates that this line is from 3 version away from the starting version.

Definition at line 3507 of file repo.h.

◆ stepType

fsl_annotate_step_e fsl_annotate_step::stepType

Tells the caller the "type" of annotation step this call represents.

The type of step will determine which fields of this object are populated when it is passed to a fsl_annotate_step_f() callback:

Always set:

stepType, stepNumber (but interpretation varies - see that member's docs for details).

FSL_ANNOTATE_STEP_VERSION: fileHash, versionHash, mtime

FSL_ANNOTATE_STEP_LIMITED: stepNumber (always 0 for the limited case), lineNumber, line, lineNength.

FSL_ANNOTATE_STEP_FULL: as for FSL_ANNOTATE_STEP_LIMITED plus: fileHash, versionHash, mtime, username.

Definition at line 3496 of file repo.h.

◆ username

char const* fsl_annotate_step::username

The user name this change was attributed to, noting that merges are attributed to the one who did the merge.

Definition at line 3545 of file repo.h.

◆ versionHash

fsl_uuid_cstr fsl_annotate_step::versionHash

The hash of the checkin version from which this->line was pulled.

Definition at line 3530 of file repo.h.


The documentation for this struct was generated from the following file: