~ubuntu-branches/debian/sid/subversion/sid

« back to all changes in this revision

Viewing changes to subversion/svn/cl-conflicts.c

  • Committer: Package Import Robot
  • Author(s): James McCoy
  • Date: 2015-08-07 21:32:47 UTC
  • mfrom: (0.2.15) (4.1.7 experimental)
  • Revision ID: package-import@ubuntu.com-20150807213247-ozyewtmgsr6tkewl
Tags: 1.9.0-1
* Upload to unstable
* New upstream release.
  + Security fixes
    - CVE-2015-3184: Mixed anonymous/authenticated path-based authz with
      httpd 2.4
    - CVE-2015-3187: svn_repos_trace_node_locations() reveals paths hidden
      by authz
* Add >= 2.7 requirement for python-all-dev Build-Depends, needed to run
  tests.
* Remove Build-Conflicts against ruby-test-unit.  (Closes: #791844)
* Remove patches/apache_module_dependency in favor of expressing the
  dependencies in authz_svn.load/dav_svn.load.
* Build-Depend on apache2-dev (>= 2.4.16) to ensure ap_some_authn_required()
  is available when building mod_authz_svn and Depend on apache2-bin (>=
  2.4.16) for runtime support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
69
69
/* Return a localised string representation of the local part of a conflict;
70
70
   NULL for non-localised odd cases. */
71
71
static const char *
72
 
local_reason_str(svn_node_kind_t kind, svn_wc_conflict_reason_t reason)
 
72
local_reason_str(svn_node_kind_t kind, svn_wc_conflict_reason_t reason,
 
73
                 svn_wc_operation_t operation)
73
74
{
74
75
  switch (kind)
75
76
    {
76
77
      case svn_node_file:
 
78
      case svn_node_symlink:
77
79
        switch (reason)
78
80
          {
79
81
          case svn_wc_conflict_reason_edited:
83
85
          case svn_wc_conflict_reason_deleted:
84
86
            return _("local file delete");
85
87
          case svn_wc_conflict_reason_missing:
86
 
            return _("local file missing");
 
88
            if (operation == svn_wc_operation_merge)
 
89
              return _("local file missing or deleted or moved away");
 
90
            else
 
91
              return _("local file missing");
87
92
          case svn_wc_conflict_reason_unversioned:
88
93
            return _("local file unversioned");
89
94
          case svn_wc_conflict_reason_added:
106
111
          case svn_wc_conflict_reason_deleted:
107
112
            return _("local dir delete");
108
113
          case svn_wc_conflict_reason_missing:
109
 
            return _("local dir missing");
 
114
            if (operation == svn_wc_operation_merge)
 
115
              return _("local dir missing or deleted or moved away");
 
116
            else
 
117
              return _("local dir missing");
110
118
          case svn_wc_conflict_reason_unversioned:
111
119
            return _("local dir unversioned");
112
120
          case svn_wc_conflict_reason_added:
119
127
            return _("local dir moved here");
120
128
          }
121
129
        break;
122
 
      case svn_node_symlink:
123
130
      case svn_node_none:
124
131
      case svn_node_unknown:
 
132
        switch (reason)
 
133
          {
 
134
          case svn_wc_conflict_reason_edited:
 
135
            return _("local edit");
 
136
          case svn_wc_conflict_reason_obstructed:
 
137
            return _("local obstruction");
 
138
          case svn_wc_conflict_reason_deleted:
 
139
            return _("local delete");
 
140
          case svn_wc_conflict_reason_missing:
 
141
            if (operation == svn_wc_operation_merge)
 
142
              return _("local missing or deleted or moved away");
 
143
            else
 
144
              return _("local missing");
 
145
          case svn_wc_conflict_reason_unversioned:
 
146
            return _("local unversioned");
 
147
          case svn_wc_conflict_reason_added:
 
148
            return _("local add");
 
149
          case svn_wc_conflict_reason_replaced:
 
150
            return _("local replace");
 
151
          case svn_wc_conflict_reason_moved_away:
 
152
            return _("local moved away");
 
153
          case svn_wc_conflict_reason_moved_here:
 
154
            return _("local moved here");
 
155
          }
125
156
        break;
126
157
    }
127
158
  return NULL;
135
166
  switch (kind)
136
167
    {
137
168
      case svn_node_file:
 
169
      case svn_node_symlink:
138
170
        switch (action)
139
171
          {
140
172
            case svn_wc_conflict_action_edit:
142
174
            case svn_wc_conflict_action_add:
143
175
              return _("incoming file add");
144
176
            case svn_wc_conflict_action_delete:
145
 
              return _("incoming file delete");
 
177
              return _("incoming file delete or move");
146
178
            case svn_wc_conflict_action_replace:
147
 
              return _("incoming file replace");
 
179
              return _("incoming replace with file");
148
180
          }
149
181
        break;
150
182
      case svn_node_dir:
155
187
            case svn_wc_conflict_action_add:
156
188
              return _("incoming dir add");
157
189
            case svn_wc_conflict_action_delete:
158
 
              return _("incoming dir delete");
 
190
              return _("incoming dir delete or move");
159
191
            case svn_wc_conflict_action_replace:
160
 
              return _("incoming dir replace");
 
192
              return _("incoming replace with dir");
161
193
          }
162
194
        break;
163
 
      case svn_node_symlink:
164
195
      case svn_node_none:
165
196
      case svn_node_unknown:
 
197
        switch (action)
 
198
          {
 
199
            case svn_wc_conflict_action_edit:
 
200
              return _("incoming edit");
 
201
            case svn_wc_conflict_action_add:
 
202
              return _("incoming add");
 
203
            case svn_wc_conflict_action_delete:
 
204
              return _("incoming delete or move");
 
205
            case svn_wc_conflict_action_replace:
 
206
              return _("incoming replace");
 
207
          }
166
208
        break;
167
209
    }
168
210
  return NULL;
267
309
        incoming_kind = conflict->src_right_version->node_kind;
268
310
    }
269
311
 
270
 
  reason = local_reason_str(conflict->node_kind, conflict->reason);
 
312
  reason = local_reason_str(conflict->node_kind, conflict->reason,
 
313
                            conflict->operation);
271
314
  action = incoming_action_str(incoming_kind, conflict->action);
272
315
  operation = operation_str(conflict->operation);
273
316
  SVN_ERR_ASSERT(operation);
294
337
  return SVN_NO_ERROR;
295
338
}
296
339
 
 
340
svn_error_t *
 
341
svn_cl__get_human_readable_action_description(
 
342
        const char **desc,
 
343
        svn_wc_conflict_action_t action,
 
344
        svn_wc_operation_t operation,
 
345
        svn_node_kind_t kind,
 
346
        apr_pool_t *pool)
 
347
{
 
348
  const char *action_s, *operation_s;
 
349
 
 
350
  action_s = incoming_action_str(kind, action);
 
351
  operation_s = operation_str(operation);
 
352
 
 
353
  SVN_ERR_ASSERT(operation_s);
 
354
 
 
355
  *desc = apr_psprintf(pool, _("%s %s"),
 
356
                       action_s, operation_s);
 
357
 
 
358
  return SVN_NO_ERROR;
 
359
}
 
360
 
297
361
 
298
362
/* Helper for svn_cl__append_tree_conflict_info_xml().
299
363
 * Appends the attributes of the given VERSION to ATT_HASH.