libfossil
fsl_merge_state Struct Reference

UNDER CONSTRUCTION! More...

#include "checkout.h"

Collaboration diagram for fsl_merge_state:

Data Fields

fsl_cx * f
 The fsl_cx object for which the current merge is running.
fsl_merge_fchange_e fileChangeType
 Indicates the state of the file currently being merged.
char const * filename
 The checkout-relative name of the file affected by the merge.
fsl_ckup_rm_state_e fileRmInfo
 Indicates whether the current file was removed.
fsl_merge_opt const * opt
 The options object which drives the current fsl_ckout_merge() run.
char const * priorName
 If this->fileChangeType is FSL_MERGE_FCHANGE_RENAMED then this is the previous name of the file, else it is NULL.

Detailed Description

UNDER CONSTRUCTION!

INCOMPLETE!

A type for passing state to fsl_merge_f callbacks during fsl_ckout_merge() processing.

For each step of a merge operation which affects a file, state reflecting that change is set in one of these objects and it is passed to the fsl_merge_f implementation supplied by the caller.

Unlike fsl_ckout_update(), fsl_ckout_merge() reports only files which are affected by a merge, not unmodified files. Whether that's a bug or a feature is not yet clear, but the merge algorithm does not, as is, support reporting unaffected files.

Due to the complexity and intricacy of the merge operation, it is possible that any given file will get passed to the fsl_merge_f() callback more than once with a different fsl_merge_state::fileChangeType value. Most notably, a file which has been modified and renamed may be passed on one with FSL_MERGE_FCHANGE_COPIED and once with FSL_MERGE_FCHANGE_RENAMED. Whether that's a bug or a feature is as-yet undecided, but (A) fossil(1) does it that way and (B) not doing that would require some rearchitecting.

Definition at line 2675 of file checkout.h.

Field Documentation

◆ f

fsl_cx* fsl_merge_state::f

The fsl_cx object for which the current merge is running.

Definition at line 2679 of file checkout.h.

◆ fileChangeType

fsl_merge_fchange_e fsl_merge_state::fileChangeType

Indicates the state of the file currently being merged.

Merge does not support the full range fo fsl_ckup_fchange_e values. TODO: list which it does or create a new enum which enumerates only merge-specific change types.

Definition at line 2705 of file checkout.h.

◆ filename

char const* fsl_merge_state::filename

The checkout-relative name of the file affected by the merge.

These bytes are invalidated after the fsl_merge_f() callback returns, so must be copied if the client requires them for later.

Definition at line 2691 of file checkout.h.

◆ fileRmInfo

fsl_ckup_rm_state_e fsl_merge_state::fileRmInfo

Indicates whether the current file was removed.

A state of FSL_CKUP_RM_KEPT and fileChangeType of FSL_MERGE_FCHANGE_RM indicates that the file has become unmanaged but the local copy was retained because it was flagged as locally modified.

Definition at line 2713 of file checkout.h.

◆ opt

fsl_merge_opt const* fsl_merge_state::opt

The options object which drives the current fsl_ckout_merge() run.

Definition at line 2684 of file checkout.h.

◆ priorName

char const* fsl_merge_state::priorName

If this->fileChangeType is FSL_MERGE_FCHANGE_RENAMED then this is the previous name of the file, else it is NULL.

Definition at line 2697 of file checkout.h.


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