Aegis  4.25.D505
Data Structures | Defines | Functions
/home/archives/aegis/branch.4/branch.25/delta28933.505/libaegis/change.h File Reference
#include <libaegis/cstate.fmtgen.h>
#include <libaegis/fstate.fmtgen.h>
#include <libaegis/pconf.fmtgen.h>
#include <libaegis/view_path.h>
#include <libaegis/zero.h>
#include <libaegis/user.h>

Go to the source code of this file.

Data Structures

class  change

Defines

#define THE_CONFIG_FILE_OLD   "config"
#define THE_CONFIG_FILE_NEW   "aegis.conf"
#define TRUNK_CHANGE_NUMBER   ((long)((~(unsigned long)0) >> 1))
#define TIME_NOT_SET   (time_t)0
#define UUID_NOT_SET   (string_ty*)0

Functions

change::pointer change_alloc (project *, long)
void change_free (change::pointer)
change::pointer change_copy (change::pointer)
void change_bind_existing (change::pointer)
int change_bind_existing_errok (change::pointer)
void change_bind_new (change::pointer)
change::pointer change_bogus (project *)
cstate_history_tychange_history_new (change::pointer, user_ty::pointer)
void change_top_path_set (change::pointer, string_ty *)
void change_top_path_set (change::pointer, const nstring &)
void change_development_directory_set (change::pointer, string_ty *)
void change_integration_directory_set (change::pointer, string_ty *)
string_tychange_top_path_get (change::pointer, int)
string_tychange_development_directory_get (change::pointer, int)
string_tychange_integration_directory_get (change::pointer, int)
string_tychange_logfile_basename (void)
string_tychange_logfile_get (change::pointer)
void change_cstate_lock_prepare (change::pointer)
void change_error (change::pointer, sub_context_ty *, const char *)
void change_fatal (change::pointer, sub_context_ty *, const char *)
void change_verbose (change::pointer, sub_context_ty *, const char *)
void change_warning (change::pointer, sub_context_ty *, const char *)
void change_warning_obsolete_field (change::pointer cp, string_ty *errpos, const char *old_field, const char *new_field)
pconf_tychange_pconf_get (change::pointer, int)
void change_run_new_file_command (change::pointer cp, string_list_ty *slp, user_ty::pointer up)
void change_run_new_file_undo_command (change::pointer cp, string_list_ty *slp, user_ty::pointer up)
void change_run_new_test_command (change::pointer cp, string_list_ty *slp, user_ty::pointer up)
void change_run_new_test_undo_command (change::pointer cp, string_list_ty *slp, user_ty::pointer up)
void change_run_copy_file_command (change::pointer cp, string_list_ty *slp, user_ty::pointer up)
void change_run_copy_file_undo_command (change::pointer cp, string_list_ty *slp, user_ty::pointer up)
void change_run_remove_file_command (change::pointer cp, string_list_ty *slp, user_ty::pointer up)
void change_run_remove_file_undo_command (change::pointer cp, string_list_ty *slp, user_ty::pointer up)
void change_run_make_transparent_command (change::pointer cp, string_list_ty *slp, user_ty::pointer up)
void change_run_make_transparent_undo_command (change::pointer cp, string_list_ty *slp, user_ty::pointer up)
int change_run_project_file_command_needed (change::pointer cp)
void change_run_project_file_command (change::pointer cp, user_ty::pointer up)
void change_run_forced_develop_begin_notify_command (change::pointer cp, user_ty::pointer up)
void change_run_develop_end_notify_command (change::pointer cp)
void change_run_develop_end_undo_notify_command (change::pointer cp)
void change_run_review_begin_notify_command (change::pointer cp)
void change_run_review_begin_undo_notify_command (change::pointer cp)
void change_run_review_pass_notify_command (change::pointer cp)
void change_run_review_pass_undo_notify_command (change::pointer cp)
void change_run_review_fail_notify_command (change::pointer cp)
void change_run_integrate_pass_notify_command (change::pointer cp)
void change_run_integrate_fail_notify_command (change::pointer cp)
void change_run_history_get_command (change::pointer cp, fstate_src_ty *src, string_ty *output_file, user_ty::pointer up)
void change_run_history_create_command (change::pointer cp, fstate_src_ty *)
void change_run_history_put_command (change::pointer cp, fstate_src_ty *)
string_tychange_run_history_query_command (change::pointer cp, fstate_src_ty *src)
void change_run_history_label_command (change::pointer cp, fstate_src_ty *, string_ty *label)
void change_run_history_transaction_begin_command (change::pointer cp)
void change_run_history_transaction_end_command (change::pointer cp)
void change_run_history_transaction_abort_command (change::pointer cp)
void change_history_trashed_fingerprints (change::pointer, string_list_ty *)
void change_run_diff_command (change::pointer cp, user_ty::pointer up, string_ty *original, string_ty *input, string_ty *output)
void change_run_diff3_command (change::pointer cp, user_ty::pointer up, string_ty *original, string_ty *most_recent, string_ty *input, string_ty *output)
void change_run_merge_command (change::pointer cp, user_ty::pointer up, string_ty *original, string_ty *most_recent, string_ty *input, string_ty *output)
void change_run_patch_diff_command (change::pointer cp, user_ty::pointer up, string_ty *original, string_ty *input, string_ty *output, string_ty *index_name)
void change_run_annotate_diff_command (change::pointer cp, user_ty::pointer up, string_ty *original, string_ty *input, string_ty *output, string_ty *index_name, const char *diff_option)
int change_has_merge_command (change::pointer)
void change_run_integrate_begin_command (change::pointer)
void change_run_integrate_begin_undo_command (change::pointer)
void change_run_develop_begin_command (change::pointer cp, user_ty::pointer up)
void change_run_develop_begin_undo_command (change::pointer cp, user_ty::pointer up)
int change_run_test_command (change::pointer cp, user_ty::pointer up, string_ty *, string_ty *, int, int, const nstring_list &variable_assignments)
int change_run_development_test_command (change::pointer cp, user_ty::pointer up, string_ty *, string_ty *, int, int, const nstring_list &variable_assignments)
void change_run_build_command (change::pointer)
void change_run_build_time_adjust_notify_command (change::pointer)
void change_run_development_build_command (change::pointer, user_ty::pointer, string_list_ty *)
void change_run_develop_end_policy_command (change::pointer cp, user_ty::pointer up)
string_tychange_file_whiteout (change::pointer, string_ty *)
void change_file_whiteout_write (change::pointer cp, string_ty *path, user_ty::pointer up)
void change_become (change::pointer)
void change_become_undo (change::pointer cp)
void change_developer_become (change::pointer)
void change_developer_become_undo (change::pointer cp)
void change_development_directory_clear (change::pointer)
void change_integration_directory_clear (change::pointer)
void change_architecture_clear (change::pointer)
void change_architecture_add (change::pointer, string_ty *)
void change_architecture_query (change::pointer)
string_tychange_architecture_name (change::pointer, int)
string_tychange_run_architecture_discriminator_command (change::pointer cp)
cstate_architecture_times_tychange_architecture_times_find (change::pointer, string_ty *)
void change_build_time_set (change::pointer)
void change_test_time_set (change::pointer cp, time_t when)
void change_test_time_set (change::pointer cp, string_ty *variant, time_t when)
void change_test_baseline_time_set (change::pointer cp, time_t when)
void change_test_baseline_time_set (change::pointer cp, string_ty *variant, time_t when)
void change_regression_test_time_set (change::pointer cp, time_t when, string_ty *arch_name=0)
void change_test_times_clear (change::pointer)
void change_build_times_clear (change::pointer)
void change_architecture_from_pconf (change::pointer)
const char * change_outstanding_builds (change::pointer, time_t)
const char * change_outstanding_tests (change::pointer, time_t)
const char * change_outstanding_tests_baseline (change::pointer, time_t)
const char * change_outstanding_tests_regression (change::pointer, time_t)
int change_pathconf_name_max (change::pointer)
string_tychange_filename_check (change::pointer, string_ty *)
void change_create_symlinks_to_baseline (change::pointer, user_ty::pointer, const work_area_style_ty &)
void change_maintain_symlinks_to_baseline (change::pointer cp, user_ty::pointer up, bool undoing=false)
void change_remove_symlinks_to_baseline (change::pointer, user_ty::pointer, const work_area_style_ty &)
void change_rescind_test_exemption (change::pointer)
string_tychange_fstate_filename_get (change::pointer cp)
string_tychange_pfstate_filename_get (change::pointer cp)
void change_rescind_test_exemption_undo (change::pointer)
void change_force_regression_test_exemption (change::pointer)
void change_force_regression_test_exemption_undo (change::pointer)
void change_check_architectures (change::pointer)
string_tychange_new_test_filename_get (change::pointer, long, int)
string_tychange_development_directory_template (change::pointer, user_ty::pointer)
string_tychange_metrics_filename_pattern_get (change::pointer)
void change_uuid_set (change::pointer cp)
void change_uuid_clear (change::pointer cp)
void change_reviewer_list (change::pointer cp, string_list_ty &result)
bool change_reviewer_already (change::pointer cp, string_ty *login)
bool change_reviewer_already (change::pointer cp, const nstring &login)
time_t change_when_get (change::pointer cp, cstate_history_what_ty what)
bool change_diff_required (change::pointer cp)
bool change_build_required (change::pointer cp, bool conf_exists=true)

