libfossil
fsl_repo_create_opt Struct Reference

Configuration parameters for fsl_repo_create(). More...

#include "fossil-core.h"

Data Fields

char allowOverwrite
 If false, fsl_repo_create() will fail if this->filename already exists. More...
 
char const * commitMessage
 The comment text used for the initial commit. More...
 
char const * configRepo
 If not NULL and not empty, fsl_repo_create() will use this repository database to copy the configuration, copying over the following settings: More...
 
char const * filename
 The file name for the new repository. More...
 
char const * username
 Fossil user name for the admin user in the new repo. More...
 

Detailed Description

Configuration parameters for fsl_repo_create().

Always copy-construct these from fsl_repo_create_opt_empty resp. fsl_repo_create_opt_empty_m in order to ensure proper behaviour vis-a-vis default values.

TODOs:

  • Add project name/description, and possibly other configuration bits.
  • Allow client to set password for default user (currently set randomly, as fossil(1) does).

Definition at line 896 of file fossil-core.h.

Field Documentation

char fsl_repo_create_opt::allowOverwrite

If false, fsl_repo_create() will fail if this->filename already exists.

Definition at line 942 of file fossil-core.h.

char const* fsl_repo_create_opt::commitMessage

The comment text used for the initial commit.

If NULL or empty (starts with a NUL byte) then no initial check is created. fossil(1) is largely untested with that scenario (but it seems to work), so for compatibility it is not recommended that this be set to NULL.

The default value (when copy-initialized) is "egg". There's a story behind the use of "egg" as the initial checkin comment, and it all started with a typo: "initial chicken"

Definition at line 920 of file fossil-core.h.

char const* fsl_repo_create_opt::configRepo

If not NULL and not empty, fsl_repo_create() will use this repository database to copy the configuration, copying over the following settings:

  • The reportfmt table, overwriting any existing entries.
  • The user table fields (cap, info, mtime, photo) are copied for the "system users". The system users are: anonymous, nobody, developer, reader.
  • The vast majority of the config table is copied, arguably more than it should (e.g. the 'manifest' setting).

Definition at line 936 of file fossil-core.h.

char const* fsl_repo_create_opt::filename

The file name for the new repository.

Definition at line 900 of file fossil-core.h.

char const* fsl_repo_create_opt::username

Fossil user name for the admin user in the new repo.

If NULL, defaults to the Fossil context's user (see fsl_cx_user_get()). If that is NULL, it defaults to "root" for historical reasons.

Definition at line 907 of file fossil-core.h.


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