FreeBSD/contrib/subversion/subversion/libsvn_fs_fs/transaction.c
/* Write out the currently available next node_id NODE_ID and copy_id
   COPY_ID for transaction TXN_ID in filesystem FS.  The next node-id is
   used both for creating new unique nodes for the given transaction, as
   well as uniquifying representations.  Perform temporary allocations in
   POOL. */
Write out the currently available next node_id NODE_ID and copy_id
COPY_ID for transaction TXN_ID in filesystem FS.  The next node-id is
used both for creating new unique nodes for the given transaction, as
well as uniquifying representations.  Perform temporary allocations in
POOL.
Write out the currently available next node_id NODE_ID and copy_id COPY_ID for transaction TXN_ID in filesystem FS . The next node - id is used both for creating new unique nodes for the given transaction as well as uniquifying representations . Perform temporary allocations in POOL .
static svn_error_t *
write_next_ids(svn_fs_t *fs,
               const svn_fs_fs__id_part_t *txn_id,
               apr_uint64_t node_id,
               apr_uint64_t copy_id,
               apr_pool_t *pool)
{
  apr_file_t *file;
  char buffer[2 * SVN_INT64_BUFFER_SIZE + 2];
  char *p = buffer;
  p += svn__ui64tobase36(p, node_id);
  *(p++) = ' ';
  p += svn__ui64tobase36(p, copy_id);
  *(p++) = '\n';
  *(p++) = '\0';
  SVN_ERR(svn_io_file_open(&file,
                           path_txn_next_ids(fs, txn_id, pool),
                           APR_WRITE | APR_TRUNCATE,
                           APR_OS_DEFAULT, pool));
  SVN_ERR(svn_io_file_write_full(file, buffer, p - buffer, NULL, pool));
  return svn_io_file_close(file, pool);
}
static svn_error_t * write_next_ids ( svn_fs_t * fs , const svn_fs_fs__id_part_t * txn_id , apr_uint64_t node_id , apr_uint64_t copy_id , apr_pool_t * pool ) { apr_file_t * file ; char buffer [ 2 * SVN_INT64_BUFFER_SIZE + 2 ] ; char * p = buffer ; p += svn__ui64tobase36 ( p , node_id ) ; * ( p ++ ) = ' ' ; p += svn__ui64tobase36 ( p , copy_id ) ; * ( p ++ ) = ' \n ' ; * ( p ++ ) = ' \0 ' ; SVN_ERR ( svn_io_file_open ( & file , path_txn_next_ids ( fs , txn_id , pool ) , APR_WRITE | APR_TRUNCATE , APR_OS_DEFAULT , pool ) ) ; SVN_ERR ( svn_io_file_write_full ( file , buffer , p - buffer , NULL , pool ) ) ; return svn_io_file_close ( file , pool ) ; }
Write out the currently available next node_id NODE_ID and copy_id
COPY_ID for transaction TXN_ID in filesystem FS.
Write out the currently available next node_id NODE_ID and copy_id COPY_ID for transaction TXN_ID in filesystem FS .