Define Documentation

#define THE_CONFIG_FILE_NEW   "aegis.conf"

Definition at line 36 of file change.h.

#define THE_CONFIG_FILE_OLD   "config"

Definition at line 35 of file change.h.

#define TIME_NOT_SET   (time_t)0

Definition at line 46 of file change.h.

#define TRUNK_CHANGE_NUMBER   ((long)((~(unsigned long)0) >> 1))

Definition at line 44 of file change.h.

#define UUID_NOT_SET   (string_ty*)0

Definition at line 47 of file change.h.


Function Documentation

change::pointer change_alloc ( project ,
long   
)
bool change_build_required ( change::pointer  cp,
bool  conf_exists = true 
)

The change_build_required function is used to see of the project (and this specific change set) need the build command to be run.

Parameters:
cpThe change in question.
conf_existstrue if the project configuration file must exist (causing fatal error if it does not), or false if it doesn't matter.
Returns:
bool; true if build command needs to be run, false if not.

The change_diff_required function is used to see of the project (and this specific change set) need the diff command to be run.

Parameters:
cpThe change in question.
Returns:
bool; true if diff command needs to be run, false if not.
void change_error ( change::pointer  ,
sub_context_ty ,
const char *   
)
void change_fatal ( change::pointer  ,
sub_context_ty ,
const char *   
)

