76 |
76 |
path ||= ''
|
77 |
77 |
identifier = (identifier and identifier.to_i > 0) ? identifier.to_i : "HEAD"
|
78 |
78 |
entries = Entries.new
|
79 |
|
cmd = "#{SVN_BIN} list --xml #{target(path)}@#{identifier}"
|
|
79 |
cmd = "#{SVN_BIN} list --xml #{target(URI.escape(path))}@#{identifier}"
|
80 |
80 |
cmd << credentials_string
|
81 |
81 |
shellout(cmd) do |io|
|
82 |
82 |
output = io.read
|
... | ... | |
86 |
86 |
# Skip directory if there is no commit date (usually that
|
87 |
87 |
# means that we don't have read access to it)
|
88 |
88 |
next if entry.attributes['kind'] == 'dir' && entry.elements['commit'].elements['date'].nil?
|
89 |
|
entries << Entry.new({:name => entry.elements['name'].text,
|
|
89 |
entries << Entry.new({:name => URI.unescape(entry.elements['name'].text),
|
90 |
90 |
:path => ((path.empty? ? "" : "#{path}/") + entry.elements['name'].text),
|
91 |
91 |
:kind => entry.attributes['kind'],
|
92 |
92 |
:size => (entry.elements['size'] and entry.elements['size'].text).to_i,
|
... | ... | |
112 |
112 |
return nil unless self.class.client_version_above?([1, 5, 0])
|
113 |
113 |
|
114 |
114 |
identifier = (identifier and identifier.to_i > 0) ? identifier.to_i : "HEAD"
|
115 |
|
cmd = "#{SVN_BIN} proplist --verbose --xml #{target(path)}@#{identifier}"
|
|
115 |
cmd = "#{SVN_BIN} proplist --verbose --xml #{target(URI.escape(path))}@#{identifier}"
|
116 |
116 |
cmd << credentials_string
|
117 |
117 |
properties = {}
|
118 |
118 |
shellout(cmd) do |io|
|
... | ... | |
137 |
137 |
cmd = "#{SVN_BIN} log --xml -r #{identifier_from}:#{identifier_to}"
|
138 |
138 |
cmd << credentials_string
|
139 |
139 |
cmd << " --verbose " if options[:with_paths]
|
140 |
|
cmd << ' ' + target(path)
|
|
140 |
cmd << ' ' + target(URI.escape(path))
|
141 |
141 |
shellout(cmd) do |io|
|
142 |
142 |
begin
|
143 |
143 |
doc = REXML::Document.new(io)
|
... | ... | |
174 |
174 |
cmd = "#{SVN_BIN} diff -r "
|
175 |
175 |
cmd << "#{identifier_to}:"
|
176 |
176 |
cmd << "#{identifier_from}"
|
177 |
|
cmd << " #{target(path)}@#{identifier_from}"
|
|
177 |
cmd << " #{target(URI.escape(path))}@#{identifier_from}"
|
178 |
178 |
cmd << credentials_string
|
179 |
179 |
diff = []
|
180 |
180 |
shellout(cmd) do |io|
|
... | ... | |
188 |
188 |
|
189 |
189 |
def cat(path, identifier=nil)
|
190 |
190 |
identifier = (identifier and identifier.to_i > 0) ? identifier.to_i : "HEAD"
|
191 |
|
cmd = "#{SVN_BIN} cat #{target(path)}@#{identifier}"
|
|
191 |
cmd = "#{SVN_BIN} cat #{target(URI.escape(path))}@#{identifier}"
|
192 |
192 |
cmd << credentials_string
|
193 |
193 |
cat = nil
|
194 |
194 |
shellout(cmd) do |io|
|
... | ... | |
201 |
201 |
|
202 |
202 |
def annotate(path, identifier=nil)
|
203 |
203 |
identifier = (identifier and identifier.to_i > 0) ? identifier.to_i : "HEAD"
|
204 |
|
cmd = "#{SVN_BIN} blame #{target(path)}@#{identifier}"
|
|
204 |
cmd = "#{SVN_BIN} blame #{target(URI.escape(path))}@#{identifier}"
|
205 |
205 |
cmd << credentials_string
|
206 |
206 |
blame = Annotate.new
|
207 |
207 |
shellout(cmd) do |io|
|