~ubuntu-branches/ubuntu/trusty/subversion/trusty-proposed

« back to all changes in this revision

Viewing changes to subversion/svn/move-cmd.c

  • Committer: Package Import Robot
  • Author(s): Andy Whitcroft
  • Date: 2012-06-21 15:36:36 UTC
  • mfrom: (0.4.13 sid)
  • Revision ID: package-import@ubuntu.com-20120621153636-amqqmuidgwgxz1ly
Tags: 1.7.5-1ubuntu1
* Merge from Debian unstable.  Remaining changes:
  - Create pot file on build.
  - Build a python-subversion-dbg package.
  - Build-depend on python-dbg.
  - Build-depend on default-jre-headless/-jdk.
  - Do not apply java-build patch.
  - debian/rules: Manually create the doxygen output directory, otherwise
    we get weird build failures when running parallel builds.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 * move-cmd.c -- Subversion move command
3
3
 *
4
4
 * ====================================================================
5
 
 * Copyright (c) 2000-2006 CollabNet.  All rights reserved.
6
 
 *
7
 
 * This software is licensed as described in the file COPYING, which
8
 
 * you should have received as part of this distribution.  The terms
9
 
 * are also available at http://subversion.tigris.org/license-1.html.
10
 
 * If newer versions of this license are posted there, you may use a
11
 
 * newer version instead, at your option.
12
 
 *
13
 
 * This software consists of voluntary contributions made by many
14
 
 * individuals.  For exact contribution history, see the revision
15
 
 * history and logs, available at http://subversion.tigris.org/.
 
5
 *    Licensed to the Apache Software Foundation (ASF) under one
 
6
 *    or more contributor license agreements.  See the NOTICE file
 
7
 *    distributed with this work for additional information
 
8
 *    regarding copyright ownership.  The ASF licenses this file
 
9
 *    to you under the Apache License, Version 2.0 (the
 
10
 *    "License"); you may not use this file except in compliance
 
11
 *    with the License.  You may obtain a copy of the License at
 
12
 *
 
13
 *      http://www.apache.org/licenses/LICENSE-2.0
 
14
 *
 
15
 *    Unless required by applicable law or agreed to in writing,
 
16
 *    software distributed under the License is distributed on an
 
17
 *    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 
18
 *    KIND, either express or implied.  See the License for the
 
19
 *    specific language governing permissions and limitations
 
20
 *    under the License.
16
21
 * ====================================================================
17
22
 */
18
23
 
27
32
#include "svn_path.h"
28
33
#include "cl.h"
29
34
 
30
 
/* We shouldn't be including a private header here, but it is
31
 
 * necessary for fixing issue #3416 */
32
 
#include "private/svn_opt_private.h"
33
 
 
34
35
#include "svn_private_config.h"
35
36
 
36
37
 
47
48
  svn_client_ctx_t *ctx = ((svn_cl__cmd_baton_t *) baton)->ctx;
48
49
  apr_array_header_t *targets;
49
50
  const char *dst_path;
50
 
  svn_commit_info_t *commit_info = NULL;
51
51
  svn_error_t *err;
52
52
 
53
53
  SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
54
54
                                                      opt_state->targets,
55
 
                                                      ctx, pool));
 
55
                                                      ctx, TRUE, pool));
56
56
 
57
57
  if (targets->nelts < 2)
58
58
    return svn_error_create(SVN_ERR_CL_INSUFFICIENT_ARGS, 0, NULL);
65
65
         _("Cannot specify revisions (except HEAD) with move operations"));
66
66
    }
67
67
 
68
 
  if (! opt_state->quiet)
69
 
    svn_cl__get_notifier(&ctx->notify_func2, &ctx->notify_baton2, FALSE,
70
 
                         FALSE, FALSE, pool);
71
 
 
72
68
  dst_path = APR_ARRAY_IDX(targets, targets->nelts - 1, const char *);
73
69
  apr_array_pop(targets);
74
70
 
86
82
    SVN_ERR(svn_cl__make_log_msg_baton(&(ctx->log_msg_baton3), opt_state,
87
83
                                       NULL, ctx->config, pool));
88
84
 
89
 
  SVN_ERR(svn_opt__eat_peg_revisions(&targets, targets, pool));
 
85
  SVN_ERR(svn_cl__eat_peg_revisions(&targets, targets, pool));
90
86
 
91
 
  err = svn_client_move5(&commit_info, targets, dst_path, opt_state->force,
 
87
  err = svn_client_move6(targets, dst_path,
92
88
                         TRUE, opt_state->parents, opt_state->revprop_table,
93
 
                         ctx, pool);
 
89
                         (opt_state->quiet ? NULL : svn_cl__print_commit_info),
 
90
                         NULL, ctx, pool);
94
91
 
95
92
  if (err)
96
93
    err = svn_cl__may_need_force(err);
98
95
  if (ctx->log_msg_func3)
99
96
    SVN_ERR(svn_cl__cleanup_log_msg(ctx->log_msg_baton3, err, pool));
100
97
  else if (err)
101
 
    return err;
102
 
 
103
 
  if (commit_info && ! opt_state->quiet)
104
 
    SVN_ERR(svn_cl__print_commit_info(commit_info, pool));
 
98
    return svn_error_trace(err);
105
99
 
106
100
  return SVN_NO_ERROR;
107
101
}