You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ar...@apache.org on 2011/07/20 15:40:17 UTC
svn commit: r1148764 - in /subversion/branches/svn-bisect/subversion:
include/svn_client.h libsvn_client/bisect.c svn/bisect-cmd.c svn/cl.h
svn/main.c
Author: arwin
Date: Wed Jul 20 13:40:16 2011
New Revision: 1148764
URL: http://svn.apache.org/viewvc?rev=1148764&view=rev
Log:
Added initial non-functional implementation.
* subversion/svn/cl.h
Declared svn_opt_subcommand_t svn_cl__bisect
* subversion/svn/bisect-cmd.c
New file with skeletal implementation.
* subversion/svn/main.c
(svn_cl__cmd_table): Added bisect to the array.
* subversion/include/svn_client.h
Added svn_client_bisect
* subversion/libsvn_client/bisect.c
New file with skeletal implementation.
Added:
subversion/branches/svn-bisect/subversion/libsvn_client/bisect.c
subversion/branches/svn-bisect/subversion/svn/bisect-cmd.c
Modified:
subversion/branches/svn-bisect/subversion/include/svn_client.h
subversion/branches/svn-bisect/subversion/svn/cl.h
subversion/branches/svn-bisect/subversion/svn/main.c
Modified: subversion/branches/svn-bisect/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/include/svn_client.h?rev=1148764&r1=1148763&r2=1148764&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/include/svn_client.h (original)
+++ subversion/branches/svn-bisect/subversion/include/svn_client.h Wed Jul 20 13:40:16 2011
@@ -5645,6 +5645,15 @@ svn_client_patch(const char *patch_abspa
svn_client_ctx_t *ctx,
apr_pool_t *scratch_pool);
+/**
+ * Doc for svn_client_bisect
+ */
+svn_error_t *
+svn_client_bisect(const char *target,
+ const char *option,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *pool);
+
/** @} */
/** @} end group: Client working copy management */
Added: subversion/branches/svn-bisect/subversion/libsvn_client/bisect.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_client/bisect.c?rev=1148764&view=auto
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_client/bisect.c (added)
+++ subversion/branches/svn-bisect/subversion/libsvn_client/bisect.c Wed Jul 20 13:40:16 2011
@@ -0,0 +1,58 @@
+/*
+ * bisect.c: bisect functionality
+ *
+ * ====================================================================
+ * 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.
+ * ====================================================================
+ */
+
+/* ==================================================================== */
+
+
+/*** Includes. ***/
+
+#include "svn_pools.h"
+#include "svn_wc.h"
+#include "svn_client.h"
+#include "svn_ra.h"
+#include "svn_types.h"
+#include "svn_error.h"
+#include "svn_dirent_uri.h"
+#include "svn_path.h"
+#include "svn_io.h"
+#include "svn_opt.h"
+#include "svn_time.h"
+#include "client.h"
+
+#include "private/svn_wc_private.h"
+
+#include "svn_private_config.h"
+
+/*** Public Interfaces. ***/
+
+svn_error_t*
+svn_client_bisect(const char *target,
+ const char *option,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *pool)
+{
+
+ printf("Reached libsvn_client. option = %s , target = %s\n" , option, target);
+ return SVN_NO_ERROR;
+
+}
Added: subversion/branches/svn-bisect/subversion/svn/bisect-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/svn/bisect-cmd.c?rev=1148764&view=auto
==============================================================================
--- subversion/branches/svn-bisect/subversion/svn/bisect-cmd.c (added)
+++ subversion/branches/svn-bisect/subversion/svn/bisect-cmd.c Wed Jul 20 13:40:16 2011
@@ -0,0 +1,73 @@
+/*
+ * bisect-cmd.c -- Bisect command.
+ *
+ * ====================================================================
+ * 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.
+ * ====================================================================
+ */
+
+/* ==================================================================== */
+
+
+/*** Includes. ***/
+
+#include "svn_pools.h"
+#include "svn_client.h"
+#include "svn_path.h"
+#include "svn_error_codes.h"
+#include "svn_error.h"
+#include "cl.h"
+#include "svn_opt.h"
+
+#include "svn_private_config.h"
+
+
+/*** Code. ***/
+
+/* This implements the `svn_opt_subcommand_t' interface. */
+svn_error_t *
+svn_cl__bisect(apr_getopt_t *os,
+ void *baton,
+ apr_pool_t *pool)
+{
+ svn_cl__opt_state_t *opt_state = ((svn_cl__cmd_baton_t *) baton)->opt_state;
+ svn_client_ctx_t *ctx = ((svn_cl__cmd_baton_t *) baton)->ctx;
+ apr_pool_t *subpool;
+ apr_array_header_t *targets;
+ const char *target;
+ const char *option;
+
+ SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
+ opt_state->targets,
+ ctx, FALSE,
+ pool));
+
+ if (targets->nelts > 2)
+ {
+ SVN_ERR(svn_cmdline_printf(pool, "Only one target please.\n"));
+ }
+
+ option = APR_ARRAY_IDX(targets, 0, const char *);
+
+ target = APR_ARRAY_IDX(targets, 1, const char *);
+
+ SVN_ERR(svn_client_bisect(target, option, ctx, subpool));
+
+ return SVN_NO_ERROR;
+}
+
Modified: subversion/branches/svn-bisect/subversion/svn/cl.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/svn/cl.h?rev=1148764&r1=1148763&r2=1148764&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/svn/cl.h (original)
+++ subversion/branches/svn-bisect/subversion/svn/cl.h Wed Jul 20 13:40:16 2011
@@ -243,6 +243,7 @@ typedef struct svn_cl__cmd_baton_t
/* Declare all the command procedures */
svn_opt_subcommand_t
svn_cl__add,
+ svn_cl__bisect,
svn_cl__blame,
svn_cl__cat,
svn_cl__changelist,
Modified: subversion/branches/svn-bisect/subversion/svn/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/svn/main.c?rev=1148764&r1=1148763&r2=1148764&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/svn/main.c (original)
+++ subversion/branches/svn-bisect/subversion/svn/main.c Wed Jul 20 13:40:16 2011
@@ -393,6 +393,12 @@ const svn_opt_subcommand_desc2_t svn_cl_
opt_no_autoprops, opt_parents },
{{opt_parents, N_("add intermediate parents")}} },
+ { "bisect", svn_cl__bisect, {0}, N_
+ ("Bisect command description line 1.\n"
+ "Bisect command description line 2.\n"
+ "usage: bisect usage information\n"),
+ {'q', 'r'} },
+
{ "blame", svn_cl__blame, {"praise", "annotate", "ann"}, N_
("Output the content of specified files or\n"
"URLs with revision and author information in-line.\n"