The change_fstate_filename_get function is used to obtain the absolute path of the file which holds the change's file state.

Parameters:
cpThe change being operated on.
Returns:
a string. DO NOT str_free it when you are done with it, it is cached.
void change_maintain_symlinks_to_baseline ( change::pointer  cp,
user_ty::pointer  up,
bool  undoing = false 
)

The change_maintain_symlinks_to_baseline is used to repair the symbolic links (etc) as dictated by the development_directory_style field of the project configuration file.

The "symlink" in the name is an historical accident, it also maintains the hard links and copies as well.

Parameters:
cpThe change to operatte on
upThe user to operate as
undoingTrue if this call is in response to and undo operation (aecpu, aemtu) because they need special attention for file time stamps. Defaults to false if not specified.
Note:
This function is NOT to be called by aeb, because it needs different logic.
This function may only be called when the change is in the "being developed" state.
const char* change_outstanding_builds ( change::pointer  ,
time_t   
)
const char* change_outstanding_tests ( change::pointer  ,
time_t   
)
const char* change_outstanding_tests_baseline ( change::pointer  ,
time_t   
)
const char* change_outstanding_tests_regression ( change::pointer  ,
time_t   
)

The change_pfstate_filename_get function is used to obtain the absolute path of the file which holds the delta's cache of the project file state.

Parameters:
cpThe change being operated on.
Returns:
a string. DO NOT str_free it when you are done with it, it is cached.
void change_regression_test_time_set ( change::pointer  cp,
time_t  when,
string_ty arch_name = 0 
)

The change_regression_test_time_set function is used to set (or clear) the regression test time stamp of the chanegh set.

Parameters:
cpThe change set in question.
whenThe time the test was performed, or zero to clear the time.
arch_nameThe name of the architecture, or the NULL pointer to mean "the current one".

The change_reviewer_already function is used to determine if a user has already reviewed a change, since the last develop end.

Parameters:
cpThe change to be consulted.
loginThe login name of the user in question.
Returns:
bool; true if the user has reviewed already, false if not.
bool change_reviewer_already ( change::pointer  cp,
const nstring login 
)

The change_reviewer_already function is used to determine if a user has already reviewed a change, since the last develop end.

Parameters:
cpThe change to be consulted.
loginThe login name of the user in question.
Returns:
bool; true if the user has reviewed already, false if not.

The change_reviewer_list function is used to get the list of reviewers since the last develop_end. There can be more than one if the review_policy_command filed of the project configuration is being used.

