Lines Matching defs:rb

137   struct revision_baton *rb;
193 struct revision_baton *rb = baton;
194 struct parse_baton *pb = rb->pb;
202 set_revision_mapping(pb->rev_map, rb->rev, commit_info->revision);
210 && (rb->rev != pb->last_rev_mapped + 1))
214 for (i = pb->last_rev_mapped + 1; i < rb->rev; i++)
221 pb->last_rev_mapped = rb->rev;
247 struct revision_baton *rb = baton;
252 base_revision = rb->rev - 1;
258 err = svn_ra_get_file(rb->pb->aux_session, path, base_revision,
284 struct revision_baton *rb = baton;
288 base_revision = rb->rev - 1;
290 SVN_ERR(svn_ra_check_path(rb->pb->aux_session, path, base_revision,
295 SVN_ERR(svn_ra_get_file(rb->pb->aux_session, path, base_revision,
302 SVN_ERR(svn_ra_get_dir2(rb->pb->aux_session, NULL, NULL, props, path,
325 struct revision_baton *rb = baton;
328 base_revision = rb->rev - 1;
330 SVN_ERR(svn_ra_check_path(rb->pb->aux_session, path, base_revision,
337 get_shim_callbacks(struct revision_baton *rb,
346 callbacks->fetch_baton = rb;
395 struct revision_baton *rb;
400 rb = apr_pcalloc(pool, sizeof(*rb));
402 rb->pool = svn_pool_create(pool);
403 rb->pb = pb;
404 rb->db = NULL;
412 rb->rev = atoi(hval);
421 rb->rev_offset = (apr_int32_t) ((rb->rev) - (head_rev + 1));
424 if ((rb->rev > 0) && (!SVN_IS_VALID_REVNUM(pb->oldest_dumpstream_rev)))
425 pb->oldest_dumpstream_rev = rb->rev;
429 rb->pb->commit_editor = NULL;
430 rb->pb->commit_edit_baton = NULL;
431 rb->revprop_table = apr_hash_make(rb->pool);
433 *revision_baton = rb;
462 push_directory(struct revision_baton *rb,
469 struct directory_baton *child_db = apr_pcalloc(rb->pool, sizeof (*child_db));
477 && ARE_VALID_COPY_ARGS(rb->db->copyfrom_path, rb->db->copyfrom_rev))
481 copyfrom_path = svn_relpath_join(rb->db->copyfrom_path, name,
482 rb->pool);
483 copyfrom_rev = rb->db->copyfrom_rev;
490 child_db->parent = rb->db;
491 rb->db = child_db;
500 struct revision_baton *rb = revision_baton;
501 const struct svn_delta_editor_t *commit_editor = rb->pb->commit_editor;
502 void *commit_edit_baton = rb->pb->commit_edit_baton;
508 nb = apr_pcalloc(rb->pool, sizeof(*nb));
509 nb->rb = rb;
514 nb->prop_changes = apr_hash_make(rb->pool);
528 svn_hash_sets(rb->revprop_table, SVN_PROP_REVISION_AUTHOR, NULL);
529 svn_hash_sets(rb->revprop_table, SVN_PROP_REVISION_DATE, NULL);
531 SVN_ERR(svn_ra__register_editor_shim_callbacks(rb->pb->session,
532 get_shim_callbacks(rb, rb->pool)));
533 SVN_ERR(svn_ra_get_commit_editor3(rb->pb->session, &commit_editor,
534 &commit_edit_baton, rb->revprop_table,
536 NULL, FALSE, rb->pool));
538 rb->pb->commit_editor = commit_editor;
539 rb->pb->commit_edit_baton = commit_edit_baton;
542 rb->rev - rb->rev_offset - 1,
543 rb->pool, &child_baton));
546 push_directory(rb, child_baton, "", TRUE /*is_added*/,
550 for (hi = apr_hash_first(rb->pool, headers); hi; hi = apr_hash_next(hi))
558 nb->path = apr_pstrdup(rb->pool, hval);
573 nb->base_checksum = apr_pstrdup(rb->pool, hval);
577 nb->copyfrom_path = apr_pstrdup(rb->pool, hval);
585 rb->db->relpath) != 0)
595 rb->db->relpath, pool);
598 rb->db->relpath));
607 /* Don't worry about destroying the actual rb->db object,
610 SVN_ERR(commit_editor->close_directory(rb->db->baton, rb->pool));
611 rb->db = rb->db->parent;
617 svn_relpath_join(rb->db->relpath,
619 rb->pool);
621 rb->db->baton,
622 rb->rev - rb->rev_offset - 1,
623 rb->pool, &child_baton));
624 push_directory(rb, child_baton, relpath_compose, TRUE /*is_added*/,
638 copyfrom_rev = get_revision_mapping(rb->pb->rev_map, nb->copyfrom_rev);
640 copyfrom_rev = nb->copyfrom_rev - rb->rev_offset;
650 if (rb->pb->parent_dir)
651 nb->copyfrom_path = svn_relpath_join(rb->pb->parent_dir,
652 nb->copyfrom_path, rb->pool);
654 nb->copyfrom_url = svn_path_url_add_component2(rb->pb->root_url,
656 rb->pool);
665 rb->rev - rb->rev_offset - 1,
666 rb->db->baton, rb->pool));
676 SVN_ERR(commit_editor->add_file(nb->path, rb->db->baton,
679 rb->pool, &(nb->file_baton)));
682 SVN_ERR(commit_editor->add_directory(nb->path, rb->db->baton,
685 rb->pool, &child_baton));
686 push_directory(rb, child_baton, nb->path, TRUE /*is_added*/,
697 SVN_ERR(commit_editor->open_file(nb->path, rb->db->baton,
698 SVN_INVALID_REVNUM, rb->pool,
702 SVN_ERR(commit_editor->open_directory(nb->path, rb->db->baton,
703 rb->rev - rb->rev_offset - 1,
704 rb->pool, &child_baton));
705 push_directory(rb, child_baton, nb->path, FALSE /*is_added*/,
721 struct revision_baton *rb = baton;
723 SVN_ERR(svn_rdump__normalize_prop(name, &value, rb->pool));
725 SVN_ERR(svn_repos__validate_prop(name, value, rb->pool));
727 if (rb->rev > 0)
729 if (! svn_hash_gets(rb->pb->skip_revprops, name))
730 svn_hash_sets(rb->revprop_table,
731 apr_pstrdup(rb->pool, name),
732 svn_string_dup(value, rb->pool));
734 else if (rb->rev_offset == -1
735 && ! svn_hash_gets(rb->pb->skip_revprops, name))
740 SVN_ERR(svn_ra_change_rev_prop2(rb->pb->session, 0,
741 name, NULL, value, rb->pool));
747 rb->datestamp = svn_string_dup(value, rb->pool);
749 rb->author = svn_string_dup(value, rb->pool);
760 struct revision_baton *rb = nb->rb;
761 struct parse_baton *pb = rb->pb;
762 apr_pool_t *pool = nb->rb->pool;
774 rb->rev_offset,
790 prop = apr_palloc(nb->rb->pool, sizeof (*prop));
803 apr_pool_t *pool = nb->rb->pool;
828 struct revision_baton *rb = nb->rb;
829 apr_pool_t *pool = nb->rb->pool;
842 && ARE_VALID_COPY_ARGS(rb->db->copyfrom_path, rb->db->copyfrom_rev))
844 /* If this is a dir, then it's described by rb->db;
845 if this is a file, then it's a child of the dir in rb->db. */
847 ? rb->db->copyfrom_path
848 : svn_relpath_join(rb->db->copyfrom_path,
850 rb->pool);
851 orig_rev = rb->db->copyfrom_rev;
869 SVN_ERR(svn_ra_get_file(nb->rb->pb->aux_session,
874 SVN_ERR(svn_ra_get_dir2(nb->rb->pb->aux_session, NULL, NULL, &props,
895 const struct svn_delta_editor_t *commit_editor = nb->rb->pb->commit_editor;
898 apr_pool_t *pool = nb->rb->pool;
913 const struct svn_delta_editor_t *commit_editor = nb->rb->pb->commit_editor;
914 apr_pool_t *pool = nb->rb->pool;
926 const struct svn_delta_editor_t *commit_editor = nb->rb->pb->commit_editor;
927 apr_pool_t *pool = nb->rb->pool;
943 SVN_ERR(commit_editor->change_dir_prop(nb->rb->db->baton,
955 SVN_ERR(commit_editor->close_file(nb->file_baton, NULL, nb->rb->pool));
966 struct revision_baton *rb = baton;
967 const svn_delta_editor_t *commit_editor = rb->pb->commit_editor;
968 void *commit_edit_baton = rb->pb->commit_edit_baton;
972 if (rb->rev == 0)
975 if (! rb->pb->quiet)
976 SVN_ERR(svn_cmdline_printf(rb->pool, "* Loaded revision 0.\n"));
982 while (rb->db && rb->db->parent)
984 SVN_ERR(commit_editor->close_directory(rb->db->baton, rb->pool));
985 rb->db = rb->db->parent;
988 SVN_ERR(commit_editor->close_directory(rb->db->baton, rb->pool));
989 SVN_ERR(commit_editor->close_edit(commit_edit_baton, rb->pool));
996 SVN_ERR(svn_ra_get_commit_editor3(rb->pb->session, &commit_editor,
997 &commit_edit_baton, rb->revprop_table,
999 NULL, FALSE, rb->pool));
1002 rb->rev - rb->rev_offset - 1,
1003 rb->pool, &child_baton));
1005 SVN_ERR(commit_editor->close_directory(child_baton, rb->pool));
1006 SVN_ERR(commit_editor->close_edit(commit_edit_baton, rb->pool));
1013 if (rb->rev > 0)
1015 committed_rev = get_revision_mapping(rb->pb->rev_map, rb->rev);
1017 else if (rb->rev_offset == -1)
1024 if (!svn_hash_gets(rb->pb->skip_revprops, SVN_PROP_REVISION_DATE))
1027 rb->datestamp, rb->pool));
1028 SVN_ERR(svn_ra_change_rev_prop2(rb->pb->session, committed_rev,
1030 NULL, rb->datestamp, rb->pool));
1032 if (!svn_hash_gets(rb->pb->skip_revprops, SVN_PROP_REVISION_AUTHOR))
1035 rb->author, rb->pool));
1036 SVN_ERR(svn_ra_change_rev_prop2(rb->pb->session, committed_rev,
1038 NULL, rb->author, rb->pool));
1042 svn_pool_destroy(rb->pool);