FreeBSD/contrib/subversion/subversion/libsvn_fs_fs/transaction.c
/* Create a unique directory for a transaction in FS based on revision REV.
   Return the ID for this transaction in *ID_P and *TXN_ID.  Use a sequence
   value in the transaction ID to prevent reuse of transaction IDs. */
Create a unique directory for a transaction in FS based on revision REV.
Return the ID for this transaction in *ID_P and *TXN_ID.  Use a sequence
value in the transaction ID to prevent reuse of transaction IDs.
Create a unique directory for a transaction in FS based on revision REV . Return the ID for this transaction in * ID_P and * TXN_ID . Use a sequence value in the transaction ID to prevent reuse of transaction IDs .
static svn_error_t *
create_txn_dir(const char **id_p,
               svn_fs_fs__id_part_t *txn_id,
               svn_fs_t *fs,
               svn_revnum_t rev,
               apr_pool_t *pool)
{
  struct get_and_increment_txn_key_baton cb;
  const char *txn_dir;
  cb.pool = pool;
  cb.fs = fs;
  SVN_ERR(svn_fs_fs__with_txn_current_lock(fs,
                                           get_and_increment_txn_key_body,
                                           &cb,
                                           pool));
  txn_id->revision = rev;
  txn_id->number = cb.txn_number;
  *id_p = svn_fs_fs__id_txn_unparse(txn_id, pool);
  txn_dir = svn_fs_fs__path_txn_dir(fs, txn_id, pool);
  return svn_io_dir_make(txn_dir, APR_OS_DEFAULT, pool);
}
static svn_error_t * create_txn_dir ( const char * * id_p , svn_fs_fs__id_part_t * txn_id , svn_fs_t * fs , svn_revnum_t rev , apr_pool_t * pool ) { struct get_and_increment_txn_key_baton cb ; const char * txn_dir ; cb . pool = pool ; cb . fs = fs ; SVN_ERR ( svn_fs_fs__with_txn_current_lock ( fs , get_and_increment_txn_key_body , & cb , pool ) ) ; txn_id -> revision = rev ; txn_id -> number = cb . txn_number ; * id_p = svn_fs_fs__id_txn_unparse ( txn_id , pool ) ; txn_dir = svn_fs_fs__path_txn_dir ( fs , txn_id , pool ) ; return svn_io_dir_make ( txn_dir , APR_OS_DEFAULT , pool ) ; }
Create a unique directory for a transaction in FS based on revision REV.
Create a unique directory for a transaction in FS based on revision REV .
/* Get the current transaction sequence value, which is a base-36
     number, from the txn-current file, and write an
     incremented value back out to the file.  Place the revision
     number the transaction is based off into the transaction id. */