Permalink
Browse files

ra: Repo: Can now postpone the opening of a repository when creating …

…a Repo
  • Loading branch information...
1 parent 16fd18c commit c846027d05dfe398df5c471f618c5a415fca23a5 Johan 't Hart committed Nov 13, 2011
Showing with 16 additions and 0 deletions.
  1. +4 −0 ext/svncpp/include/svncpp/ra.hpp
  2. +12 −0 ext/svncpp/src/ra.cpp
View
4 ext/svncpp/include/svncpp/ra.hpp
@@ -13,9 +13,13 @@ namespace svn
class Repo : public CLibSvnObjWrapper<svn_ra_session_t>
{
public:
+ Repo();
Repo(class Context* ctxt,
const char * repos_URL,
const char * uuid = NULL);
+ void Open(class Context* ctxt,
+ const char * repos_URL,
+ const char * uuid = NULL);
std::string getRoot() const;
std::string getUuid() const;
View
12 ext/svncpp/src/ra.cpp
@@ -16,10 +16,21 @@ class RaInit
Pool m_pool;
};
+Repo::Repo()
+{
+}
+
Repo::Repo(svn::Context* ctxt,
const char * repos_URL,
const char * uuid)
{
+ Open(ctxt, repos_URL, uuid);
+}
+
+void Repo::Open(class Context* ctxt,
+ const char * repos_URL,
+ const char * uuid)
+{
static RaInit init;
svn_ra_callbacks2_t* callbacks = NULL;
svn_ra_session_t * ses = NULL;
@@ -29,6 +40,7 @@ Repo::Repo(svn::Context* ctxt,
Attach(ses);
}
+
std::string Repo::getRoot() const
{
Pool pool;

0 comments on commit c846027

Please sign in to comment.