subversion 1.6.6-x86-mswin32-60
Sign up to get free protection for your applications and to get access to all the features.
- data/licenses/apr/LICENSE +341 -0
- data/licenses/apr/NOTICE +15 -0
- data/licenses/apr-util/LICENSE +443 -0
- data/licenses/apr-util/NOTICE +14 -0
- data/licenses/bdb/LICENSE +102 -0
- data/licenses/cyrus-sasl/COPYING +44 -0
- data/licenses/neon/COPYING.LIB +482 -0
- data/licenses/openssl/LICENSE +127 -0
- data/licenses/serf/LICENSE +201 -0
- data/licenses/svn/COPYING +57 -0
- data/licenses/zlib/README +125 -0
- data/ruby/ext/svn/ext/client.dll +0 -0
- data/ruby/ext/svn/ext/core.dll +0 -0
- data/ruby/ext/svn/ext/delta.dll +0 -0
- data/ruby/ext/svn/ext/fs.dll +0 -0
- data/ruby/ext/svn/ext/intl3_svn.dll +0 -0
- data/ruby/ext/svn/ext/libapr-1.dll +0 -0
- data/ruby/ext/svn/ext/libaprutil-1.dll +0 -0
- data/ruby/ext/svn/ext/libdb44.dll +0 -0
- data/ruby/ext/svn/ext/libsvn_client-1.dll +0 -0
- data/ruby/ext/svn/ext/libsvn_delta-1.dll +0 -0
- data/ruby/ext/svn/ext/libsvn_diff-1.dll +0 -0
- data/ruby/ext/svn/ext/libsvn_fs-1.dll +0 -0
- data/ruby/ext/svn/ext/libsvn_ra-1.dll +0 -0
- data/ruby/ext/svn/ext/libsvn_repos-1.dll +0 -0
- data/ruby/ext/svn/ext/libsvn_subr-1.dll +0 -0
- data/ruby/ext/svn/ext/libsvn_swig_ruby-1.dll +0 -0
- data/ruby/ext/svn/ext/libsvn_wc-1.dll +0 -0
- data/ruby/ext/svn/ext/ra.dll +0 -0
- data/ruby/ext/svn/ext/repos.dll +0 -0
- data/ruby/ext/svn/ext/wc.dll +0 -0
- data/ruby/lib/svn/client.rb +771 -0
- data/ruby/lib/svn/core.rb +817 -0
- data/ruby/lib/svn/delta.rb +503 -0
- data/ruby/lib/svn/error.rb +74 -0
- data/ruby/lib/svn/fs.rb +628 -0
- data/ruby/lib/svn/info.rb +321 -0
- data/ruby/lib/svn/ra.rb +353 -0
- data/ruby/lib/svn/repos.rb +472 -0
- data/ruby/lib/svn/util.rb +129 -0
- data/ruby/lib/svn/wc.rb +689 -0
- metadata +96 -0
data/ruby/lib/svn/wc.rb
ADDED
@@ -0,0 +1,689 @@
|
|
1
|
+
require "English"
|
2
|
+
require "svn/error"
|
3
|
+
require "svn/util"
|
4
|
+
require "svn/core"
|
5
|
+
require "svn/delta"
|
6
|
+
require "svn/ext/wc"
|
7
|
+
|
8
|
+
module Svn
|
9
|
+
module Wc
|
10
|
+
Util.set_constants(Ext::Wc, self)
|
11
|
+
Util.set_methods(Ext::Wc, self)
|
12
|
+
self.swig_init_asp_dot_net_hack()
|
13
|
+
|
14
|
+
@@alias_targets = %w(parse_externals_description
|
15
|
+
ensure_adm cleanup)
|
16
|
+
class << self
|
17
|
+
@@alias_targets.each do |target|
|
18
|
+
alias_method "_#{target}", target
|
19
|
+
end
|
20
|
+
end
|
21
|
+
@@alias_targets.each do |target|
|
22
|
+
alias_method "_#{target}", target
|
23
|
+
end
|
24
|
+
@@alias_targets = nil
|
25
|
+
|
26
|
+
module_function
|
27
|
+
def locked?(path)
|
28
|
+
Wc.locked(path)
|
29
|
+
end
|
30
|
+
|
31
|
+
def ensure_adm(*args)
|
32
|
+
AdmAccess.ensure(*args)
|
33
|
+
end
|
34
|
+
|
35
|
+
# For backward compatibility
|
36
|
+
def parse_externals_description(*args)
|
37
|
+
ExternalsDescription.parse(*args)
|
38
|
+
end
|
39
|
+
|
40
|
+
def actual_target(path)
|
41
|
+
Wc.get_actual_target(path)
|
42
|
+
end
|
43
|
+
|
44
|
+
def normal_prop?(name)
|
45
|
+
Wc.is_normal_prop(name)
|
46
|
+
end
|
47
|
+
|
48
|
+
def wc_prop?(name)
|
49
|
+
Wc.is_wc_prop(name)
|
50
|
+
end
|
51
|
+
|
52
|
+
def entry_prop?(name)
|
53
|
+
Wc.is_entry_prop(name)
|
54
|
+
end
|
55
|
+
|
56
|
+
def pristine_copy_path(path)
|
57
|
+
Wc.get_pristine_copy_path(path)
|
58
|
+
end
|
59
|
+
|
60
|
+
def default_ignores(config)
|
61
|
+
Wc.get_default_ignores(config)
|
62
|
+
end
|
63
|
+
|
64
|
+
def cleanup(path, diff3_cmd=nil, cancel_func=nil)
|
65
|
+
Wc.cleanup2(path, diff3_cmd, cancel_func)
|
66
|
+
end
|
67
|
+
|
68
|
+
def ignore?(path, patterns)
|
69
|
+
Wc.match_ignore_list(path, patterns)
|
70
|
+
end
|
71
|
+
|
72
|
+
module ExternalsDescription
|
73
|
+
module_function
|
74
|
+
def parse(parent_dir, desc, canonicalize_url=true)
|
75
|
+
Wc.parse_externals_description3(parent_dir, desc, canonicalize_url)
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
class ExternalItem
|
80
|
+
class << self
|
81
|
+
undef new
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
AdmAccess = SWIG::TYPE_p_svn_wc_adm_access_t
|
86
|
+
class AdmAccess
|
87
|
+
class << self
|
88
|
+
def ensure(path, uuid, url, repos, revision, depth=nil)
|
89
|
+
Wc.ensure_adm3(path, uuid, url, repos, revision, depth)
|
90
|
+
end
|
91
|
+
|
92
|
+
def open(associated, path, write_lock=true,
|
93
|
+
depth=-1, cancel_func=nil, &block)
|
94
|
+
_open(:adm_open3, associated, path, write_lock,
|
95
|
+
depth, cancel_func, &block)
|
96
|
+
end
|
97
|
+
|
98
|
+
def probe_open(associated, path, write_lock=true, depth=-1,
|
99
|
+
cancel_func=nil, &block)
|
100
|
+
_open(:adm_probe_open3, associated, path, write_lock,
|
101
|
+
depth, cancel_func, &block)
|
102
|
+
end
|
103
|
+
|
104
|
+
def open_anchor(path, write_lock=true, depth=-1,
|
105
|
+
cancel_func=nil, &block)
|
106
|
+
_open(:adm_open_anchor, path, write_lock, depth,
|
107
|
+
cancel_func, &block)
|
108
|
+
end
|
109
|
+
|
110
|
+
private
|
111
|
+
def _open(name, *args, &block)
|
112
|
+
results = Wc.__send__(name, *args, &block)
|
113
|
+
adm, *rest = results
|
114
|
+
|
115
|
+
if block_given?
|
116
|
+
begin
|
117
|
+
yield *results
|
118
|
+
ensure
|
119
|
+
adm.close
|
120
|
+
end
|
121
|
+
else
|
122
|
+
results
|
123
|
+
end
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
127
|
+
attr_accessor :traversal_info
|
128
|
+
|
129
|
+
def open(*args, &block)
|
130
|
+
self.class.open(self, *args, &block)
|
131
|
+
end
|
132
|
+
|
133
|
+
def probe_open(*args, &block)
|
134
|
+
self.class.probe_open(self, *args, &block)
|
135
|
+
end
|
136
|
+
|
137
|
+
def retrieve(path)
|
138
|
+
Wc.adm_retrieve(self, path)
|
139
|
+
end
|
140
|
+
|
141
|
+
def probe_retrieve(path)
|
142
|
+
Wc.adm_probe_retrieve(self, path)
|
143
|
+
end
|
144
|
+
|
145
|
+
def probe_try(path, write_lock, depth, &cancel_func)
|
146
|
+
Wc.adm_probe_try3(self, path, write_lock, depth, cancel_func)
|
147
|
+
end
|
148
|
+
|
149
|
+
def close
|
150
|
+
Wc.adm_close(self)
|
151
|
+
end
|
152
|
+
|
153
|
+
def path
|
154
|
+
Wc.adm_access_path(self)
|
155
|
+
end
|
156
|
+
|
157
|
+
def locked?
|
158
|
+
Wc.adm_locked(self)
|
159
|
+
end
|
160
|
+
|
161
|
+
def has_binary_prop?(path)
|
162
|
+
Wc.has_binary_prop(path, self)
|
163
|
+
end
|
164
|
+
|
165
|
+
def text_modified?(filename, force=false)
|
166
|
+
Wc.text_modified_p(filename, force, self)
|
167
|
+
end
|
168
|
+
|
169
|
+
def props_modified?(path)
|
170
|
+
Wc.props_modified_p(path, self)
|
171
|
+
end
|
172
|
+
|
173
|
+
def entry(path, show_hidden=false)
|
174
|
+
Entry.new(path, self, show_hidden, Svn::Core::Pool.new)
|
175
|
+
end
|
176
|
+
|
177
|
+
def read_entries(show_hidden=false)
|
178
|
+
Wc.entries_read(self, show_hidden, Svn::Core::Pool.new)
|
179
|
+
end
|
180
|
+
|
181
|
+
def ancestry(path)
|
182
|
+
Wc.get_ancestry(path, self)
|
183
|
+
end
|
184
|
+
|
185
|
+
def walk_entries(path, callbacks, show_hidden=false, cancel_func=nil,
|
186
|
+
depth=nil)
|
187
|
+
Wc.walk_entries3(path, self, callbacks, depth, show_hidden,
|
188
|
+
cancel_func)
|
189
|
+
end
|
190
|
+
|
191
|
+
def mark_missing_deleted(path)
|
192
|
+
Wc.mark_missing_deleted(path, self)
|
193
|
+
end
|
194
|
+
|
195
|
+
def maybe_set_repos_root(path, repos)
|
196
|
+
Wc.maybe_set_repos_root(self, path, repos)
|
197
|
+
end
|
198
|
+
|
199
|
+
def status(path)
|
200
|
+
Wc.status2(path, self)
|
201
|
+
end
|
202
|
+
|
203
|
+
def status_editor(target, config, recurse=true,
|
204
|
+
get_all=true, no_ignore=true,
|
205
|
+
cancel_func=nil, traversal_info=nil)
|
206
|
+
traversal_info ||= _traversal_info
|
207
|
+
status_func = Proc.new do |path, status|
|
208
|
+
yield(path, status)
|
209
|
+
end
|
210
|
+
ret = Wc.get_status_editor2(self, target, config, recurse,
|
211
|
+
get_all, no_ignore, status_func,
|
212
|
+
cancel_func, traversal_info)
|
213
|
+
editor, editor_baton, set_lock_baton = *ret
|
214
|
+
editor.instance_variable_set("@__status_fun__", status_func)
|
215
|
+
editor.baton = editor_baton
|
216
|
+
def set_lock_baton.set_repos_locks(locks, repos_root)
|
217
|
+
Wc.status_set_repos_locks(self, locks, repos_root)
|
218
|
+
end
|
219
|
+
[editor, set_lock_baton]
|
220
|
+
end
|
221
|
+
|
222
|
+
def copy(src, dst_basename, cancel_func=nil, notify_func=nil)
|
223
|
+
Wc.copy2(src, self, dst_basename, cancel_func, notify_func)
|
224
|
+
end
|
225
|
+
|
226
|
+
def delete(path, cancel_func=nil, notify_func=nil, keep_local=false)
|
227
|
+
Wc.delete3(path, self, cancel_func, notify_func, keep_local)
|
228
|
+
end
|
229
|
+
|
230
|
+
def add(path, copyfrom_url=nil, copyfrom_rev=0,
|
231
|
+
cancel_func=nil, notify_func=nil)
|
232
|
+
Wc.add2(path, self, copyfrom_url, copyfrom_rev,
|
233
|
+
cancel_func, notify_func)
|
234
|
+
end
|
235
|
+
|
236
|
+
def add_repos_file(dst_path, new_text_path, new_props,
|
237
|
+
copyfrom_url=nil, copyfrom_rev=0)
|
238
|
+
Wc.add_repos_file(dst_path, self, new_text_path,
|
239
|
+
new_props, copyfrom_url, copyfrom_rev)
|
240
|
+
end
|
241
|
+
|
242
|
+
def add_repos_file2(dst_path, new_text_base_path, new_base_props,
|
243
|
+
new_text_path=nil, new_props=nil,
|
244
|
+
copyfrom_url=nil, copyfrom_rev=0)
|
245
|
+
Wc.add_repos_file2(dst_path, self,
|
246
|
+
new_text_base_path, new_text_path,
|
247
|
+
new_base_props, new_props,
|
248
|
+
copyfrom_url, copyfrom_rev)
|
249
|
+
end
|
250
|
+
|
251
|
+
def remove_from_revision_control(name, destroy_wf=true,
|
252
|
+
instant_error=true,
|
253
|
+
cancel_func=nil)
|
254
|
+
Wc.remove_from_revision_control(self, name,
|
255
|
+
destroy_wf,
|
256
|
+
instant_error,
|
257
|
+
cancel_func)
|
258
|
+
end
|
259
|
+
|
260
|
+
def resolved_conflict(path, resolve_text=true,
|
261
|
+
resolve_props=true, recurse=true,
|
262
|
+
notify_func=nil, cancel_func=nil)
|
263
|
+
Wc.resolved_conflict2(path, self, resolve_text,
|
264
|
+
resolve_props, recurse,
|
265
|
+
notify_func, cancel_func)
|
266
|
+
end
|
267
|
+
|
268
|
+
def process_committed(path, new_revnum, rev_date=nil, rev_author=nil,
|
269
|
+
wcprop_changes=[], recurse=true,
|
270
|
+
remove_lock=true, digest=nil,
|
271
|
+
remove_changelist=false)
|
272
|
+
Wc.process_committed4(path, self, recurse,
|
273
|
+
new_revnum, rev_date,
|
274
|
+
rev_author, wcprop_changes,
|
275
|
+
remove_lock, remove_changelist, digest)
|
276
|
+
end
|
277
|
+
|
278
|
+
def crawl_revisions(path, reporter, restore_files=true,
|
279
|
+
depth=nil, use_commit_times=true,
|
280
|
+
notify_func=nil, traversal_info=nil)
|
281
|
+
traversal_info ||= _traversal_info
|
282
|
+
Wc.crawl_revisions3(path, self, reporter, reporter.baton,
|
283
|
+
restore_files, depth, use_commit_times,
|
284
|
+
notify_func, traversal_info)
|
285
|
+
end
|
286
|
+
|
287
|
+
def wc_root?(path)
|
288
|
+
Wc.is_wc_root(path, self)
|
289
|
+
end
|
290
|
+
|
291
|
+
def update_editor(target, target_revision=nil, use_commit_times=nil,
|
292
|
+
depth=nil, allow_unver_obstruction=nil, diff3_cmd=nil,
|
293
|
+
notify_func=nil, cancel_func=nil, traversal_info=nil,
|
294
|
+
preserved_exts=nil)
|
295
|
+
update_editor2(:target => target,
|
296
|
+
:target_revision => target_revision,
|
297
|
+
:use_commit_times => use_commit_times,
|
298
|
+
:depth => depth,
|
299
|
+
:allow_unver_obstruction => allow_unver_obstruction,
|
300
|
+
:diff3_cmd => diff3_cmd,
|
301
|
+
:notify_func => notify_func,
|
302
|
+
:cancel_func => cancel_func,
|
303
|
+
:traversal_info => traversal_info,
|
304
|
+
:preserved_exts => preserved_exts )
|
305
|
+
end
|
306
|
+
|
307
|
+
UPDATE_EDITOR2_REQUIRED_ARGUMENTS_KEYS = [:target]
|
308
|
+
def update_editor2(arguments={})
|
309
|
+
arguments = arguments.reject {|k, v| v.nil?}
|
310
|
+
optional_arguments_defaults = {
|
311
|
+
:target_revision => nil,
|
312
|
+
:use_commit_times => true,
|
313
|
+
:depth => nil,
|
314
|
+
:depth_is_sticky => false,
|
315
|
+
:allow_unver_obstruction => false,
|
316
|
+
:diff3_cmd => nil,
|
317
|
+
:notify_func => nil,
|
318
|
+
:cancel_func => nil,
|
319
|
+
:conflict_func => nil,
|
320
|
+
:traversal_info => _traversal_info,
|
321
|
+
:preserved_exts => []
|
322
|
+
}
|
323
|
+
|
324
|
+
arguments = optional_arguments_defaults.merge(arguments)
|
325
|
+
Util.validate_options(arguments,
|
326
|
+
optional_arguments_defaults.keys,
|
327
|
+
UPDATE_EDITOR2_REQUIRED_ARGUMENTS_KEYS)
|
328
|
+
|
329
|
+
# TODO(rb support fetch_fun): implement support for the fetch_func
|
330
|
+
# callback.
|
331
|
+
arguments[:fetch_func] = nil
|
332
|
+
|
333
|
+
results = Wc.get_update_editor3(arguments[:target_revision], self,
|
334
|
+
arguments[:target],
|
335
|
+
arguments[:use_commit_times],
|
336
|
+
arguments[:depth],
|
337
|
+
arguments[:depth_is_sticky],
|
338
|
+
arguments[:allow_unver_obstruction],
|
339
|
+
arguments[:notify_func],
|
340
|
+
arguments[:cancel_func],
|
341
|
+
arguments[:conflict_func],
|
342
|
+
arguments[:fetch_func],
|
343
|
+
arguments[:diff3_cmd],
|
344
|
+
arguments[:preserved_exts],
|
345
|
+
arguments[:traversal_info])
|
346
|
+
target_revision_address, editor, editor_baton = results
|
347
|
+
editor.__send__(:target_revision_address=, target_revision_address)
|
348
|
+
editor.baton = editor_baton
|
349
|
+
editor
|
350
|
+
end
|
351
|
+
|
352
|
+
def switch_editor(target, switch_url, target_revision=nil,
|
353
|
+
use_commit_times=nil, depth=nil,
|
354
|
+
allow_unver_obstruction=nil, diff3_cmd=nil,
|
355
|
+
notify_func=nil, cancel_func=nil, traversal_info=nil,
|
356
|
+
preserved_exts=nil)
|
357
|
+
switch_editor2(:target => target,
|
358
|
+
:switch_url => switch_url,
|
359
|
+
:target_revision => target_revision,
|
360
|
+
:use_commit_times => use_commit_times,
|
361
|
+
:depth => depth,
|
362
|
+
:allow_unver_obstruction => allow_unver_obstruction,
|
363
|
+
:diff3_cmd => diff3_cmd,
|
364
|
+
:notify_func => notify_func,
|
365
|
+
:cancel_func => cancel_func,
|
366
|
+
:traversal_info => traversal_info,
|
367
|
+
:preserved_exts => preserved_exts )
|
368
|
+
end
|
369
|
+
|
370
|
+
SWITCH_EDITOR2_REQUIRED_ARGUMENTS_KEYS = [:target, :switch_url]
|
371
|
+
def switch_editor2(arguments={})
|
372
|
+
arguments = arguments.reject {|k, v| v.nil?}
|
373
|
+
optional_arguments_defaults = {
|
374
|
+
:target_revision => nil,
|
375
|
+
:use_commit_times => true,
|
376
|
+
:depth => nil,
|
377
|
+
:depth_is_sticky => false,
|
378
|
+
:allow_unver_obstruction => false,
|
379
|
+
:diff3_cmd => nil,
|
380
|
+
:notify_func => nil,
|
381
|
+
:cancel_func => nil,
|
382
|
+
:conflict_func => nil,
|
383
|
+
:traversal_info => _traversal_info,
|
384
|
+
:preserved_exts => []
|
385
|
+
}
|
386
|
+
arguments = optional_arguments_defaults.merge(arguments)
|
387
|
+
Util.validate_options(arguments,
|
388
|
+
optional_arguments_defaults.keys,
|
389
|
+
SWITCH_EDITOR2_REQUIRED_ARGUMENTS_KEYS)
|
390
|
+
|
391
|
+
results = Wc.get_switch_editor3(arguments[:target_revision], self,
|
392
|
+
arguments[:target],
|
393
|
+
arguments[:switch_url],
|
394
|
+
arguments[:use_commit_times],
|
395
|
+
arguments[:depth],
|
396
|
+
arguments[:depth_is_sticky],
|
397
|
+
arguments[:allow_unver_obstruction],
|
398
|
+
arguments[:notify_func],
|
399
|
+
arguments[:cancel_func],
|
400
|
+
arguments[:conflict_func],
|
401
|
+
arguments[:diff3_cmd],
|
402
|
+
arguments[:preserved_exts],
|
403
|
+
arguments[:traversal_info])
|
404
|
+
target_revision_address, editor, editor_baton = results
|
405
|
+
editor.__send__(:target_revision_address=, target_revision_address)
|
406
|
+
editor.baton = editor_baton
|
407
|
+
editor
|
408
|
+
end
|
409
|
+
|
410
|
+
def prop_list(path)
|
411
|
+
Wc.prop_list(path, self)
|
412
|
+
end
|
413
|
+
|
414
|
+
def prop(name, path)
|
415
|
+
Wc.prop_get(name, path, self)
|
416
|
+
end
|
417
|
+
|
418
|
+
def set_prop(name, value, path, skip_checks=false)
|
419
|
+
Wc.prop_set2(name, value, path, self, skip_checks)
|
420
|
+
end
|
421
|
+
|
422
|
+
def diff_editor(target, callbacks, depth=nil,
|
423
|
+
ignore_ancestry=true, use_text_base=false,
|
424
|
+
reverse_order=false, cancel_func=nil)
|
425
|
+
callbacks_wrapper = DiffCallbacksWrapper.new(callbacks)
|
426
|
+
args = [target, callbacks_wrapper, depth, ignore_ancestry,
|
427
|
+
use_text_base, reverse_order, cancel_func]
|
428
|
+
diff_editor2(*args)
|
429
|
+
end
|
430
|
+
|
431
|
+
def diff_editor2(target, callbacks, depth=nil,
|
432
|
+
ignore_ancestry=true, use_text_base=false,
|
433
|
+
reverse_order=false, cancel_func=nil, changelists=nil)
|
434
|
+
editor, editor_baton = Wc.get_diff_editor4(self, target, callbacks,
|
435
|
+
depth, ignore_ancestry,
|
436
|
+
use_text_base, reverse_order,
|
437
|
+
cancel_func, changelists)
|
438
|
+
editor.baton = editor_baton
|
439
|
+
editor
|
440
|
+
end
|
441
|
+
|
442
|
+
def diff(target, callbacks, recurse=true, ignore_ancestry=true)
|
443
|
+
callbacks_wrapper = DiffCallbacksWrapper.new(callbacks)
|
444
|
+
args = [target, callbacks_wrapper, recurse, ignore_ancestry]
|
445
|
+
diff2(*args)
|
446
|
+
end
|
447
|
+
|
448
|
+
def diff2(target, callbacks, recurse=true, ignore_ancestry=true)
|
449
|
+
Wc.diff3(self, target, callbacks, recurse, ignore_ancestry)
|
450
|
+
end
|
451
|
+
|
452
|
+
def prop_diffs(path)
|
453
|
+
Wc.get_prop_diffs(path, self)
|
454
|
+
end
|
455
|
+
|
456
|
+
def merge(left, right, merge_target, left_label,
|
457
|
+
right_label, target_label, dry_run=false,
|
458
|
+
diff3_cmd=nil, merge_options=nil)
|
459
|
+
Wc.merge2(left, right, merge_target, self,
|
460
|
+
left_label, right_label, target_label,
|
461
|
+
dry_run, diff3_cmd, merge_options)
|
462
|
+
end
|
463
|
+
|
464
|
+
def merge_props(path, baseprops, propchanges, base_merge=true,
|
465
|
+
dry_run=false)
|
466
|
+
Wc.merge_props(path, self, baseprops, propchanges,
|
467
|
+
base_merge, dry_run)
|
468
|
+
end
|
469
|
+
|
470
|
+
def merge_prop_diffs(path, propchanges, base_merge=true,
|
471
|
+
dry_run=false)
|
472
|
+
Wc.merge_prop_diffs(path, self, propchanges,
|
473
|
+
base_merge, dry_run)
|
474
|
+
end
|
475
|
+
|
476
|
+
def relocate(path, from, to, recurse=true, old_validator=nil, &validator)
|
477
|
+
if validator.nil? and !old_validator.nil?
|
478
|
+
validator = Proc.new do |uuid, url, root_url|
|
479
|
+
old_validator.call(uuid,
|
480
|
+
root_url ? root_url : url,
|
481
|
+
root_url ? true : false)
|
482
|
+
end
|
483
|
+
end
|
484
|
+
Wc.relocate3(path, self, from, to, recurse, validator)
|
485
|
+
end
|
486
|
+
|
487
|
+
def revert(path, recurse=true, use_commit_times=true,
|
488
|
+
cancel_func=nil, notify_func=nil)
|
489
|
+
Wc.revert2(path, self, recurse, use_commit_times,
|
490
|
+
cancel_func, notify_func)
|
491
|
+
end
|
492
|
+
|
493
|
+
def translated_file(src, versioned_file, flags)
|
494
|
+
temp = Wc.translated_file2(src, versioned_file, self, flags)
|
495
|
+
temp.close
|
496
|
+
path = temp.path
|
497
|
+
path.instance_variable_set("@__temp__", temp)
|
498
|
+
path
|
499
|
+
end
|
500
|
+
|
501
|
+
def translated_file2(src, versioned_file, flags)
|
502
|
+
Wc.translated_file2(src, versioned_file, self, flags)
|
503
|
+
end
|
504
|
+
|
505
|
+
def translated_stream(path, versioned_file, flags)
|
506
|
+
Wc.translated_stream(path, versioned_file, self, flags)
|
507
|
+
end
|
508
|
+
|
509
|
+
def transmit_text_deltas(path, editor, file_baton, fulltext=false)
|
510
|
+
editor.baton = file_baton
|
511
|
+
Wc.transmit_text_deltas(path, self, fulltext, editor)
|
512
|
+
end
|
513
|
+
|
514
|
+
def transmit_text_deltas2(path, editor, fulltext=false)
|
515
|
+
Wc.transmit_text_deltas2(path, self, fulltext, editor)
|
516
|
+
end
|
517
|
+
|
518
|
+
def transmit_prop_deltas(path, entry, editor, baton=nil)
|
519
|
+
editor.baton = baton if baton
|
520
|
+
Wc.transmit_prop_deltas(path, self, entry, editor)
|
521
|
+
end
|
522
|
+
|
523
|
+
def ignores(config)
|
524
|
+
Wc.get_ignores(config, self)
|
525
|
+
end
|
526
|
+
|
527
|
+
def add_lock(path, lock)
|
528
|
+
Wc.add_lock(path, lock, self)
|
529
|
+
end
|
530
|
+
|
531
|
+
def remove_lock(path)
|
532
|
+
Wc.remove_lock(path, self)
|
533
|
+
end
|
534
|
+
|
535
|
+
def set_changelist(path, changelist_name, cancel_func=nil,
|
536
|
+
notify_func=nil)
|
537
|
+
Wc.set_changelist(path, changelist_name, self, cancel_func,
|
538
|
+
notify_func)
|
539
|
+
end
|
540
|
+
|
541
|
+
private
|
542
|
+
def _traversal_info
|
543
|
+
@traversal_info ||= nil
|
544
|
+
end
|
545
|
+
end
|
546
|
+
|
547
|
+
class DiffCallbacksWrapper
|
548
|
+
def initialize(original)
|
549
|
+
@original = original
|
550
|
+
end
|
551
|
+
|
552
|
+
def file_changed(access, path, tmpfile1, tmpfile2, rev1,
|
553
|
+
rev2, mimetype1, mimetype2,
|
554
|
+
prop_changes, original_props)
|
555
|
+
prop_changes = Util.hash_to_prop_array(prop_changes)
|
556
|
+
@original.file_changed(access, path, tmpfile1, tmpfile2, rev1,
|
557
|
+
rev2, mimetype1, mimetype2,
|
558
|
+
prop_changes, original_props)
|
559
|
+
end
|
560
|
+
|
561
|
+
def file_added(access, path, tmpfile1, tmpfile2, rev1,
|
562
|
+
rev2, mimetype1, mimetype2,
|
563
|
+
prop_changes, original_props)
|
564
|
+
prop_changes = Util.hash_to_prop_array(prop_changes)
|
565
|
+
@original.file_added(access, path, tmpfile1, tmpfile2, rev1,
|
566
|
+
rev2, mimetype1, mimetype2,
|
567
|
+
prop_changes, original_props)
|
568
|
+
end
|
569
|
+
|
570
|
+
def dir_props_changed(access, path, prop_changes, original_props)
|
571
|
+
prop_changes = Util.hash_to_prop_array(prop_changes)
|
572
|
+
@original.dir_props_changed(access, path, prop_changes, original_props)
|
573
|
+
end
|
574
|
+
|
575
|
+
def method_missing(method, *args, &block)
|
576
|
+
@original.__send__(method, *args, &block)
|
577
|
+
end
|
578
|
+
end
|
579
|
+
|
580
|
+
class TraversalInfo
|
581
|
+
def edited_externals
|
582
|
+
Wc.edited_externals(self)
|
583
|
+
end
|
584
|
+
end
|
585
|
+
|
586
|
+
class Entry
|
587
|
+
def dup
|
588
|
+
Wc.entry_dup(self, Svn::Core::Pool.new)
|
589
|
+
end
|
590
|
+
|
591
|
+
def conflicted(dir_path)
|
592
|
+
Wc.conflicted_p(dir_path, self)
|
593
|
+
end
|
594
|
+
|
595
|
+
def conflicted?(dir_path)
|
596
|
+
conflicted(dir_path).any? {|x| x}
|
597
|
+
end
|
598
|
+
|
599
|
+
def text_conflicted?(dir_path)
|
600
|
+
conflicted(dir_path)[0]
|
601
|
+
end
|
602
|
+
|
603
|
+
def prop_conflicted?(dir_path)
|
604
|
+
conflicted(dir_path)[1]
|
605
|
+
end
|
606
|
+
|
607
|
+
def dir?
|
608
|
+
kind == Core::NODE_DIR
|
609
|
+
end
|
610
|
+
|
611
|
+
def file?
|
612
|
+
kind == Core::NODE_FILE
|
613
|
+
end
|
614
|
+
|
615
|
+
def add?
|
616
|
+
schedule == SCHEDULE_ADD
|
617
|
+
end
|
618
|
+
|
619
|
+
def normal?
|
620
|
+
schedule == SCHEDULE_NORMAL
|
621
|
+
end
|
622
|
+
end
|
623
|
+
|
624
|
+
class Status2
|
625
|
+
def dup
|
626
|
+
Wc.dup_status2(self, Core::Pool.new)
|
627
|
+
end
|
628
|
+
|
629
|
+
def text_added?
|
630
|
+
text_status == STATUS_ADDED
|
631
|
+
end
|
632
|
+
|
633
|
+
def text_normal?
|
634
|
+
text_status == STATUS_NORMAL
|
635
|
+
end
|
636
|
+
end
|
637
|
+
|
638
|
+
class Notify
|
639
|
+
def dup
|
640
|
+
Wc.dup_notify(self, Core::Pool.new)
|
641
|
+
end
|
642
|
+
|
643
|
+
def commit_added?
|
644
|
+
action == NOTIFY_COMMIT_ADDED
|
645
|
+
end
|
646
|
+
|
647
|
+
def commit_deleted?
|
648
|
+
action == NOTIFY_COMMIT_DELETED
|
649
|
+
end
|
650
|
+
|
651
|
+
def commit_postfix_txdelta?
|
652
|
+
action == NOTIFY_COMMIT_POSTFIX_TXDELTA
|
653
|
+
end
|
654
|
+
|
655
|
+
def add?
|
656
|
+
action == NOTIFY_ADD
|
657
|
+
end
|
658
|
+
|
659
|
+
def locked?
|
660
|
+
lock_state = NOTIFY_LOCK_STATE_LOCKED
|
661
|
+
end
|
662
|
+
|
663
|
+
def unlocked?
|
664
|
+
lock_state = NOTIFY_LOCK_STATE_UNLOCKED
|
665
|
+
end
|
666
|
+
end
|
667
|
+
|
668
|
+
class RevisionStatus
|
669
|
+
alias _initialize initialize
|
670
|
+
def initialize(wc_path, trail_url, committed, cancel_func=nil)
|
671
|
+
_initialize(wc_path, trail_url, committed, cancel_func)
|
672
|
+
end
|
673
|
+
end
|
674
|
+
|
675
|
+
class CommittedQueue
|
676
|
+
def push(access, path, recurse=true, wcprop_changes={}, remove_lock=true,
|
677
|
+
remove_changelist=false, digest=nil)
|
678
|
+
Wc.queue_committed(self, path, access, recurse, wcprop_changes,
|
679
|
+
remove_lock, remove_changelist, digest)
|
680
|
+
self
|
681
|
+
end
|
682
|
+
|
683
|
+
def process(access, new_rev, rev_date=nil, rev_author=nil)
|
684
|
+
rev_date = rev_date.to_svn_format if rev_date.is_a?(Time)
|
685
|
+
Wc.process_committed_queue(self, access, new_rev, rev_date, rev_author)
|
686
|
+
end
|
687
|
+
end
|
688
|
+
end
|
689
|
+
end
|