FreeBSD/contrib/subversion/subversion/libsvn_fs_x/changes.c
/* Add CHANGE to the latest change list in CHANGES.
 */
Add CHANGE to the latest change list in CHANGES.
Add CHANGE to the latest change list in CHANGES .
static svn_error_t *
append_change(svn_fs_x__changes_t *changes,
              svn_fs_x__change_t *change)
{
  binary_change_t binary_change = { 0 };
  svn_boolean_t is_txn_id;
  SVN_ERR_ASSERT(change);
  SVN_ERR_ASSERT(change->path.data);
  binary_change.noderev_id = change->noderev_id;
  is_txn_id = svn_fs_x__is_txn(binary_change.noderev_id.change_set);
  binary_change.flags = (change->text_mod ? CHANGE_TEXT_MOD : 0)
                      | (change->prop_mod ? CHANGE_PROP_MOD : 0)
                      | (is_txn_id ? CHANGE_TXN_NODE : 0)
                      | ((int)change->change_kind << CHANGE_KIND_SHIFT)
                      | ((int)change->node_kind << CHANGE_NODE_SHIFT);
  binary_change.path
    = svn_fs_x__string_table_builder_add(changes->builder,
                                         change->path.data,
                                         change->path.len);
  if (SVN_IS_VALID_REVNUM(change->copyfrom_rev))
    {
      binary_change.copyfrom_rev = change->copyfrom_rev;
      binary_change.copyfrom_path
        = svn_fs_x__string_table_builder_add(changes->builder,
                                             change->copyfrom_path,
                                             0);
    }
  else
    {
      binary_change.copyfrom_rev = SVN_INVALID_REVNUM;
      binary_change.copyfrom_path = 0;
    }
  APR_ARRAY_PUSH(changes->changes, binary_change_t) = binary_change;
  return SVN_NO_ERROR;
}
static svn_error_t * append_change ( svn_fs_x__changes_t * changes , svn_fs_x__change_t * change ) { binary_change_t binary_change = { 0 } ; svn_boolean_t is_txn_id ; SVN_ERR_ASSERT ( change ) ; SVN_ERR_ASSERT ( change -> path . data ) ; binary_change . noderev_id = change -> noderev_id ; is_txn_id = svn_fs_x__is_txn ( binary_change . noderev_id . change_set ) ; binary_change . flags = ( change -> text_mod ? CHANGE_TEXT_MOD : 0 ) | ( change -> prop_mod ? CHANGE_PROP_MOD : 0 ) | ( is_txn_id ? CHANGE_TXN_NODE : 0 ) | ( ( int ) change -> change_kind << CHANGE_KIND_SHIFT ) | ( ( int ) change -> node_kind << CHANGE_NODE_SHIFT ) ; binary_change . path = svn_fs_x__string_table_builder_add ( changes -> builder , change -> path . data , change -> path . len ) ; if ( SVN_IS_VALID_REVNUM ( change -> copyfrom_rev ) ) { binary_change . copyfrom_rev = change -> copyfrom_rev ; binary_change . copyfrom_path = svn_fs_x__string_table_builder_add ( changes -> builder , change -> copyfrom_path , 0 ) ; } else { binary_change . copyfrom_rev = SVN_INVALID_REVNUM ; binary_change . copyfrom_path = 0 ; } APR_ARRAY_PUSH ( changes -> changes , binary_change_t ) = binary_change ; return SVN_NO_ERROR ; }
Add CHANGE to the latest change list in CHANGES.
Add CHANGE to the latest change list in CHANGES .
/* CHANGE must be sufficiently complete */ /* Relevant parts of the revision ID of the change. */ /* define the kind of change and what specific information is present */ /* Path of the change. */ /* copy-from information, if presence is indicated by FLAGS */