You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2019/01/04 21:56:38 UTC

svn commit: r1850443 - in /subversion/trunk: ./ doc/ subversion/bindings/cxx/include/ subversion/bindings/cxx/include/svnxx/ subversion/bindings/cxx/include/svnxx/client/ subversion/bindings/cxx/src/ subversion/bindings/cxx/src/private/ subversion/bind...

Author: brane
Date: Fri Jan  4 21:56:38 2019
New Revision: 1850443

URL: http://svn.apache.org/viewvc?rev=1850443&view=rev
Log:
Begin implementing client operations in SVN++, starting with status.

* build.conf (private-includes): Add SVN++ client headers.
* doc/doxygen.conf (INPUT): Likewise.

[in subversion/bindings/cxx]
* include/svnxx/client/context.hpp: New.
* include/svnxx/client/status.hpp: Likewise new.
* include/svnxx/client.hpp: New again; includes the above two headers.
* include/svnxx.hpp: Include svnxx/client.hpp.

* src/client_context.cpp: New.
* src/client_status.cpp: New.
* src/private.hpp: Include the above two headers.

* src/private/client_private.hpp: New.
* cxx/src/private/client_context_private.hpp: And new again.

* src/private/exception_private.hpp
  (iteration_stopped): Typofixed from iteration_etopped.
* tests/test_exceptions.cpp: Propagate the above typofixtion.

* tests/test_client_status.cpp: New. Contains a (disabled) example of how the
   svn::client::status operation might be used.

Added:
    subversion/trunk/subversion/bindings/cxx/include/svnxx/client/
    subversion/trunk/subversion/bindings/cxx/include/svnxx/client.hpp   (with props)
    subversion/trunk/subversion/bindings/cxx/include/svnxx/client/context.hpp   (with props)
    subversion/trunk/subversion/bindings/cxx/include/svnxx/client/status.hpp   (with props)
    subversion/trunk/subversion/bindings/cxx/src/client_context.cpp   (with props)
    subversion/trunk/subversion/bindings/cxx/src/client_status.cpp   (with props)
    subversion/trunk/subversion/bindings/cxx/src/private/client_context_private.hpp   (with props)
    subversion/trunk/subversion/bindings/cxx/src/private/client_private.hpp   (with props)
    subversion/trunk/subversion/bindings/cxx/tests/test_client_status.cpp   (with props)
Modified:
    subversion/trunk/build.conf
    subversion/trunk/doc/doxygen.conf
    subversion/trunk/subversion/bindings/cxx/include/svnxx.hpp
    subversion/trunk/subversion/bindings/cxx/src/private.hpp
    subversion/trunk/subversion/bindings/cxx/src/private/exception_private.hpp
    subversion/trunk/subversion/bindings/cxx/tests/test_exceptions.cpp

