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

std::vector< svn_revnum_t > svn::Client::update ( const Targets targets,
const Revision revision,
bool  recurse,
bool  ignore_externals 
) throw (ClientException)

Updates the file or directory.

Parameters:
targets target files.
revision the revision number to checkout. Revision::HEAD will checkout the latest revision.
recurse recursively update.
ignore_externals don't affect external destinations.
Exceptions:
ClientException 
Returns:
a vector with resulting revisions

Definition at line 171 of file client_modify.cpp.

Referenced by GetAction::Perform().

  {
    Pool pool;
    apr_array_header_t * result_revs;

    svn_error_t * error =
      svn_client_update2(&result_revs,
                         const_cast<apr_array_header_t*>(targets.array(pool)),
                         revision.revision(),
                         recurse,
                         ignore_externals,
                         *m_context,
                         pool);
    if (error != NULL)
      throw ClientException(error);

    std::vector<svn_revnum_t> revnums;
    int i;
    for (i = 0; i < result_revs->nelts; i++)
    {
      svn_revnum_t revnum=
        APR_ARRAY_IDX(result_revs, i, svn_revnum_t);

      revnums.push_back(revnum);
    }

    return revnums;
  }


Generated by  Doxygen 1.6.0   Back to index