/* A status callback function for printing STATUS for PATH. */ static void print_status(void *baton, const char *path, svn_wc_status2_t *status) { struct status_baton *sb = baton; /* If there's a changelist attached to the entry, then we don't print the item, but instead dup & cache the status structure for later. */ if (status->entry && status->entry->changelist) { /* The hash maps a changelist name to an array of status_cache structures. */ apr_array_header_t *path_array; const char *cl_key = apr_pstrdup(sb->cl_pool, status->entry->changelist); struct status_cache *scache = apr_pcalloc(sb->cl_pool, sizeof(*scache)); scache->path = apr_pstrdup(sb->cl_pool, path); scache->status = svn_wc_dup_status2(status, sb->cl_pool); path_array = (apr_array_header_t *) apr_hash_get(sb->cached_changelists, cl_key, APR_HASH_KEY_STRING); if (path_array == NULL) { path_array = apr_array_make(sb->cl_pool, 1, sizeof(struct status_cache *)); apr_hash_set(sb->cached_changelists, cl_key, APR_HASH_KEY_STRING, path_array); } APR_ARRAY_PUSH(path_array, struct status_cache *) = scache; return; } print_status_normal_or_xml(baton, path, status); }
Data(const char * path_, const svn_wc_status2_t * status_) : status(0), path("") { if (path_ != 0) path = path_; if (status_ != 0) { status = svn_wc_dup_status2( const_cast<svn_wc_status2_t *>(status_), pool); isVersioned = status_->text_status > svn_wc_status_unversioned; } }
static void StatusEntriesFunc ( void *baton, const char *path, svn_wc_status2_t *status ) { svn_wc_status2_t *stat; StatusEntriesBaton *seb = reinterpret_cast<StatusEntriesBaton *>( baton ); path = apr_pstrdup( seb->pool, path ); stat = svn_wc_dup_status2( status, seb->pool ); apr_hash_set( seb->hash, path, APR_HASH_KEY_STRING, stat ); }
Data(const Data * src) : status(0), path(src->path) { if (src->status != 0) { status = svn_wc_dup_status2(src->status, pool); switch (status->text_status) { case svn_wc_status_none: case svn_wc_status_unversioned: case svn_wc_status_ignored: case svn_wc_status_obstructed: isVersioned = false; break; default: isVersioned = true; } } }