Modified: subversion/trunk/build.conf
URL: http://svn.apache.org/viewvc/subversion/trunk/build.conf?rev=1850443&r1=1850442&r2=1850443&view=diff
==============================================================================
--- subversion/trunk/build.conf (original)
+++ subversion/trunk/build.conf Fri Jan  4 21:56:38 2019
@@ -40,6 +40,7 @@ private-includes =
         subversion/libsvn_delta/compose_delta.c
         subversion/bindings/cxx/include/*.hpp
         subversion/bindings/cxx/include/svnxx/*.hpp
+        subversion/bindings/cxx/include/svnxx/client/*.hpp
         subversion/bindings/cxx/include/svnxx/detail/*.hpp
         subversion/bindings/cxx/src/*.hpp
         subversion/bindings/cxx/src/aprwrap/*.hpp

Modified: subversion/trunk/doc/doxygen.conf
URL: http://svn.apache.org/viewvc/subversion/trunk/doc/doxygen.conf?rev=1850443&r1=1850442&r2=1850443&view=diff
==============================================================================
--- subversion/trunk/doc/doxygen.conf (original)
+++ subversion/trunk/doc/doxygen.conf Fri Jan  4 21:56:38 2019
@@ -579,6 +579,7 @@ WARN_LOGFILE           =
 INPUT                  = subversion/include \
                          subversion/bindings/cxx/include \
                          subversion/bindings/cxx/include/svnxx \
+                         subversion/bindings/cxx/include/svnxx/client \
                          subversion/bindings/cxx/include/svnxx/detail \
                          subversion/include/private/svn_doxygen.h
 

Modified: subversion/trunk/subversion/bindings/cxx/include/svnxx.hpp
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/cxx/include/svnxx.hpp?rev=1850443&r1=1850442&r2=1850443&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/cxx/include/svnxx.hpp (original)
+++ subversion/trunk/subversion/bindings/cxx/include/svnxx.hpp Fri Jan  4 21:56:38 2019
@@ -32,6 +32,8 @@
 #include "svnxx/revision.hpp"
 #include "svnxx/tristate.hpp"
 
+#include "svnxx/client.hpp"
+
 namespace svn = ::apache::subversion::svnxx;
 
 #endif  // SVNXX_HPP

Added: subversion/trunk/subversion/bindings/cxx/include/svnxx/client.hpp
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/cxx/include/svnxx/client.hpp?rev=1850443&view=auto
==============================================================================
--- subversion/trunk/subversion/bindings/cxx/include/svnxx/client.hpp (added)
+++ subversion/trunk/subversion/bindings/cxx/include/svnxx/client.hpp Fri Jan  4 21:56:38 2019
@@ -0,0 +1,40 @@
+/**
+ * @file svnxx/client.hpp
+ * @copyright
+ * ====================================================================
+ *    Licensed to the Apache Software Foundation (ASF) under one
+ *    or more contributor license agreements.  See the NOTICE file
+ *    distributed with this work for additional information
+ *    regarding copyright ownership.  The ASF licenses this file
+ *    to you under the Apache License, Version 2.0 (the
+ *    "License"); you may not use this file except in compliance
+ *    with the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *    Unless required by applicable law or agreed to in writing,
+ *    software distributed under the License is distributed on an
+ *    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *    KIND, either express or implied.  See the License for the
+ *    specific language governing permissions and limitations
+ *    under the License.
+ * ====================================================================
+ * @endcopyright
+ */
+
+#ifndef SVNXX_CLIENT_HPP
+#define SVNXX_CLIENT_HPP
+
+/**
+ * @defgroup svnxx_client SVN++ Client
+ * @brief Client Operations
+ *
+ * Client Operations
+ * =================
+ * TODO: document this
+ */
+
+#include "client/context.hpp"
+#include "client/status.hpp"
+
+#endif  // SVNXX_CLIENT_HPP

Propchange: subversion/trunk/subversion/bindings/cxx/include/svnxx/client.hpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: subversion/trunk/subversion/bindings/cxx/include/svnxx/client/context.hpp
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/cxx/include/svnxx/client/context.hpp?rev=1850443&view=auto
==============================================================================
--- subversion/trunk/subversion/bindings/cxx/include/svnxx/client/context.hpp (added)
+++ subversion/trunk/subversion/bindings/cxx/include/svnxx/client/context.hpp Fri Jan  4 21:56:38 2019
@@ -0,0 +1,59 @@
+/**
+ * @file svnxx/client/context.hpp
+ * @copyright
+ * ====================================================================
+ *    Licensed to the Apache Software Foundation (ASF) under one
+ *    or more contributor license agreements.  See the NOTICE file
+ *    distributed with this work for additional information
+ *    regarding copyright ownership.  The ASF licenses this file
+ *    to you under the Apache License, Version 2.0 (the
+ *    "License"); you may not use this file except in compliance
+ *    with the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *    Unless required by applicable law or agreed to in writing,
+ *    software distributed under the License is distributed on an
+ *    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *    KIND, either express or implied.  See the License for the
+ *    specific language governing permissions and limitations
+ *    under the License.
+ * ====================================================================
+ * @endcopyright
+ */
+
+#ifndef SVNXX_CLIENT_CONTEXT_HPP
+#define SVNXX_CLIENT_CONTEXT_HPP
+
+#include <memory>
+
+namespace apache {
+namespace subversion {
+namespace svnxx {
+namespace client {
+
+namespace detail {
+class context;
+using context_ptr = std::unique_ptr<context>;
+} // namespace detail
+
+/**
+ * @brief The context for client operations, see @ref svn_client_ctx_t.
+ * @warning TODO: Work in progress.
+ */
+class context : protected detail::context_ptr
+{
+public:
+  context();
+  ~context();
+
+protected:
+  using inherited = detail::context_ptr;
+};
+
+} // namespace client
+} // namespace svnxx
+} // namespace subversion
+} // namespace apache
+
+#endif  // SVNXX_CLIENT_CONTEXT_HPP

