revert command header file. More...
#include "actions.h"
Go to the source code of this file.
Defines | |
#define | DECODER_UNKNOWN ((char*)-1) |
Has to fetch the decoder from the repository. | |
Functions | |
int | rev__install_file (struct estat *sts, svn_revnum_t revision, char *decoder, apr_pool_t *pool) |
Gets a clean copy from the repository. | |
int | rev__do_changed (struct estat *dir, apr_pool_t *pool) |
Go through the tree, and fetch all changed entries (estimated per remote_status ). | |
int | rev__get_props (struct estat *sts, char *utf8_path, svn_revnum_t revision, apr_pool_t *pool) |
Gets and writes the properties of the given sts into its prop file. | |
int | rev__get_text_to_tmpfile (char *loc_url, svn_revnum_t revision, char *encoder, char *filename_base, char **filename, struct estat *sts_for_manber, struct estat *output_sts, apr_hash_t **props, apr_pool_t *pool) |
Gets the entry into a temporary file. | |
int | rev__get_text_into_buffer (char *loc_url, svn_revnum_t revision, const char *decoder, svn_stringbuf_t **output, struct estat *sts_for_manber, struct estat *output_sts, apr_hash_t **props, apr_pool_t *pool) |
Just a wrapper for rev__get_text_to_stream(). | |
int | rev__get_text_to_stream (char *loc_url, svn_revnum_t revision, const char *decoder, svn_stream_t *output, struct estat *sts_for_manber, struct estat *output_sts, apr_hash_t **props, apr_pool_t *pool) |
General function to get a file into a stream. | |
Variables | |
work_t | rev__work |
revert main action function. |
revert command header file.
Definition in file revert.h.
#define DECODER_UNKNOWN ((char*)-1) |
Has to fetch the decoder from the repository.
Definition at line 21 of file revert.h.
Referenced by cat__work(), df__do_diff(), rev__get_text_to_stream(), and rev__install_file().
int rev__do_changed | ( | struct estat * | dir, | |
apr_pool_t * | pool | |||
) |
Go through the tree, and fetch all changed entries (estimated per remote_status
).
Go through the tree, and fetch all changed entries (estimated per remote_status
).
Used on update.
Definition at line 1344 of file revert.c.
References estat::by_inode, DEBUGP, estat::entry_count, estat::entry_status, estat::flags, FS__CHANGE_MASK, FS_CHILD_CHANGED, FS_NEW, FS_REMOVED, FS_REPLACED, sstat_t::mode, estat::name, NOT_CHANGED, ops__free_marked(), estat::parent, estat::remote_status, rev___handle_dir_mtime(), rev___undo_change(), rev__do_changed(), REVERT_MTIME, RF_CHECK, estat::st, st__rm_status, and STOPIF.
Referenced by rev__do_changed(), rev__work(), and up__work().
int rev__get_props | ( | struct estat * | sts, | |
char * | utf8_path, | |||
svn_revnum_t | revision, | |||
apr_pool_t * | pool | |||
) |
Gets and writes the properties of the given sts into its prop file.
Definition at line 687 of file revert.c.
References current_url, filename, hlp__local2utf8(), ops__build_path(), prp__set_from_aprhash(), url_t::session, STOPIF, STOPIF_SVNERR, and STORE_IN_FS.
Referenced by rev___undo_change().
int rev__get_text_into_buffer | ( | char * | loc_url, | |
svn_revnum_t | revision, | |||
const char * | decoder, | |||
svn_stringbuf_t ** | output, | |||
struct estat * | sts_for_manber, | |||
struct estat * | output_sts, | |||
apr_hash_t ** | props, | |||
apr_pool_t * | pool | |||
) |
Just a wrapper for rev__get_text_to_stream().
Just a wrapper for rev__get_text_to_stream().
Does no validation of input - might fill entire memory.
Definition at line 381 of file revert.c.
References rev__get_text_to_stream(), and STOPIF.
Referenced by sync___recurse().
int rev__get_text_to_stream | ( | char * | loc_url, | |
svn_revnum_t | revision, | |||
const char * | decoder, | |||
svn_stream_t * | output, | |||
struct estat * | sts_for_manber, | |||
struct estat * | output_sts, | |||
apr_hash_t ** | props, | |||
apr_pool_t * | pool | |||
) |
General function to get a file into a stream.
General function to get a file into a stream.
This function fetches an non-directory entry loc_url from the repository in current_url
, and writes it to output - which gets closed via svn_stream_close()
.
decoder should be set correctly.
NULL
, but an update-pipe is set on the entry, the data has to be read from disk again, to be correctly processed.No meta-data is set, and the svn:special
attribute is ignored.
The revision number must be valid, it may not be SVN_INVALID_REVNUM
.
If sts_for_manber is NULL
, no manber hashes are calculated.
If output_sts is NULL
, the meta-data properties are kept in props; else its fields are filled (as far as possible) with data. That includes the estat::repos_rev field.
The user-specified properties can be returned in props.
As this just returns the data in a stream, the files' type mostly doesn't matter; it just may not be a directory, because we'd get an error from subversion.
loc_url must be given in the current locale; it will be converted to UTF8 before being sent to the subversion libraries.
Definition at line 182 of file revert.c.
References cs__new_manber_filter(), current_url, DEBUGP, DECODER_UNKNOWN, FSVS_EXP_TARGET_REVISION, hlp__encode_filter(), hlp__local2utf8(), hlp__rev_to_string(), estat::md5, ONLY_KEEP_USERDEF, encoder_t::output_md5, propval_updatepipe, prp__set_from_aprhash(), estat::repos_rev, url_t::session, STOPIF, STOPIF_SVNERR, STOPIF_SVNERR_TEXT, url_t::url, and url_t::urllen.
Referenced by cat__work(), rev__get_text_into_buffer(), rev__get_text_to_tmpfile(), and rev__install_file().
int rev__get_text_to_tmpfile | ( | char * | loc_url, | |
svn_revnum_t | revision, | |||
char * | encoder, | |||
char * | filename_base, | |||
char ** | filename, | |||
struct estat * | sts_for_manber, | |||
struct estat * | output_sts, | |||
apr_hash_t ** | props, | |||
apr_pool_t * | pool | |||
) |
Gets the entry into a temporary file.
Gets the entry into a temporary file.
Mostly the same as rev__get_text_to_stream()
, but returning a (temporary) filename based on filename_base, if this is not NULL
.
The entries' file type isn't taken into account; the file may have the data "symlink XXX"
, etc.
If filename_base is NULL
, the file will be put in a real temporary location.
output_stat is used to store the parsed properties of the entry.
Definition at line 350 of file revert.c.
References rev__get_text_to_stream(), STOPIF, and waa__get_tmp_name().
Referenced by df__do_diff().
int rev__install_file | ( | struct estat * | sts, | |
svn_revnum_t | revision, | |||
char * | decoder, | |||
apr_pool_t * | pool | |||
) |
Gets a clean copy from the repository.
Gets a clean copy from the repository.
Meta-data is set; an existing local entry gets atomically removed by rename()
.
If the entry has no URL defined yet, but has a copy flag set (RF_COPY_BASE
or RF_COPY_SUB
), this URL is taken.
If revision is 0, the BASE
revision is and decoder is used; this is the copy base for copied entries.
Definition at line 417 of file revert.c.
References BUG, BUG_ON, cm__get_source(), current_url, DEBUGP, estat::decoder, DECODER_UNKNOWN, filename, filename_tmp, estat::flags, FS_META_CHANGED, hlp__lstat(), estat::local_mode_packed, sstat_t::mode, MODE_T_to_PACKED, estat::new_rev_mode_packed, ops__build_path(), ops__read_special_entry(), estat::parent, propname_special, prp__set_from_aprhash(), estat::remote_status, estat::repos_rev, rev__get_text_to_stream(), RF___IS_COPY, estat::st, STOPIF, STOPIF_CODE_ERR, STORE_IN_FS, estat::to_be_sorted, up__fetch_decoder(), up__handle_special(), up__set_meta_data(), estat::url, url__find(), url__open_session(), waa__delete_byext(), WAA__FILE_MD5s_EXT, waa__get_tmp_name(), and waa__mkdir().
Referenced by rev___revert_to_base(), and rev___undo_change().