The cb__record_changes() and other callback functions header file. More...
#include <subversion-1/svn_ra.h>

Go to the source code of this file.
Functions | |
| svn_error_t * | cb__init (apr_pool_t *pool) |
| Initialize the callback functions. | |
| int | cb__record_changes (struct estat *root, svn_revnum_t target, apr_pool_t *pool) |
| A change-recording editor. | |
| int | cb__record_changes_mixed (struct estat *root, svn_revnum_t target, char *other_paths[], svn_revnum_t other_revs, apr_pool_t *pool) |
| Like cb__record_changes(), but allowing mixed reporting. | |
| int | cb__add_entry (struct estat *dir, const char *utf8_path, char **loc_path, const char *utf8_copy_path, svn_revnum_t copy_rev, int mode, int *has_existed, int may_create, void **new) |
This function adds a new entry below dir, setting it to FS_NEW or FS_REPLACED. | |
| int | cb__does_path_exist (svn_ra_session_t *session, char *path, svn_revnum_t rev, int *exists, apr_pool_t *pool) |
| Checks whether a given remote path exists. | |
| int | cb__remove_from_url (struct estat *root, struct url_t *to_remove, int *was_changed) |
| Removes all entries belonging to to_remove from the tree root. | |
| int | cb__remove_url (struct estat *root, struct url_t *to_remove) |
| Remove all entries from the given URL, and mark it for deletion. | |
Variables | |
| struct svn_ra_callbacks_t | cb__cb_table |
| The callback table for cb__record_changes(). | |
The cb__record_changes() and other callback functions header file.
Definition in file racallback.h.
| int cb__add_entry | ( | struct estat * | dir, | |
| const char * | utf8_path, | |||
| char ** | loc_path, | |||
| const char * | utf8_copy_path, | |||
| svn_revnum_t | copy_rev, | |||
| int | mode, | |||
| int * | has_existed, | |||
| int | may_create, | |||
| void ** | new | |||
| ) |
This function adds a new entry below dir, setting it to FS_NEW or FS_REPLACED.
This function adds a new entry below dir, setting it to FS_NEW or FS_REPLACED.
was not found).
If mode doesn't include some permission bits, like 0700 or 0600, a default value is chosen.
If it didn't exist, or if this is a higher priority URL, the parents get FS_CHILD_CHANGED set.
path gets set (if not NULL) to utf8_path in local encoding.
Definition at line 130 of file racallback.c.
References estat::by_inode, estat::by_name, current_url, DEBUGP, estat::decoder, estat::entry_count, filename, FS_CHANGED, FS_NEW, FS_REMOVED, sstat_t::gid, estat::has_orig_md5, hlp__lstat(), hlp__strdup(), hlp__utf82local(), estat::local_mode_packed, estat::md5, sstat_t::mode, MODE_T_to_PACKED, sstat_t::mtim, estat::name, estat::new_rev_mode_packed, estat::old_rev_mode_packed, ops__allocate(), ops__find_entry_byname(), ops__get_filename(), ops__make_shadow_entry(), ops__mark_parent_cc, ops__new_entries(), PACKED_to_MODE_T, estat::parent, estat::remote_status, S_IFUNDEF, SHADOWED_BY_REMOTE, estat::st, st__type_string(), STOPIF, STOPIF_CODE_ERR, estat::strings, sstat_t::uid, estat::url, and url__current_has_precedence().
Referenced by cb___add_directory(), cb___add_file(), cb___open_directory(), cb___open_file(), sync___recurse(), up__add_directory(), and up__add_file().


| int cb__does_path_exist | ( | svn_ra_session_t * | session, | |
| char * | path, | |||
| svn_revnum_t | rev, | |||
| int * | exists, | |||
| apr_pool_t * | pool | |||
| ) |
Checks whether a given remote path exists.
Checks whether a given remote path exists.
We need a valid revision number, SVN_INVALID_REVNUM (for HEAD) isn't.
Definition at line 1010 of file racallback.c.
References STOPIF_SVNERR.
Referenced by url__open_session().

| svn_error_t* cb__init | ( | apr_pool_t * | pool | ) |
Initialize the callback functions.
Definition at line 36 of file racallback.c.
References BUG_ON, cb__cb_table, hlp__get_svn_config(), OPT__AUTHOR, OPT__CONFIG_DIR, RETURN_SVNERR, STOPIF, and STOPIF_SVNERR.
Referenced by main().


| int cb__record_changes | ( | struct estat * | root, | |
| svn_revnum_t | target, | |||
| apr_pool_t * | pool | |||
| ) |
A change-recording editor.
A change-recording editor.
Just a proxy; calls cb__record_changes_mixed() with the root, target and pool, and default values for the rest.
Definition at line 859 of file racallback.c.
References cb__record_changes_mixed(), and STOPIF.
Referenced by df__work(), rev__work(), sync__work(), and up__work().


| int cb__record_changes_mixed | ( | struct estat * | root, | |
| svn_revnum_t | target, | |||
| char * | other_paths[], | |||
| svn_revnum_t | other_revs, | |||
| apr_pool_t * | pool | |||
| ) |
Like cb__record_changes(), but allowing mixed reporting.
Like cb__record_changes(), but allowing mixed reporting.
Calls the svn libraries and records which entries would be changed on this update on current_url.
| root | The root entry of this wc tree | |
| target | The target revision. SVN_INVALID_REVNUM is not valid. | |
| other_paths | A NULL-terminated list of paths that are sent to the svn_ra_reporter2_t::set_path(). | |
| other_revs | The revision to be sent for other_paths. | |
| pool | An APR-pool. |
When a non-directory entry gets replaced by a directory, its MD5 is lost (because the directory is initialized to entry_count=0 , by_inode=by_name=NULL ); that should not matter, since we have modification flags in entry_status .
If a non-directory gets replaced by a directory, entry_count and by_inode are kept - we need them for up__rmdir() to remove known child entries.
Please note that it's not possible to run invisible entries (that are not seen because some higher priority URL overlays them) to run as baton==NULL (although that would save quite a bit of url__current_has_precedence() calls), because it's possible that some file in a directory below can be seen.
other_paths is a NULL -terminated list of pathnames (which may have the "./" in front, ie. the normalized paths) that are to be reported at revision other_revs.
If other_paths is NULL, or doesn't include an "." entry, the WC root is reported to be at current_url->current_rev or, if this is 0, to be at target, but empty.
Definition at line 905 of file racallback.c.
References cb___change_recorder, cb___dest_rev, cb___report_path_rev(), url_t::current_rev, current_url, DEBUGP, global_pool, PATH_SEPARATOR, url_t::session, STOPIF, and STOPIF_SVNERR.
Referenced by cb__record_changes(), and df__work().


Removes all entries belonging to to_remove from the tree root.
Removes all entries belonging to to_remove from the tree root.
While recursion we look for the highest priority URL in the children (within each level); if there is one, we mark the directory as belonging to that URL.
Will be easier with mixed-WC operation; currently it's not correct if there are overlayed non-directory entries.
Definition at line 825 of file racallback.c.
References cb___remover(), url_t::current_rev, and STOPIF.
Referenced by cb___delete_entry().


Remove all entries from the given URL, and mark it for deletion.
Definition at line 841 of file racallback.c.
References cb___remover(), url_t::current_rev, STOPIF, and url__must_write_defs.
Referenced by up__work().


| struct svn_ra_callbacks_t cb__cb_table |
The callback table for cb__record_changes().
Definition at line 92 of file racallback.c.
Referenced by cb__init(), and url__open_session().
1.6.1