The central structure for data storage. More...
#include <global.h>
Data Fields | |
struct estat * | parent |
The parent of this entry, used for tree walking. | |
char * | name |
Name of this entry. | |
struct sstat_t | st |
Meta-data of this entry. | |
svn_revnum_t | repos_rev |
Revision of this entry. | |
svn_revnum_t | old_rev |
The revision number before updating. | |
struct url_t * | url |
The URL this entry is from. | |
struct estat * | old |
If an entry gets removed, the old version is remembered (if needed) via the old pointer (eg to know which children were known and may be safely removed). | |
union { | |
struct { | |
char * decoder | |
The en/decoder string. | |
md5_digest_t md5 | |
MD5-hash of the repository version. | |
unsigned int has_orig_md5:1 | |
Whether we got an "original" MD5 from the repository to compare. | |
unsigned int change_flag:2 | |
Flag whether this entry has changed or not changed (as per MD5/manber-compare), or if this is unknown yet. | |
} | |
For files. | |
struct { | |
char * strings | |
Name storage space for sub- (and sub-sub- etc. | |
struct estat ** by_inode | |
List of child entries. | |
struct estat ** by_name | |
List of child entries. | |
AC_CV_C_UINT32_T entry_count | |
How many entries this directory has. | |
AC_CV_C_UINT32_T unfinished | |
Used to know when this directories' children are finished. | |
unsigned int other_revs:1 | |
This flag is set if any child is *not* at the same revision, so this directory has to be descended on reporting. | |
unsigned int to_be_sorted:1 | |
If this bit is set, the directory has to be re-sorted before being written out -- it may have new entries, which are not in the correct order. | |
} | |
For directories. | |
}; | |
Data about this entry. | |
union { | |
struct { | |
void * baton | |
This entries' baton. | |
} | |
For commit. | |
struct { | |
apr_pool_t * filehandle_pool | |
The pool used for the filehandles; for a discussion see FHP. | |
} | |
Export for a file. | |
struct { | |
svn_stringbuf_t * stringbuf_tgt | |
String-buffers for special entries. | |
} | |
Export of a special entry. | |
struct { | |
AC_CV_C_UINT32_T child_index | |
Used in waa__input_tree() and waa__update_tree(). | |
} | |
struct { | |
AC_CV_C_UINT32_T file_index | |
Used in output_tree(). | |
} | |
}; | |
These are for temporary use. | |
unsigned int | entry_status:10 |
Local status of this entry - fs_bits. | |
unsigned int | remote_status:10 |
Remote status of this entry. | |
unsigned int | cache_index:6 |
Cache index number +1 of this entries' path. | |
unsigned short | path_len:16 |
Length of path up to here. | |
unsigned int | was_output:1 |
Whether this entry was already printed. | |
unsigned int | decoder_is_correct:1 |
This flag tells whether the string for the decoder is surely correct. | |
unsigned int | do_userselected:1 |
Flag saying whether this entry was specified by the user on the command line. | |
unsigned int | do_child_wanted:1 |
Says that a child of this entry was given by the user on the commandline. | |
unsigned int | do_this_entry:1 |
Flag derived from parents' estat::do_userselected. | |
unsigned int | do_filter_allows:1 |
Flag saying whether the "-f" filter condition applies. | |
unsigned int | do_filter_allows_done:1 |
Flag used for debugging. | |
unsigned int | to_be_ignored:1 |
Whether this entry should not be written into the entry list, and/or ignored otherwise. | |
Common variables for all types of entries. | |
char * | arg |
Which argument causes this path to be done. | |
struct ignore_t * | match_pattern |
Which pattern matched this entry. | |
apr_hash_t * | user_prop |
Stored user-defined properties as name=>svn_string_t , if action->keep_user_prop is set. | |
AC_CV_C_UINT32_T | flags |
Flags for this entry. | |
unsigned | old_rev_mode_packed:PACKED_MODE_T_NEEDED_BITS |
Packed representations of the file type; see preproc.h for details. | |
unsigned | new_rev_mode_packed:PACKED_MODE_T_NEEDED_BITS |
This is the new value, which we got from the repository. | |
unsigned | local_mode_packed:PACKED_MODE_T_NEEDED_BITS |
This is the current local value, and is always set on ops__update_single_entry() . |
The central structure for data storage.
The name comes from extended struct stat. This structure is used to build the tree of entries that we're processing.
We need both a local and a remote status, to see on update when there might be a conflict.
Definition at line 297 of file global.h.
union { ... } |
Data about this entry.
union { ... } |
These are for temporary use.
char* estat::arg |
Which argument causes this path to be done.
Definition at line 421 of file global.h.
Referenced by co__work(), hlp__format_path(), hlp__match_path_envs(), ops__copy_single_entry(), waa__find_base(), and waa__partial_update().
void* estat::baton |
struct estat** estat::by_inode [read] |
List of child entries.
Sorted by inode number, NULL-terminated. Always valid.
Definition at line 357 of file global.h.
Referenced by ac___up_set_paths(), cb___add_directory(), cb___remover(), cb___report_path_rev(), cb__add_entry(), ci___unset_copyflags(), cm___ignore_impl_copied(), cm___match_children(), cm__find_copied(), df___diff_wc_remote(), df___repos_repos(), dir__enumerator(), dir__sortbyinode(), dir__sortbyname(), ops___entries_to_write(), ops__copy_single_entry(), ops__delete_entry(), ops__find_entry_byinode(), ops__free_entry(), ops__free_marked(), ops__new_entries(), rev___local_revert(), rev__do_changed(), up__rmdir(), waa__build_tree(), waa__input_tree(), waa__output_tree(), waa__update_dir(), and waa__update_tree().
struct estat** estat::by_name [read] |
List of child entries.
Sorted by name, NULL-terminated. May be NULL if not currently used; can be (re-)generated by calling dir__sortbyname().
Definition at line 362 of file global.h.
Referenced by cb___add_directory(), cb___close_directory(), cb__add_entry(), dir__enumerator(), dir__sortbyname(), ops__copy_single_entry(), ops__correlate_dirs(), ops__delete_entry(), ops__find_entry_byname(), ops__free_entry(), ops__free_marked(), ops__new_entries(), waa__copy_entries(), waa__do_sorted_tree(), waa__update_dir(), and waa__update_tree().
unsigned int estat::cache_index |
Cache index number +1 of this entries' path.
0
(and >MAX_CACHED_PATHS
) is used as uninitialized; so the value here has range of [1 .. MAX_CACHED_PATHS]
instead of the usual [0 .. MAX_CACHED_PATHS-1]
.
Definition at line 468 of file global.h.
Referenced by ops__build_path(), ops__copy_single_entry(), and ops__make_shadow_entry().
unsigned int estat::change_flag |
Flag whether this entry has changed or not changed (as per MD5/manber-compare), or if this is unknown yet.
See ChgFlag.
Definition at line 342 of file global.h.
Referenced by cs__compare_file(), and ops__copy_single_entry().
AC_CV_C_UINT32_T estat::child_index |
Used in waa__input_tree() and waa__update_tree().
Definition at line 410 of file global.h.
Referenced by ops__copy_single_entry(), waa___finish_directory(), waa__input_tree(), and waa__update_tree().
char* estat::decoder |
The en/decoder string.
Only gets set if action->needs_decoder!=0
from fsvs:update-pipe
, or in commit from fsvs:commit-pipe
.
Definition at line 332 of file global.h.
Referenced by cb___close_file(), cb__add_entry(), ci___send_user_props(), ci__nondir(), DEBUGP_dump_estat(), ops__copy_single_entry(), rev___revert_to_base(), rev___undo_change(), rev__install_file(), up__apply_textdelta(), up__fetch_decoder(), and up__parse_prop().
unsigned int estat::decoder_is_correct |
This flag tells whether the string for the decoder is surely correct.
It is currently used for updates; after we parse the properties in cb__record_changes(), we'll have the correct value.
Definition at line 481 of file global.h.
Referenced by cb___open_file(), DEBUGP_dump_estat(), ops__copy_single_entry(), and up__parse_prop().
unsigned int estat::do_child_wanted |
Says that a child of this entry was given by the user on the commandline.
Unlike FS_CHILD_CHANGED, which is set if some child has actually changed, this just says that we have to check.
Definition at line 490 of file global.h.
Referenced by DEBUGP_dump_estat(), ops__are_children_interesting(), ops__copy_single_entry(), waa___recurse_tree(), waa__partial_update(), and waa__update_tree().
unsigned int estat::do_filter_allows |
Flag saying whether the "-f"
filter condition applies.
Normally set in ops__set_todo_bits(), can be cleared in ops__update_filter_set_bits().
Definition at line 497 of file global.h.
Referenced by DEBUGP_dump_estat(), main(), ops__allowed_by_filter(), ops__calc_filter_bit(), ops__set_todo_bits(), ops__update_filter_set_bits(), and waa__update_tree().
unsigned int estat::do_filter_allows_done |
Flag used for debugging.
If estat::do_filter_allows is queried without being defined earlier, we trigger a BUG(). Was conditionalized on ENABLE_DEBUG
- but that got ugly.
Definition at line 501 of file global.h.
Referenced by DEBUGP_dump_estat(), main(), ops__allowed_by_filter(), ops__calc_filter_bit(), ops__set_todo_bits(), and waa__update_tree().
unsigned int estat::do_this_entry |
Flag derived from parents' estat::do_userselected.
Set for all entries which should be handled.
Definition at line 493 of file global.h.
Referenced by DEBUGP_dump_estat(), ops___set_todo_bits(), ops__are_children_interesting(), ops__copy_single_entry(), ops__set_todo_bits(), ops__update_filter_set_bits(), rev___local_revert(), waa___check_dir_for_update(), waa___recurse_tree(), waa__do_sorted_tree(), waa__partial_update(), and waa__update_tree().
unsigned int estat::do_userselected |
Flag saying whether this entry was specified by the user on the command line.
Definition at line 485 of file global.h.
Referenced by bld__work(), DEBUGP_dump_estat(), ops___set_todo_bits(), ops__are_children_interesting(), ops__copy_single_entry(), ops__set_todo_bits(), waa___recurse_tree(), waa__partial_update(), and waa__update_tree().
AC_CV_C_UINT32_T estat::entry_count |
How many entries this directory has.
Definition at line 365 of file global.h.
Referenced by ac___up_set_paths(), cb___add_directory(), cb___report_path_rev(), cb__add_entry(), cm___match_children(), DEBUGP_dump_estat(), df___diff_wc_remote(), df___repos_repos(), dir__enumerator(), dir__sortbyinode(), dir__sortbyname(), main(), ops___entries_to_write(), ops__copy_single_entry(), ops__delete_entry(), ops__find_entry_byinode(), ops__find_entry_byname(), ops__free_entry(), ops__free_marked(), ops__has_children(), ops__load_1entry(), ops__new_entries(), ops__traverse(), rev___local_revert(), rev__do_changed(), st__print_entry_info(), up__rmdir(), waa___finish_directory(), waa___recurse_tree(), waa__build_tree(), waa__copy_entries(), waa__input_tree(), waa__output_tree(), waa__update_dir(), and waa__update_tree().
unsigned int estat::entry_status |
Local status of this entry - fs_bits.
Definition at line 458 of file global.h.
Referenced by ac___up_set_paths(), ac__dispatch(), ci__action(), ci__nondir(), cm___register_entry(), cm__find_copied(), DEBUGP_dump_estat(), df___diff_wc_remote(), df___direct_diff(), ign___test_all_patterns(), ign___test_single_pattern(), ops__calc_filter_bit(), ops__copy_single_entry(), ops__update_filter_set_bits(), ops__update_single_entry(), rev___handle_dir_mtime(), rev___local_revert(), rev___no_local_change(), rev___revert_to_base(), rev___undo_change(), rev__do_changed(), st__action(), st__print_entry_info(), st__status(), st__status_string(), up__apply_textdelta(), up__unlink(), waa___check_dir_for_update(), waa___finish_directory(), waa___recurse_tree(), waa__build_tree(), waa__partial_update(), waa__update_dir(), and waa__update_tree().
AC_CV_C_UINT32_T estat::file_index |
apr_pool_t* estat::filehandle_pool |
The pool used for the filehandles; for a discussion see FHP.
Definition at line 399 of file global.h.
Referenced by up__apply_textdelta(), and up__close_file().
AC_CV_C_UINT32_T estat::flags |
Flags for this entry.
See EntFlags for constant definitions.
Definition at line 435 of file global.h.
Referenced by au__action(), ci___unset_copyflags(), ci__action(), ci__nondir(), cm___get_sub_source_rek(), cm___ignore_impl_copied(), cm___make_copy(), cm__get_source(), cm__uncopy(), cs__set_file_committed(), DEBUGP_dump_estat(), df___direct_diff(), df__do_diff(), info__action(), ops__apply_group(), ops__copy_single_entry(), ops__load_1entry(), ops__save_1entry(), ops__should_entry_be_written_in_list(), ops__stat_to_action(), ops__traverse(), ops__update_single_entry(), prp__s_work(), res__action(), res__mark_conflict(), res__remove_aux_files(), rev___handle_dir_mtime(), rev___revert_to_base(), rev___undo_change(), rev__do_changed(), rev__install_file(), st__print_entry_info(), st__status(), sync__progress(), sync__work(), up__close_directory(), waa___check_dir_for_update(), waa__partial_update(), waa__update_dir(), and waa__update_tree().
unsigned int estat::has_orig_md5 |
Whether we got an "original" MD5 from the repository to compare.
Definition at line 338 of file global.h.
Referenced by cb___close_file(), cb__add_entry(), ops__copy_single_entry(), and up__parse_prop().
unsigned estat::local_mode_packed |
This is the current local value, and is always set on ops__update_single_entry()
.
Definition at line 453 of file global.h.
Referenced by cb__add_entry(), DEBUGP_dump_estat(), df___diff_wc_remote(), dir__enumerator(), ops__load_1entry(), ops__string_to_dev(), ops__update_single_entry(), rev___undo_change(), rev__install_file(), up__handle_special(), waa___finish_directory(), waa___recurse_tree(), and waa__update_tree().
struct ignore_t* estat::match_pattern [read] |
Which pattern matched this entry.
Only set for new entries, and NULL
if none.
Definition at line 425 of file global.h.
Referenced by ign___test_all_patterns(), ign___test_single_pattern(), ign__is_ignore(), ops__apply_group(), ops__save_1entry(), and st__print_status().
MD5-hash of the repository version.
While committing it is set to the new MD5, and saved with waa__output_tree().
Definition at line 335 of file global.h.
Referenced by cb___close_file(), cb__add_entry(), ci__nondir(), cm___md5_datum(), cs___finish_manber(), cs__compare_file(), DEBUGP_dump_estat(), hlp__stream_md5(), ops__copy_single_entry(), ops__load_1entry(), ops__save_1entry(), rev__get_text_to_stream(), st__print_entry_info(), up__apply_textdelta(), up__close_file(), and up__parse_prop().
char* estat::name |
Name of this entry.
Definition at line 302 of file global.h.
Referenced by ac__dispatch(), cb___remover(), cb__add_entry(), ci__nondir(), ci__work(), cm___get_sub_source_rek(), cm___ignore_impl_copied(), cm___match(), cm___match_children(), cm___name_datum(), cm___register_entry(), cm__find_copied(), cm__find_file_source(), cm__get_source(), DEBUGP_dump_estat(), dir__enumerator(), hlp__format_path(), hlp__match_path_envs(), main(), ops___dev_to_string(), ops__allowed_by_filter(), ops__apply_group(), ops__build_path2(), ops__calc_path_len(), ops__correlate_dirs(), ops__save_1entry(), ops__traverse(), rev___local_revert(), rev__do_changed(), up__parse_prop(), up__rmdir(), waa___check_dir_for_update(), waa___finish_directory(), waa__build_tree(), waa__copy_entries(), waa__input_tree(), waa__output_tree(), waa__update_dir(), and waa__update_tree().
unsigned estat::new_rev_mode_packed |
This is the new value, which we got from the repository.
Definition at line 450 of file global.h.
Referenced by cb__add_entry(), DEBUGP_dump_estat(), df___diff_wc_remote(), ops__load_1entry(), rev__install_file(), sync__progress(), up__handle_special(), up__parse_prop(), and up__set_meta_data().
struct estat* estat::old [read] |
If an entry gets removed, the old version is remembered (if needed) via the old
pointer (eg to know which children were known and may be safely removed).
Definition at line 322 of file global.h.
Referenced by DEBUGP_dump_estat(), ops__free_entry(), ops__make_shadow_entry(), rev___revert_to_base(), and rev___undo_change().
svn_revnum_t estat::old_rev |
The revision number before updating.
Definition at line 313 of file global.h.
Referenced by ops__load_1entry(), and rev___undo_change().
unsigned estat::old_rev_mode_packed |
Packed representations of the file type; see preproc.h
for details.
The convention is that estat::st
has the current (mostly local) value, defining which of the estat::entry_count and similar shared members are valid.
See the special fsvsS_constants below, too. This is the value of the old revision.
Definition at line 448 of file global.h.
Referenced by cb__add_entry(), DEBUGP_dump_estat(), dir__enumerator(), ops__load_1entry(), rev___undo_change(), and waa__update_tree().
unsigned int estat::other_revs |
This flag is set if any child is *not* at the same revision, so this directory has to be descended on reporting.
Definition at line 376 of file global.h.
Referenced by cb___add_directory(), cb___report_path_rev(), ops__copy_single_entry(), and waa__input_tree().
struct estat* estat::parent [read] |
The parent of this entry, used for tree walking.
Must be NULL
for the root entry and the root entry alone.
Definition at line 300 of file global.h.
Referenced by ac__dispatch(), au__action(), cb___remover(), cb___report_path_rev(), cb__add_entry(), cm___get_sub_source_rek(), cm___match_children(), DEBUGP_dump_estat(), dir__enumerator(), hlp__format_path(), ign__is_ignore(), log__work(), ops___set_todo_bits(), ops__are_children_interesting(), ops__build_path2(), ops__calc_path_len(), ops__save_1entry(), ops__set_todo_bits(), ops__traverse(), ops__update_filter_set_bits(), ops__update_single_entry(), rev___local_revert(), rev___revert_to_base(), rev___undo_change(), rev__do_changed(), rev__install_file(), st__print_entry_info(), sync___recurse(), waa___finish_directory(), waa__copy_entries(), waa__do_sorted_tree(), waa__input_tree(), waa__output_tree(), waa__partial_update(), waa__update_dir(), and waa__update_tree().
unsigned short estat::path_len |
Length of path up to here.
Does not include the \0
. See ops__calc_path_len.
Definition at line 473 of file global.h.
Referenced by hlp__format_path(), ign__is_ignore(), ops__build_path(), ops__build_path2(), ops__calc_path_len(), ops__copy_single_entry(), url__other_full_url(), and waa__output_tree().
unsigned int estat::remote_status |
Remote status of this entry.
Definition at line 461 of file global.h.
Referenced by cb___apply_textdelta(), cb___delete_entry(), cb___remover(), cb__add_entry(), DEBUGP_dump_estat(), df___diff_wc_remote(), df___repos_repos(), df___reset_remote_st(), ops___dev_to_string(), ops__copy_single_entry(), ops__make_shadow_entry(), rev___handle_dir_mtime(), rev___revert_to_base(), rev___undo_change(), rev__do_changed(), rev__install_file(), st__rm_status(), sync__progress(), up__apply_textdelta(), up__change_file_prop(), up__close_file(), up__parse_prop(), and up__set_meta_data().
svn_revnum_t estat::repos_rev |
Revision of this entry.
Currently only the value in the root entry is used; this will be moved to *
url and removed from here.
Definition at line 311 of file global.h.
Referenced by au__action(), cat__work(), cb___close(), cb___report_path_rev(), cm___make_copy(), cs__set_file_committed(), df___diff_wc_remote(), df___direct_diff(), dir__enumerator(), main(), ops__copy_single_entry(), ops__load_1entry(), ops__save_1entry(), rev___revert_to_base(), rev___undo_change(), rev__get_text_to_stream(), rev__install_file(), st__print_entry_info(), up__open_root(), up__set_target_revision(), and waa__input_tree().
Meta-data of this entry.
Most important: the entry type that is used for the shared members below is determined by st.mode
.
Definition at line 307 of file global.h.
Referenced by ac___up_set_paths(), ac__dispatch(), cb___close_file(), cb___report_path_rev(), cb__add_entry(), ci___set_props(), ci__nondir(), ci__work(), cm___inode_datum(), cm___match(), cm___match_children(), cm___register_entry(), cm__find_copied(), cs__compare_file(), cs__set_file_committed(), DEBUGP_dump_estat(), df___diff_wc_remote(), df___direct_diff(), df___repos_repos(), df___type_def_diff(), df__do_diff(), dir___f_sort_by_inodePP(), dir__enumerator(), exp__work(), ign__is_ignore(), main(), ops___dev_to_string(), ops__copy_single_entry(), ops__delete_entry(), ops__find_entry_byinode(), ops__find_entry_byname(), ops__free_entry(), ops__free_marked(), ops__has_children(), ops__link_to_string(), ops__load_1entry(), ops__save_1entry(), ops__stat_to_action(), ops__string_to_dev(), ops__traverse(), ops__update_filter_set_bits(), ops__update_single_entry(), prp__s_work(), rev___handle_dir_mtime(), rev___local_revert(), rev___revert_to_base(), rev___undo_change(), rev__do_changed(), rev__install_file(), rev__merge(), st___visible_file_size(), st__print_entry_info(), sync__progress(), sync__work(), up__add_directory(), up__apply_textdelta(), up__close_directory(), up__close_file(), up__handle_special(), up__parse_prop(), up__set_meta_data(), waa___find_position(), waa___recurse_tree(), waa__build_tree(), waa__copy_entries(), waa__input_tree(), waa__output_tree(), waa__partial_update(), waa__update_dir(), and waa__update_tree().
svn_stringbuf_t* estat::stringbuf_tgt |
String-buffers for special entries.
While a file is always streamed to disk, special entries are always done in memory.
Definition at line 406 of file global.h.
Referenced by up__apply_textdelta(), up__close_file(), and up__handle_special().
char* estat::strings |
Name storage space for sub- (and sub-sub- etc.
) entries. Mainly used in the root inode, but is used in newly found directories too. NULL
for most directory entries.
Definition at line 353 of file global.h.
Referenced by cb___add_directory(), cb__add_entry(), dir__enumerator(), main(), ops__copy_single_entry(), ops__free_entry(), waa__input_tree(), and waa__update_tree().
unsigned int estat::to_be_ignored |
Whether this entry should not be written into the entry list, and/or ignored otherwise.
Definition at line 505 of file global.h.
Referenced by au__action(), cm___ignore_impl_copied(), DEBUGP_dump_estat(), df___direct_diff(), dir__enumerator(), ign__is_ignore(), ops__apply_group(), ops__find_entry_byname(), ops__should_entry_be_written_in_list(), ops__stat_to_action(), res__action(), rev___revert_to_base(), rev___undo_change(), and waa__build_tree().
unsigned int estat::to_be_sorted |
If this bit is set, the directory has to be re-sorted before being written out -- it may have new entries, which are not in the correct order.
Definition at line 380 of file global.h.
Referenced by cb___add_directory(), ops__copy_single_entry(), ops__new_entries(), rev___undo_change(), rev__install_file(), sync__progress(), and waa__output_tree().
AC_CV_C_UINT32_T estat::unfinished |
Used to know when this directories' children are finished.
Counts the number of unfinished subdirectories. This is volatile and should be in the union below (with estat::child_index), but as it's only used for directories it conserves memory to keep it here.
Definition at line 372 of file global.h.
Referenced by waa___finish_directory(), and waa__update_tree().
struct url_t* estat::url [read] |
The URL this entry is from.
Will be used for multi-url updates.
Definition at line 317 of file global.h.
Referenced by au__action(), cat__work(), cb___remover(), cb___store_prop(), cb__add_entry(), ci___unset_copyflags(), cm___get_base_source(), cm___make_copy(), df___direct_diff(), df__do_diff(), log__work(), ops__apply_group(), ops__copy_single_entry(), ops__load_1entry(), ops__save_1entry(), prp__s_work(), rev___revert_to_base(), rev___undo_change(), rev__install_file(), st__print_status(), up__change_dir_prop(), up__change_file_prop(), up__rmdir(), url__full_url(), and waa__output_tree().
apr_hash_t* estat::user_prop |
Stored user-defined properties as name=>svn_string_t
, if action->keep_user_prop
is set.
Allocated in a subpool of estat::url->pool
, so that it's still available after cb__record_changes() returns. The subpool is available from a hash lookup with key "" (len=0).
Definition at line 432 of file global.h.
Referenced by cb___store_prop().
unsigned int estat::was_output |
Whether this entry was already printed.
Definition at line 477 of file global.h.
Referenced by DEBUGP_dump_estat(), info__action(), ops__copy_single_entry(), and st__status().