cvs  1.11.23
About: CVS (Concurrent Versions System) is a version control system designed for software projects.
  Fossies Dox: cvs-1.11.23.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

commit.c File Reference
#include <assert.h>
#include "cvs.h"
#include "getline.h"
#include "edit.h"
#include "fileattr.h"
#include "hardlink.h"
Include dependency graph for commit.c:

Go to the source code of this file.

Data Structures

struct  commit_info
 
struct  master_lists
 

Macros

#define COMMIT_OPTIONS   "+lRm:fF:r:"
 

Functions

static Dtype check_direntproc ()
 
static int check_fileproc ()
 
static int check_filesdoneproc ()
 
static int checkaddfile ()
 
static Dtype commit_direntproc ()
 
static int commit_dirleaveproc ()
 
static int commit_fileproc ()
 
static int commit_filesdoneproc ()
 
static int finaladd ()
 
static int findmaxrev ()
 
static int lock_RCS ()
 
static int precommit_list_proc ()
 
static int precommit_proc ()
 
static int remove_file ()
 
static void fixaddfile ()
 
static void fixbranch ()
 
static void unlockrcs ()
 
static void ci_delproc ()
 
static void masterlist_delproc ()
 
int commit (int argc, char **argv)
 
static Ctype classify_file_internal (struct file_info *finfo, Vers_TS **vers)
 
static int check_fileproc (void *callerdat, struct file_info *finfo)
 
static Dtype check_direntproc (void *callerdat, const char *dir, const char *repos, const char *update_dir, List *entries)
 
static int precommit_list_proc (Node *p, void *closure)
 
static int precommit_proc (char *repository, const char *filter) const
 
static int check_filesdoneproc (void *callerdat, int err, const char *repos, const char *update_dir, List *entries)
 
static int commit_fileproc (void *callerdat, struct file_info *finfo)
 
static int commit_filesdoneproc (void *callerdat, int err, const char *repository, const char *update_dir, List *entries)
 
static Dtype commit_direntproc (void *callerdat, const char *dir, const char *repos, const char *update_dir, List *entries)
 
static int commit_dirleaveproc (void *callerdat, const char *dir, int err, const char *update_dir, List *entries)
 
static int findmaxrev (Node *p, void *closure)
 
static int remove_file (struct file_info *finfo, char *tag, char *message)
 
static int finaladd (struct file_info *finfo, char *rev, char *tag, char *options)
 
static void unlockrcs (RCSNode *rcs)
 
static void fixaddfile (char *rcs) const
 
static void fixbranch (RCSNode *rcs, char *branch)
 
static int checkaddfile (char *file, const char *repository, const char *tag, const char *options, RCSNode **rcsnode) const
 
static int lock_RCS (char *user, RCSNode *rcs, const char *rev, const char *repository) const
 
void update_delproc (Node *p)
 
static void ci_delproc (Node *p)
 
static void masterlist_delproc (Node *p)
 

Variables

static int force_ci = 0
 
static int got_message
 
static int aflag
 
static char * saved_tag
 
static char * write_dirtag
 
static int write_dirnonbranch
 
static char * logfile
 
static Listmulist
 
static Listsaved_ulist
 
static char * saved_message
 
static time_t last_register_time
 
static const char *const commit_usage []
 
static int maxrev
 
static char * sbranch
 

Macro Definition Documentation

◆ COMMIT_OPTIONS

#define COMMIT_OPTIONS   "+lRm:fF:r:"

Definition at line 369 of file commit.c.

Function Documentation

◆ check_direntproc() [1/2]

static Dtype check_direntproc ( )
static

Referenced by commit().

◆ check_direntproc() [2/2]

static Dtype check_direntproc ( void callerdat,
const char *  dir,
const char *  repos,
const char *  update_dir,
List entries 
)
static

Definition at line 1111 of file commit.c.

References dir, error(), isdir(), quiet, R_PROCESS, R_SKIP_ALL, and update_dir.

◆ check_fileproc() [1/2]

static int check_fileproc ( )
static

Referenced by commit().

◆ check_fileproc() [2/2]

◆ check_filesdoneproc() [1/2]

static int check_filesdoneproc ( )
static

Referenced by commit().

◆ check_filesdoneproc() [2/2]

static int check_filesdoneproc ( void callerdat,
int  err,
const char *  repos,
const char *  update_dir,
List entries 
)
static

◆ checkaddfile() [1/2]

static int checkaddfile ( )
static

Referenced by commit_fileproc().

◆ checkaddfile() [2/2]

◆ ci_delproc() [1/2]

static void ci_delproc ( )
static

Referenced by check_fileproc().

◆ ci_delproc() [2/2]

static void ci_delproc ( Node p)
static

Definition at line 2406 of file commit.c.

References hashnode::data, free(), commit_info::options, commit_info::rev, and commit_info::tag.

◆ classify_file_internal()

static Ctype classify_file_internal ( struct file_info finfo,
Vers_TS **  vers 
)
static

◆ commit()

◆ commit_direntproc() [1/2]

static Dtype commit_direntproc ( )
static

Referenced by commit().

◆ commit_direntproc() [2/2]

static Dtype commit_direntproc ( void callerdat,
const char *  dir,
const char *  repos,
const char *  update_dir,
List entries 
)
static

◆ commit_dirleaveproc() [1/2]

static int commit_dirleaveproc ( )
static

Referenced by commit().

◆ commit_dirleaveproc() [2/2]

static int commit_dirleaveproc ( void callerdat,
const char *  dir,
int  err,
const char *  update_dir,
List entries 
)
static

Definition at line 1570 of file commit.c.

References free(), Name_Repository(), NULL, update_dir, write_dirnonbranch, write_dirtag, and WriteTag().

