libfossil
fsl_ckup_opt Struct Reference

Options for use with fsl_repo_ckout() and fsl_ckout_update(). More...

#include "checkout.h"

Collaboration diagram for fsl_ckup_opt:

Data Fields

fsl_ckup_f callback
 Gets called once per checked-out or updated file, passed a fsl_ckup_state instance with information about the checked-out file and related metadata.
void * callbackState
 State to be passed to this->callback via the fsl_ckup_state::callbackState member.
fsl_id_t checkinRid
 The version of the repostitory to check out or update.
fsl_confirmer confirmer
 An optional "confirmer" for answering questions about file overwrites and deletions posed by the checkout process.
bool dryRun
 If true, the extraction process will "go through the motions" but will not write any files to disk.
bool scanForChanges
 A hint to fsl_repo_ckout() and fsl_ckout_update() about whether it needs to scan the checkout for changes.
bool setMtime
 If true, the checkout/update processes will calculate the (synthetic) mtime of each extracted file and set its mtime.

Detailed Description

Options for use with fsl_repo_ckout() and fsl_ckout_update().

i.e. for checkout and update.

Definition at line 1774 of file checkout.h.

Field Documentation

◆ callback

fsl_ckup_f fsl_ckup_opt::callback

Gets called once per checked-out or updated file, passed a fsl_ckup_state instance with information about the checked-out file and related metadata.

May be NULL.

Definition at line 1786 of file checkout.h.

◆ callbackState

void* fsl_ckup_opt::callbackState

State to be passed to this->callback via the fsl_ckup_state::callbackState member.

Definition at line 1792 of file checkout.h.

◆ checkinRid

fsl_id_t fsl_ckup_opt::checkinRid

The version of the repostitory to check out or update.

This must be the blob.rid of a checkin artifact.

Definition at line 1779 of file checkout.h.

◆ confirmer

fsl_confirmer fsl_ckup_opt::confirmer

An optional "confirmer" for answering questions about file overwrites and deletions posed by the checkout process.

By default this confirmer of the associated fsl_cx instance is used.

Caveats:

  • This is not currently used by the update process, only checkout.
  • If this->setMTime is true, the mtime is NOT set for any files which already exist and are skipped due to the confirmer saying to leave them in place.
  • Similarly, if the confirmer says to never overwrite files, permissions on existing files are not modified. fsl_repo_ckout() does not (re)write unmodified files, and thus may leave such files with different permissions. That's on the to-fix list.

Definition at line 1814 of file checkout.h.

◆ dryRun

bool fsl_ckup_opt::dryRun

If true, the extraction process will "go through the motions" but will not write any files to disk.

It will perform I/O such as stat()'ing to see, e.g., if it would have needed to overwrite a file.

Definition at line 1849 of file checkout.h.

◆ scanForChanges

bool fsl_ckup_opt::scanForChanges

A hint to fsl_repo_ckout() and fsl_ckout_update() about whether it needs to scan the checkout for changes.

Set this to false ONLY if the calling code calls fsl_ckout_changes_scan() (or equivalent, e.g. fsl_vfile_changes_scan()) immediately before calling fsl_repo_ckout() or fsl_ckout_update(), as those require a non-stale changes scan in order to function properly.

Definition at line 1841 of file checkout.h.

◆ setMtime

bool fsl_ckup_opt::setMtime

If true, the checkout/update processes will calculate the (synthetic) mtime of each extracted file and set its mtime.

This is a relatively expensive operation which calculates the "effective mtime" of each file by calculating it: Fossil does not record file timestamps, instead treating files as if they had the timestamp of the most recent checkin in which they were added or modified.

It's generally a good idea to let the update process stamp the current time on modified files, in order to avoid any hiccups with build processes which rely on accurate times (e.g. Makefiles). When doing a clean checkout, it's often interesting to see the "original" times, though.

Definition at line 1831 of file checkout.h.


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