Propchange: subversion/trunk/subversion/bindings/cxx/include/svnxx/client/context.hpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: subversion/trunk/subversion/bindings/cxx/include/svnxx/client/status.hpp
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/cxx/include/svnxx/client/status.hpp?rev=1850443&view=auto
==============================================================================
--- subversion/trunk/subversion/bindings/cxx/include/svnxx/client/status.hpp (added)
+++ subversion/trunk/subversion/bindings/cxx/include/svnxx/client/status.hpp Fri Jan  4 21:56:38 2019
@@ -0,0 +1,105 @@
+/**
+ * @file svnxx/client/status.hpp
+ * @copyright
+ * ====================================================================
+ *    Licensed to the Apache Software Foundation (ASF) under one
+ *    or more contributor license agreements.  See the NOTICE file
+ *    distributed with this work for additional information
+ *    regarding copyright ownership.  The ASF licenses this file
+ *    to you under the Apache License, Version 2.0 (the
+ *    "License"); you may not use this file except in compliance
+ *    with the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *    Unless required by applicable law or agreed to in writing,
+ *    software distributed under the License is distributed on an
+ *    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *    KIND, either express or implied.  See the License for the
+ *    specific language governing permissions and limitations
+ *    under the License.
+ * ====================================================================
+ * @endcopyright
+ */
+
+#ifndef SVNXX_CLIENT_STATUS_HPP
+#define SVNXX_CLIENT_STATUS_HPP
+
+#include <cstdint>
+#include <functional>
+#include <future>
+
+#include "svnxx/client/context.hpp"
+
+#include "svnxx/depth.hpp"
+#include "svnxx/revision.hpp"
+
+namespace apache {
+namespace subversion {
+namespace svnxx {
+namespace client {
+
+/**
+ * @warning TODO: Work in progress
+ */
+struct status_notification{};
+
+/**
+ * @warning TODO: Work in progress
+ */
+using status_callback = std::function<void(const char* path,
+                                           const status_notification& st)>;
+
+/**
+ * @brief Flags that modify the behaviour of the status operation.
+ * @see svn_client_status6
+ */
+enum class status_flags : std::uint_least32_t
+  {
+    empty              = 0U,
+    get_all            = 1U << 0,
+    check_out_of_date  = 1U << 1,
+    check_working_copy = 1U << 2,
+    no_ignore          = 1U << 3,
+    ignore_externals   = 1U << 4,
+    depth_as_sticky    = 1U << 5,
+  };
+
+/**
+ * @brief Bitwise conjunction operator for @c status_flags.
+ */
+inline status_flags operator&(status_flags a, status_flags b)
+{
+  return status_flags(std::uint_least32_t(a) & std::uint_least32_t(b));
+}
+
+/**
+ * @brief Bitwise disjunction operator for  @c status_flags.
+ */
+inline status_flags operator|(status_flags a, status_flags b)
+{
+  return status_flags(std::uint_least32_t(a) | std::uint_least32_t(b));
+}
+
+/**
+ * @brief Perform a status walk on @a path.
+ * @see svn_client_status6
+ * @param ctx the #context object to use for this operation
+ * @param path the (root) path for the status walk.
+ * @param rev the revision to use when @c check_out_of_date is set in @a flags
+ * @param depth the depth of the operation
+ * @param flags a combination of @c status_flags
+ * @param callback a function that will be called for each status target
+ * @warning TODO: Work in progress
+ */
+revision::number
+status(context& ctx, const char* path,
+       revision rev, depth depth, status_flags flags,
+       status_callback callback);
+
+} // namespace client
+} // namespace svnxx
+} // namespace subversion
+} // namespace apache
+
+#endif  // SVNXX_CLIENT_STATUS_HPP

Propchange: subversion/trunk/subversion/bindings/cxx/include/svnxx/client/status.hpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: subversion/trunk/subversion/bindings/cxx/src/client_context.cpp
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/cxx/src/client_context.cpp?rev=1850443&view=auto
==============================================================================
--- subversion/trunk/subversion/bindings/cxx/src/client_context.cpp (added)
+++ subversion/trunk/subversion/bindings/cxx/src/client_context.cpp Fri Jan  4 21:56:38 2019
@@ -0,0 +1,60 @@
+/**
+ * @copyright
+ * ====================================================================
+ *    Licensed to the Apache Software Foundation (ASF) under one
+ *    or more contributor license agreements.  See the NOTICE file
+ *    distributed with this work for additional information
+ *    regarding copyright ownership.  The ASF licenses this file
+ *    to you under the Apache License, Version 2.0 (the
+ *    "License"); you may not use this file except in compliance
+ *    with the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *    Unless required by applicable law or agreed to in writing,
+ *    software distributed under the License is distributed on an
+ *    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *    KIND, either express or implied.  See the License for the
+ *    specific language governing permissions and limitations
+ *    under the License.
+ * ====================================================================
+ * @endcopyright
+ */
+
+#include "private.hpp"
+
+namespace apache {
+namespace subversion {
+namespace svnxx {
+namespace client {
+
+//
+// class detail::context
+//
+
+namespace detail {
+
+svn_client_ctx_t* context::create_ctx(const apr::pool& pool)
+{
+  svn_client_ctx_t* ctx;
+  impl::checked_call(svn_client_create_context2(&ctx, nullptr, pool.get()));
+  return ctx;
+}
+
+} // namespace detail
+
+//
+// class context
+//
+
+context::context()
+  : inherited(new detail::context)
+{}
+
+context::~context()
+{}
+
+} // namespace client
+} // namespace svnxx
+} // namespace subversion
+} // namespace apache

