estat Struct Reference
[Entry data storage.]

The central structure for data storage. More...

#include <global.h>

Data Fields

struct estatparent
 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_turl
 The URL this entry is from.
struct estatold
 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_tmatch_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().

Detailed Description

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.

Todo:
Single status, and check entries on-time?

Definition at line 297 of file global.h.


Field Documentation

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

This entries' baton.

Definition at line 394 of file global.h.

struct estat** estat::by_inode [read]
struct estat** estat::by_name [read]
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

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().

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().

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().

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
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
unsigned int estat::entry_status
AC_CV_C_UINT32_T estat::file_index

Used in output_tree().

Definition at line 414 of file global.h.

Referenced by waa__output_tree().

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
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().

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().

char* estat::name

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().

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]
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
svn_revnum_t estat::repos_rev
struct sstat_t estat::st [read]

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().

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
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]
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.

Todo:
Remove by changing the logic.

Definition at line 477 of file global.h.

Referenced by DEBUGP_dump_estat(), info__action(), ops__copy_single_entry(), and st__status().


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

Generated for fsvs by  doxygen 1.6.1