Logo Search packages:      
Sourcecode: rapidsvn version File versions  Download package

PathPropertiesMapList svn::Client::proplist ( const Path path,
const Revision revision,
bool  recurse = false 
)

lists properties in path no matter whether local or repository

Parameters:
path 
revision 
recurse 
Returns:
PropertiesList

Definition at line 51 of file client_property.cpp.

References svn::Path::c_str(), and svn::Revision::revision().

  {
    Pool pool;
    apr_array_header_t * props;

    svn_error_t * error =
      svn_client_proplist(&props,
                          path.c_str(),
                          revision.revision(),
                          recurse,
                          *m_context,
                          pool);
    if (error != NULL)
    {
      throw ClientException(error);
    }

    PathPropertiesMapList path_prop_map_list;
    for (int j = 0; j < props->nelts; ++j)
    {
      svn_client_proplist_item_t *item =
        ((svn_client_proplist_item_t **)props->elts)[j];

      PropertiesMap prop_map;

      apr_hash_index_t *hi;
      for (hi = apr_hash_first(pool, item->prop_hash); hi;
           hi = apr_hash_next(hi))
      {
        const void *key;
        void *val;

        apr_hash_this(hi, &key, NULL, &val);

        prop_map [std::string((const char *)key)] =
          std::string(((const svn_string_t *)val)->data);
      }

      path_prop_map_list.push_back(PathPropertiesMapEntry(item->node_name->data, prop_map));
    }

    return path_prop_map_list;
  }


Generated by  Doxygen 1.6.0   Back to index