Propchange: subversion/trunk/subversion/bindings/cxx/src/client_context.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: subversion/trunk/subversion/bindings/cxx/src/client_status.cpp
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/cxx/src/client_status.cpp?rev=1850443&view=auto
==============================================================================
--- subversion/trunk/subversion/bindings/cxx/src/client_status.cpp (added)
+++ subversion/trunk/subversion/bindings/cxx/src/client_status.cpp Fri Jan  4 21:56:38 2019
@@ -0,0 +1,90 @@
+/**
+ * @copyright
+ * ====================================================================
+ *    Licensed to the Apache Software Foundation (ASF) under one
+ *    or more contributor license agreements.  See the NOTICE file
+ *    distributed with this work for additional information
+ *    regarding copyright ownership.  The ASF licenses this file
+ *    to you under the Apache License, Version 2.0 (the
+ *    "License"); you may not use this file except in compliance
+ *    with the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *    Unless required by applicable law or agreed to in writing,
+ *    software distributed under the License is distributed on an
+ *    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *    KIND, either express or implied.  See the License for the
+ *    specific language governing permissions and limitations
+ *    under the License.
+ * ====================================================================
+ * @endcopyright
+ */
+
+#include "svnxx/client/status.hpp"
+
+#include "aprwrap.hpp"
+#include "private.hpp"
+
+#include "svn_client.h"
+
+namespace apache {
+namespace subversion {
+namespace svnxx {
+namespace client {
+
+namespace {
+struct status_func
+{
+  status_callback& proxy;
+  static svn_error_t* callback(void* baton,
+                               const char *path,
+                               const svn_client_status_t* /*status*/,
+                               apr_pool_t* /*scratch_pool*/)
+    {
+      try
+        {
+          const auto self = static_cast<status_func*>(baton);
+          self->proxy(path, status_notification{});
+        }
+      catch (const stop_iteration&)
+        {
+          return impl::iteration_stopped();
+        }
+      return SVN_NO_ERROR;
+    }
+};
+
+} // anonymous namespace
+
+revision::number
+status(context& ctx_, const char* path,
+       revision rev_, depth depth, status_flags flags,
+       status_callback callback_)
+{
+  const auto& ctx = impl::context::unwrap(ctx_);
+  const auto rev = svnxx::impl::convert(rev_);
+  const apr::pool scratch_pool(&ctx.get_pool());
+  status_func callback{callback_};
+  svn_revnum_t result;
+
+  impl::checked_call(
+      svn_client_status6(&result, ctx.get(), path, &rev,
+                         svnxx::impl::convert(depth),
+                         bool(flags & status_flags::get_all),
+                         bool(flags & status_flags::check_out_of_date),
+                         bool(flags & status_flags::check_working_copy),
+                         bool(flags & status_flags::no_ignore),
+                         bool(flags & status_flags::ignore_externals),
+                         bool(flags & status_flags::depth_as_sticky),
+                         nullptr, // TODO: changelists,
+                         status_func::callback, &callback,
+                         scratch_pool.get()
+                         ));
+  return revision::number(result);
+}
+
+} // namespace client
+} // namespace svnxx
+} // namespace subversion
+} // namespace apache

Propchange: subversion/trunk/subversion/bindings/cxx/src/client_status.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: subversion/trunk/subversion/bindings/cxx/src/private.hpp
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/cxx/src/private.hpp?rev=1850443&r1=1850442&r2=1850443&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/cxx/src/private.hpp (original)
+++ subversion/trunk/subversion/bindings/cxx/src/private.hpp Fri Jan  4 21:56:38 2019
@@ -30,4 +30,7 @@
 #include "private/strings_private.hpp"
 #include "private/tristate_private.hpp"
 