Parameters:
cpThe change to be consulted.
resultwhere to put the answers.
void change_run_annotate_diff_command ( change::pointer  cp,
user_ty::pointer  up,
string_ty original,
string_ty input,
string_ty output,
string_ty index_name,
const char *  diff_option 
)

The change_run_develop_end_policy_command function is used to run the develop_end_policy_command specified in the project configuration file.

Parameters:
cpThe change in question.
upThe developer of the change.
Note:
This function does not return if the command exits with a non-zero exit status.
int change_run_development_test_command ( change::pointer  cp,
user_ty::pointer  up,
string_ty ,
string_ty ,
int  ,
int  ,
const nstring_list variable_assignments 
)
void change_run_diff3_command ( change::pointer  cp,
user_ty::pointer  up,
string_ty original,
string_ty most_recent,
string_ty input,
string_ty output 
)
void change_run_diff_command ( change::pointer  cp,
user_ty::pointer  up,
string_ty original,
string_ty input,
string_ty output 
)

The change_run_history_query_command function is used to obtain the head revision number of the history of the given source file.

Parameters:
cpThe change to operate within.
srcThe source file meta-data of the file of interest.
Returns:
Pointer to string containing the version. Use str_free() when you are done with it.

The change_run_history_transaction_abort_command function is used to run the history_transaction_abort_command in the project configuration file. This is used by the aeipass(1) command if a history transaction needs to be aborted.

Parameters:
cpThe change to operate within.

The change_run_history_transaction_begin_command function is used to run the history_transaction_begin_command in the project configuration file. This is used by the aeipass(1) command before any history put or create commands.

Parameters:
cpThe change to operate within.

The change_run_history_transaction_end_command function is used to run the history_transaction_end_command in the project configuration file. This is used by the aeipass(1) command after any history put or create commands.

Parameters:
cpThe change to operate within.
void change_run_merge_command ( change::pointer  cp,
user_ty::pointer  up,
string_ty original,
string_ty most_recent,
string_ty input,
string_ty output 
)
void change_run_patch_diff_command ( change::pointer  cp,
user_ty::pointer  up,
string_ty original,
string_ty input,
string_ty output,
string_ty index_name 
)
int change_run_test_command ( change::pointer  cp,
user_ty::pointer  up,
string_ty ,
string_ty ,
int  ,
int  ,
const nstring_list variable_assignments 
)
void change_test_baseline_time_set ( change::pointer  cp,
time_t  when 
)

The change_test_baseline_time_set function is used to set the baseline test time for a change. The architecture of the currently executing session is used.

Parameters:
cpThe change in question.
whenThe time the test was performed.
void change_test_baseline_time_set ( change::pointer  cp,
string_ty variant,
time_t  when 
)

The change_test_baseline_time_set function is used to set the test time for a change, for the given architecture variant.

Parameters:
cpThe change in question.
variantThe name of the architecture of interest.
whenThe time the test was performed.
void change_test_time_set ( change::pointer  cp,
time_t  when 
)

The change_test_time_set function is used to set the test time for a change. The architecture of the currently executing session is used.

Parameters:
cpThe change in question.
whenThe time the test was performed.
void change_test_time_set ( change::pointer  cp,
string_ty variant,
time_t  when 
)

The change_test_time_set function is used to set the test time for a change, for the given architecture variant.

Parameters:
cpThe change in question.
variantThe name of the architecture of interest.
whenThe time the test was performed.
void change_top_path_set ( change::pointer  ,
const nstring  
)

The change_uuid_clear function is used to clear a change's UUID, if it has been set in the past.

The change_uuid_set function is used to set a change's UUID, if it has not been set already.

void change_verbose ( change::pointer  ,
sub_context_ty ,
const char *   
)
void change_warning ( change::pointer  ,
sub_context_ty ,
const char *   
)

The change_warning function is used to issue a warning message specific to a change. The message will be substituted accouring to aesub(5) and any additional substitutions provided in the substitution context.

void change_warning_obsolete_field ( change::pointer  cp,
string_ty errpos,
const char *  old_field,
const char *  new_field 
)

The change_warning_obsolete_field function is used to warn about the use of obsolete fields (in user suppied files, Aegis will take care of quietly cleaning up the meta-data files all by itself).

The change_when_get function is used to obtain the last (most recent) time for the given state transition.

Parameters:
cpThe change in qiestion.
whatThe state transition to look for.
Returns:
time_t; the time of the event, or 0 if not found.