FreeBSD/contrib/subversion/subversion/libsvn_fs_fs/transaction.c
/* Return in *PATH the path to a file containing the properties that
   make up the final revision properties file.  This involves setting
   svn:date and removing any temporary properties associated with the
   commit flags. */
Return in *PATH the path to a file containing the properties that
make up the final revision properties file.  This involves setting
svn:date and removing any temporary properties associated with the
commit flags.
Return in * PATH the path to a file containing the properties that make up the final revision properties file . This involves setting svn : date and removing any temporary properties associated with the commit flags .
static svn_error_t *
write_final_revprop(const char **path,
                    svn_fs_txn_t *txn,
                    const svn_fs_fs__id_part_t *txn_id,
                    apr_pool_t *pool)
{
  apr_hash_t *txnprops;
  svn_boolean_t final_mods = FALSE;
  svn_string_t date;
  svn_string_t *client_date;
  SVN_ERR(svn_fs_fs__txn_proplist(&txnprops, txn, pool));
  if (svn_hash_gets(txnprops, SVN_FS__PROP_TXN_CHECK_OOD))
    {
      svn_hash_sets(txnprops, SVN_FS__PROP_TXN_CHECK_OOD, NULL);
      final_mods = TRUE;
    }
  if (svn_hash_gets(txnprops, SVN_FS__PROP_TXN_CHECK_LOCKS))
    {
      svn_hash_sets(txnprops, SVN_FS__PROP_TXN_CHECK_LOCKS, NULL);
      final_mods = TRUE;
    }
  client_date = svn_hash_gets(txnprops, SVN_FS__PROP_TXN_CLIENT_DATE);
  if (client_date)
    {
      svn_hash_sets(txnprops, SVN_FS__PROP_TXN_CLIENT_DATE, NULL);
      final_mods = TRUE;
    }
  if (!client_date || strcmp(client_date->data, "1"))
    {
      date.data = svn_time_to_cstring(apr_time_now(), pool);
      date.len = strlen(date.data);
      svn_hash_sets(txnprops, SVN_PROP_REVISION_DATE, &date);
      final_mods = TRUE;
    }
  if (final_mods)
    {
      SVN_ERR(set_txn_proplist(txn->fs, txn_id, txnprops, TRUE, pool));
      *path = path_txn_props_final(txn->fs, txn_id, pool);
    }
  else
    {
      *path = path_txn_props(txn->fs, txn_id, pool);
    }
  return SVN_NO_ERROR;
}
static svn_error_t * write_final_revprop ( const char * * path , svn_fs_txn_t * txn , const svn_fs_fs__id_part_t * txn_id , apr_pool_t * pool ) { apr_hash_t * txnprops ; svn_boolean_t final_mods = FALSE ; svn_string_t date ; svn_string_t * client_date ; SVN_ERR ( svn_fs_fs__txn_proplist ( & txnprops , txn , pool ) ) ; if ( svn_hash_gets ( txnprops , SVN_FS__PROP_TXN_CHECK_OOD ) ) { svn_hash_sets ( txnprops , SVN_FS__PROP_TXN_CHECK_OOD , NULL ) ; final_mods = TRUE ; } if ( svn_hash_gets ( txnprops , SVN_FS__PROP_TXN_CHECK_LOCKS ) ) { svn_hash_sets ( txnprops , SVN_FS__PROP_TXN_CHECK_LOCKS , NULL ) ; final_mods = TRUE ; } client_date = svn_hash_gets ( txnprops , SVN_FS__PROP_TXN_CLIENT_DATE ) ; if ( client_date ) { svn_hash_sets ( txnprops , SVN_FS__PROP_TXN_CLIENT_DATE , NULL ) ; final_mods = TRUE ; } if ( ! client_date || strcmp ( client_date -> data , " " ) ) { date . data = svn_time_to_cstring ( apr_time_now ( ) , pool ) ; date . len = strlen ( date . data ) ; svn_hash_sets ( txnprops , SVN_PROP_REVISION_DATE , & date ) ; final_mods = TRUE ; } if ( final_mods ) { SVN_ERR ( set_txn_proplist ( txn -> fs , txn_id , txnprops , TRUE , pool ) ) ; * path = path_txn_props_final ( txn -> fs , txn_id , pool ) ; } else { * path = path_txn_props ( txn -> fs , txn_id , pool ) ; } return SVN_NO_ERROR ; }
Return in *PATH the path to a file containing the properties that
make up the final revision properties file.
Return in * PATH the path to a file containing the properties that make up the final revision properties file .
/* Remove any temporary txn props representing 'flags'. */ /* Update commit time to ensure that svn:date revprops remain ordered if
     requested. */