+#include "private/client_private.hpp"
+#include "private/client_context_private.hpp"
+
 #endif // SVNXX_PRIVATE_PRIVATE_HPP

Added: subversion/trunk/subversion/bindings/cxx/src/private/client_context_private.hpp
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/cxx/src/private/client_context_private.hpp?rev=1850443&view=auto
==============================================================================
--- subversion/trunk/subversion/bindings/cxx/src/private/client_context_private.hpp (added)
+++ subversion/trunk/subversion/bindings/cxx/src/private/client_context_private.hpp Fri Jan  4 21:56:38 2019
@@ -0,0 +1,83 @@
+/**
+ * @copyright
+ * ====================================================================
+ *    Licensed to the Apache Software Foundation (ASF) under one
+ *    or more contributor license agreements.  See the NOTICE file
+ *    distributed with this work for additional information
+ *    regarding copyright ownership.  The ASF licenses this file
+ *    to you under the Apache License, Version 2.0 (the
+ *    "License"); you may not use this file except in compliance
+ *    with the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *    Unless required by applicable law or agreed to in writing,
+ *    software distributed under the License is distributed on an
+ *    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *    KIND, either express or implied.  See the License for the
+ *    specific language governing permissions and limitations
+ *    under the License.
+ * ====================================================================
+ * @endcopyright
+ */
+
+#ifndef SVNXX_PRIVATE_CLIENT_CONTEXT_HPP
+#define SVNXX_PRIVATE_CLIENT_CONTEXT_HPP
+
+#include "svnxx/client/context.hpp"
+
+#include "../aprwrap.hpp"
+
+#include "svn_client.h"
+
+namespace apache {
+namespace subversion {
+namespace svnxx {
+namespace client {
+namespace detail {
+
+// TODO: document this
+class context
+{
+public:
+  context()
+    : ctx(create_ctx(ctx_pool))
+    {}
+
+  svn_client_ctx_t* get() const noexcept { return ctx; };
+  const apr::pool& get_pool() const noexcept { return ctx_pool; }
+
+private:
+  apr::pool ctx_pool;
+  svn_client_ctx_t* const ctx;
+
+  static svn_client_ctx_t* create_ctx(const apr::pool& pool);
+};
+
+} // namespace detail
+namespace impl {
+
+// TODO: document this
+class context : public client::context
+{
+public:
+  static detail::context& unwrap(client::context& ctx)
+    {
+      return *static_cast<context&>(ctx).get();
+    }
+
+private:
+  using inherited::get;
+
+  context() = delete;
+  context(const context&) = delete;
+  context(context&&) = delete;
+};
+
+} // namesapce impl
+} // namespace client
+} // namespace svnxx
+} // namespace subversion
+} // namespace apache
+
+#endif // SVNXX_PRIVATE_CLIENT_CONTEXT_HPP

Propchange: subversion/trunk/subversion/bindings/cxx/src/private/client_context_private.hpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: subversion/trunk/subversion/bindings/cxx/src/private/client_private.hpp
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/cxx/src/private/client_private.hpp?rev=1850443&view=auto
==============================================================================
--- subversion/trunk/subversion/bindings/cxx/src/private/client_private.hpp (added)
+++ subversion/trunk/subversion/bindings/cxx/src/private/client_private.hpp Fri Jan  4 21:56:38 2019
@@ -0,0 +1,44 @@
+/**
+ * @copyright
+ * ====================================================================
+ *    Licensed to the Apache Software Foundation (ASF) under one
+ *    or more contributor license agreements.  See the NOTICE file
+ *    distributed with this work for additional information
+ *    regarding copyright ownership.  The ASF licenses this file
+ *    to you under the Apache License, Version 2.0 (the
+ *    "License"); you may not use this file except in compliance
+ *    with the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *    Unless required by applicable law or agreed to in writing,
+ *    software distributed under the License is distributed on an
+ *    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *    KIND, either express or implied.  See the License for the
+ *    specific language governing permissions and limitations
+ *    under the License.
+ * ====================================================================
+ * @endcopyright
+ */
+
+#ifndef SVNXX_PRIVATE_CLIENT_HPP
+#define SVNXX_PRIVATE_CLIENT_HPP
+
+#include "exception_private.hpp"
+
+namespace apache {
+namespace subversion {
+namespace svnxx {
+namespace client {
+namespace impl {
+
+using svnxx::impl::checked_call;
+using svnxx::impl::iteration_stopped;
+
+} // namesapce impl
+} // namespace client
+} // namespace svnxx
+} // namespace subversion
+} // namespace apache
+
+#endif // SVNXX_PRIVATE_CLIENT_HPP

