Lines Matching defs:rb

1503                     rep_read_baton_t *rb)
1508 svn_stringbuf_t *source, *buf = rb->base_window;
1516 window_pool = svn_pool_create(rb->scratch_pool);
1518 iterpool = svn_pool_create(rb->scratch_pool);
1519 for (i = 0; i < rb->rs_list->nelts; ++i)
1525 rs = APR_ARRAY_IDX(rb->rs_list, i, rep_state_t *);
1526 SVN_ERR(read_delta_window(&window, rb->chunk_index, rs, window_pool,
1538 pool = svn_pool_create(rb->scratch_pool);
1545 rs = APR_ARRAY_IDX(rb->rs_list, i, rep_state_t *);
1553 if (source == NULL && rb->src_state != NULL)
1554 SVN_ERR(read_container_window(&source, rb->src_state,
1558 new_pool = svn_pool_create(rb->scratch_pool);
1572 if ( (rb->chunk_index == 0) && (rs->current == rs->size)
1606 rep_read_baton_t *rb = baton;
1608 svn_pool_destroy(rb->scratch_pool);
1609 svn_pool_destroy(rb->filehandle_pool);
1801 get_contents_from_windows(rep_read_baton_t *rb,
1811 if (rb->rs_list->nelts == 0 && rb->buf == NULL)
1814 rs = rb->src_state;
1817 if (rs->header_size == 0 && rb->base_window == NULL)
1822 SVN_ERR(read_container_window(&rb->base_window, rs, rb->len,
1823 rb->scratch_pool, rb->scratch_pool));
1824 rs->current -= rb->base_window->len;
1827 if (rb->base_window != NULL)
1833 if (copy_len + offset > rb->base_window->len)
1834 copy_len = offset < rb->base_window->len
1835 ? rb->base_window->len - offset
1838 memcpy (cur, rb->base_window->data + offset, copy_len);
1849 if (rb->buf)
1852 copy_len = rb->buf_len - rb->buf_pos;
1857 memcpy(cur, rb->buf + rb->buf_pos, copy_len);
1858 rb->buf_pos += copy_len;
1864 if (rb->buf_pos == rb->buf_len)
1866 svn_pool_clear(rb->scratch_pool);
1867 rb->buf = NULL;
1874 rs = APR_ARRAY_IDX(rb->rs_list, 0, rep_state_t *);
1879 SVN_ERR(get_combined_window(&sbuf, rb));
1881 rb->chunk_index++;
1882 rb->buf_len = sbuf->len;
1883 rb->buf = sbuf->data;
1884 rb->buf_pos = 0;
2087 rep_read_baton_t *rb = baton;
2090 if (rb->fulltext_cache)
2093 SVN_ERR(get_contents_from_fulltext(&cached, rb, buf, len));
2099 rb->fulltext_cache = NULL;
2103 if (!rb->rs_list)
2106 SVN_ERR(build_rep_list(&rb->rs_list, &rb->base_window,
2107 &rb->src_state, rb->fs, &rb->rep,
2108 rb->filehandle_pool, rb->scratch_pool));
2113 SVN_ERR(skip_contents(rb, rb->fulltext_delivered));
2117 SVN_ERR(get_contents_from_windows(rb, buf, len));
2119 if (rb->current_fulltext)
2120 svn_stringbuf_appendbytes(rb->current_fulltext, buf, *len);
2126 if (!rb->checksum_finalized)
2128 SVN_ERR(svn_checksum_update(rb->md5_checksum_ctx, buf, *len));
2129 rb->off += *len;
2130 if (rb->off == rb->len)
2135 expected.digest = rb->md5_digest;
2137 rb->checksum_finalized = TRUE;
2138 SVN_ERR(svn_checksum_final(&md5_checksum, rb->md5_checksum_ctx,
2139 rb->scratch_pool));
2143 rb->scratch_pool,
2149 if (rb->off == rb->len && rb->current_fulltext)
2151 svn_fs_x__data_t *ffd = rb->fs->fsap_data;
2152 SVN_ERR(svn_cache__set(ffd->fulltext_cache, &rb->fulltext_cache_key,
2153 rb->current_fulltext, rb->scratch_pool));
2154 rb->current_fulltext = NULL;
2175 rep_read_baton_t *rb;
2184 SVN_ERR(rep_read_get_baton(&rb, fs, rep, fulltext_cache_key,
2194 rb->fulltext_cache = ffd->fulltext_cache;
2200 rb->fulltext_cache_key.revision = SVN_INVALID_REVNUM;
2203 *contents_p = svn_stream_create(rb, result_pool);