◆ commit_fileproc() [1/2]

static int commit_fileproc ( )
static

Referenced by commit().

◆ commit_fileproc() [2/2]

◆ commit_filesdoneproc() [1/2]

static int commit_filesdoneproc ( )
static

Referenced by commit().

◆ commit_filesdoneproc() [2/2]

static int commit_filesdoneproc ( void callerdat,
int  err,
const char *  repository,
const char *  update_dir,
List entries 
)
static

◆ finaladd() [1/2]

static int finaladd ( )
static

Referenced by commit_fileproc().

◆ finaladd() [2/2]

static int finaladd ( struct file_info finfo,
char *  rev,
char *  tag,
char *  options 
)
static

◆ findmaxrev() [1/2]

static int findmaxrev ( )
static

Referenced by commit_fileproc().

◆ findmaxrev() [2/2]

static int findmaxrev ( Node p,
void closure 
)
static

Definition at line 1598 of file commit.c.

References hashnode::data, ENT_FILE, maxrev, entnode::type, and entnode::version.

◆ fixaddfile() [1/2]

static void fixaddfile ( )
static

Referenced by commit_fileproc(), and finaladd().

◆ fixaddfile() [2/2]

static void fixaddfile ( char *  rcs) const
static

◆ fixbranch() [1/2]

static void fixbranch ( )
static

◆ fixbranch() [2/2]

static void fixbranch ( RCSNode rcs,
char *  branch 
)
static

Definition at line 1864 of file commit.c.

References errno, error(), NULL, rcsnode::path, file_info::rcs, RCS_rewrite(), and RCS_setbranch().

◆ lock_RCS() [1/2]

static int lock_RCS ( )
static

Referenced by checkaddfile(), and commit_fileproc().

◆ lock_RCS() [2/2]

static int lock_RCS ( char *  user,
RCSNode rcs,
const char *  rev,
const char *  repository 
) const
static

◆ masterlist_delproc() [1/2]

static void masterlist_delproc ( )
static

Referenced by check_fileproc().

◆ masterlist_delproc() [2/2]

static void masterlist_delproc ( Node p)
static

Definition at line 2424 of file commit.c.

References master_lists::cilist, hashnode::data, dellist(), free(), and master_lists::ulist.

◆ precommit_list_proc() [1/2]

static int precommit_list_proc ( )
static

Referenced by precommit_proc().

◆ precommit_list_proc() [2/2]

static int precommit_list_proc ( Node p,
void closure 
)
static

◆ precommit_proc() [1/2]

static int precommit_proc ( )
static

Referenced by check_filesdoneproc().

◆ precommit_proc() [2/2]

static int precommit_proc ( char *  repository,
const char *  filter 
) const
static

◆ remove_file() [1/2]

static int remove_file ( )
static

Referenced by commit_fileproc().

◆ remove_file() [2/2]

◆ unlockrcs() [1/2]

static void unlockrcs ( )
static

Referenced by commit_fileproc().

◆ unlockrcs() [2/2]

static void unlockrcs ( RCSNode rcs)
static

Definition at line 1818 of file commit.c.

References errno, error(), NULL, rcsnode::path, file_info::rcs, RCS_rewrite(), and RCS_unlock().

◆ update_delproc()

void update_delproc ( Node p)

Variable Documentation

◆ aflag

int aflag
static

Definition at line 83 of file commit.c.

Referenced by classify_file_internal(), and commit().

◆ commit_usage

const char* const commit_usage[]
static
Initial value:
=
{
"Usage: %s %s [-Rlf] [-m msg | -F logfile] [-r rev] files...\n",
" -R Process directories recursively.\n",
" -l Local directory only (not recursive).\n",
" -f Force the file to be committed; disables recursion.\n",
" -F logfile Read the log message from file.\n",
" -m msg Log message.\n",
" -r rev Commit to this branch or trunk revision.\n",
"(Specify the --help global option for a list of other help options)\n",
}

Definition at line 93 of file commit.c.

Referenced by commit().

◆ force_ci

int force_ci = 0
static

Definition at line 81 of file commit.c.

Referenced by check_fileproc(), and commit().

◆ got_message

int got_message
static

Definition at line 82 of file commit.c.

Referenced by commit_direntproc(), commit_fileproc(), and commit_filesdoneproc().

◆ last_register_time

time_t last_register_time
static

Definition at line 91 of file commit.c.

Referenced by commit(), commit_fileproc(), and finaladd().

◆ logfile

char* logfile
static

Definition at line 87 of file commit.c.

Referenced by commit().

◆ maxrev

int maxrev
static

Definition at line 1227 of file commit.c.

Referenced by commit_fileproc(), and findmaxrev().

◆ mulist

◆ saved_message

char* saved_message
static

Definition at line 90 of file commit.c.

Referenced by commit(), commit_direntproc(), commit_fileproc(), commit_filesdoneproc(), and finaladd().

◆ saved_tag

char* saved_tag
static

Definition at line 84 of file commit.c.

Referenced by check_fileproc(), classify_file_internal(), and commit().

◆ saved_ulist

List* saved_ulist
static

Definition at line 89 of file commit.c.

Referenced by check_filesdoneproc(), and precommit_proc().

◆ sbranch

char* sbranch
static

Definition at line 1228 of file commit.c.

Referenced by checkaddfile(), commit_fileproc(), and lock_RCS().

◆ write_dirnonbranch

int write_dirnonbranch
static

Definition at line 86 of file commit.c.

Referenced by commit(), commit_dirleaveproc(), and commit_fileproc().

◆ write_dirtag

char* write_dirtag
static

Definition at line 85 of file commit.c.

Referenced by commit(), commit_dirleaveproc(), and commit_fileproc().

NULL
#define NULL
Definition: getopt1.c:58