git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5112 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
0445c1e9cb
commit
bf6ec48bea
|
@ -120,9 +120,13 @@ def _manifest(ui, repo, path, rev):
|
||||||
ui.write('</manifest>\n')
|
ui.write('</manifest>\n')
|
||||||
|
|
||||||
def rhannotate(ui, repo, *pats, **opts):
|
def rhannotate(ui, repo, *pats, **opts):
|
||||||
|
rev = urllib.unquote_plus(opts.pop('rev', None))
|
||||||
|
opts['rev'] = rev
|
||||||
return commands.annotate(ui, repo, *map(urllib.unquote_plus, pats), **opts)
|
return commands.annotate(ui, repo, *map(urllib.unquote_plus, pats), **opts)
|
||||||
|
|
||||||
def rhcat(ui, repo, file1, *pats, **opts):
|
def rhcat(ui, repo, file1, *pats, **opts):
|
||||||
|
rev = urllib.unquote_plus(opts.pop('rev', None))
|
||||||
|
opts['rev'] = rev
|
||||||
return commands.cat(ui, repo, urllib.unquote_plus(file1), *map(urllib.unquote_plus, pats), **opts)
|
return commands.cat(ui, repo, urllib.unquote_plus(file1), *map(urllib.unquote_plus, pats), **opts)
|
||||||
|
|
||||||
def rhdiff(ui, repo, *pats, **opts):
|
def rhdiff(ui, repo, *pats, **opts):
|
||||||
|
|
|
@ -252,7 +252,7 @@ module Redmine
|
||||||
|
|
||||||
def cat(path, identifier=nil)
|
def cat(path, identifier=nil)
|
||||||
p = CGI.escape(scm_iconv(@path_encoding, 'UTF-8', path))
|
p = CGI.escape(scm_iconv(@path_encoding, 'UTF-8', path))
|
||||||
hg 'rhcat', '-r', hgrev(identifier), hgtarget(p) do |io|
|
hg 'rhcat', '-r', CGI.escape(hgrev(identifier)), hgtarget(p) do |io|
|
||||||
io.binmode
|
io.binmode
|
||||||
io.read
|
io.read
|
||||||
end
|
end
|
||||||
|
@ -263,7 +263,7 @@ module Redmine
|
||||||
def annotate(path, identifier=nil)
|
def annotate(path, identifier=nil)
|
||||||
p = CGI.escape(scm_iconv(@path_encoding, 'UTF-8', path))
|
p = CGI.escape(scm_iconv(@path_encoding, 'UTF-8', path))
|
||||||
blame = Annotate.new
|
blame = Annotate.new
|
||||||
hg 'rhannotate', '-ncu', '-r', hgrev(identifier), hgtarget(p) do |io|
|
hg 'rhannotate', '-ncu', '-r', CGI.escape(hgrev(identifier)), hgtarget(p) do |io|
|
||||||
io.each_line do |line|
|
io.each_line do |line|
|
||||||
line.force_encoding('ASCII-8BIT') if line.respond_to?(:force_encoding)
|
line.force_encoding('ASCII-8BIT') if line.respond_to?(:force_encoding)
|
||||||
next unless line =~ %r{^([^:]+)\s(\d+)\s([0-9a-f]+):\s(.*)$}
|
next unless line =~ %r{^([^:]+)\s(\d+)\s([0-9a-f]+):\s(.*)$}
|
||||||
|
|
Loading…
Reference in New Issue