Propchange: subversion/trunk/subversion/bindings/cxx/src/private/client_private.hpp
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: subversion/trunk/subversion/bindings/cxx/src/private/exception_private.hpp
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/cxx/src/private/exception_private.hpp?rev=1850443&r1=1850442&r2=1850443&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/cxx/src/private/exception_private.hpp (original)
+++ subversion/trunk/subversion/bindings/cxx/src/private/exception_private.hpp Fri Jan  4 21:56:38 2019
@@ -47,7 +47,7 @@ void checked_call(svn_error_t* const err
  * Call this when a callback throws svn::stop_iteration to return
  * an appropriate error.
  */
-inline svn_error_t* iteration_etopped()
+inline svn_error_t* iteration_stopped()
 {
   return svn_error_create(SVN_ERR_ITER_BREAK, nullptr, nullptr);
 }

Added: subversion/trunk/subversion/bindings/cxx/tests/test_client_status.cpp
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/cxx/tests/test_client_status.cpp?rev=1850443&view=auto
==============================================================================
--- subversion/trunk/subversion/bindings/cxx/tests/test_client_status.cpp (added)
+++ subversion/trunk/subversion/bindings/cxx/tests/test_client_status.cpp Fri Jan  4 21:56:38 2019
@@ -0,0 +1,55 @@
+/*
+ * ====================================================================
+ *    Licensed to the Apache Software Foundation (ASF) under one
+ *    or more contributor license agreements.  See the NOTICE file
+ *    distributed with this work for additional information
+ *    regarding copyright ownership.  The ASF licenses this file
+ *    to you under the Apache License, Version 2.0 (the
+ *    "License"); you may not use this file except in compliance
+ *    with the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *    Unless required by applicable law or agreed to in writing,
+ *    software distributed under the License is distributed on an
+ *    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *    KIND, either express or implied.  See the License for the
+ *    specific language governing permissions and limitations
+ *    under the License.
+ * ====================================================================
+ */
+
+#include <boost/test/unit_test.hpp>
+
+#include "fixture_init.hpp"
+
+#include <iostream>
+
+#include "svnxx/client/status.hpp"
+
+namespace svn = ::apache::subversion::svnxx;
+
+BOOST_AUTO_TEST_SUITE(client_status,
+                      * boost::unit_test::fixture<init>());
+
+BOOST_AUTO_TEST_CASE(example,
+                     * boost::unit_test::disabled())
+{
+  const char working_copy_root[] = "/Users/brane/src/svn/repos/trunk";
+
+  const auto callback = [](const char* path,
+                           const svn::client::status_notification&)
+                          {
+                            std::cout << "status on: " << path << std::endl;
+                          };
+  svn::client::context ctx;
+
+  const auto revnum = svn::client::status(ctx, working_copy_root,
+                                          svn::revision(),
+                                          svn::depth::unknown,
+                                          svn::client::status_flags::empty,
+                                          callback);
+  std::cout << "got revision: " << long(revnum) << std::endl;
+}
+
+BOOST_AUTO_TEST_SUITE_END();

Propchange: subversion/trunk/subversion/bindings/cxx/tests/test_client_status.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: subversion/trunk/subversion/bindings/cxx/tests/test_exceptions.cpp
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/cxx/tests/test_exceptions.cpp?rev=1850443&r1=1850442&r2=1850443&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/cxx/tests/test_exceptions.cpp (original)
+++ subversion/trunk/subversion/bindings/cxx/tests/test_exceptions.cpp Fri Jan  4 21:56:38 2019
@@ -202,7 +202,7 @@ BOOST_AUTO_TEST_CASE(propagate_cancelled
 BOOST_AUTO_TEST_CASE(iteration_stopped_cancels)
 {
   BOOST_CHECK_THROW(
-      impl::checked_call(impl::iteration_etopped()),
+      impl::checked_call(impl::iteration_stopped()),
       svn::cancelled);
 }
 
@@ -210,7 +210,7 @@ BOOST_AUTO_TEST_CASE(iteration_stopped)
 {
   try
     {
-      impl::checked_call(impl::iteration_etopped());
+      impl::checked_call(impl::iteration_stopped());
     }
   catch (const svn::cancelled& err)
     {