Mercurial > hg > soundsoftware-site
comparison lib/redmine/scm/adapters/mercurial_adapter.rb @ 1517:dffacf8a6908 redmine-2.5
Update to Redmine SVN revision 13367 on 2.5-stable branch
author | Chris Cannam |
---|---|
date | Tue, 09 Sep 2014 09:29:00 +0100 |
parents | e248c7af89ec |
children | a1bdbf8a87d5 |
comparison
equal
deleted
inserted
replaced
1516:b450a9d58aed | 1517:dffacf8a6908 |
---|---|
217 :from_path => (cpmap.member?(p) ? with_leading_slash(cpmap[p]) : nil), | 217 :from_path => (cpmap.member?(p) ? with_leading_slash(cpmap[p]) : nil), |
218 :from_revision => (cpmap.member?(p) ? le['node'] : nil)} | 218 :from_revision => (cpmap.member?(p) ? le['node'] : nil)} |
219 end.sort { |a, b| a[:path] <=> b[:path] } | 219 end.sort { |a, b| a[:path] <=> b[:path] } |
220 parents_ary = [] | 220 parents_ary = [] |
221 as_ary(le['parents']['parent']).map do |par| | 221 as_ary(le['parents']['parent']).map do |par| |
222 parents_ary << par['__content__'] if par['__content__'] != "000000000000" | 222 parents_ary << par['__content__'] if par['__content__'] != "0000000000000000000000000000000000000000" |
223 end | 223 end |
224 yield Revision.new(:revision => le['revision'], | 224 yield Revision.new(:revision => le['revision'], |
225 :scmid => le['node'], | 225 :scmid => le['node'], |
226 :author => (le['author']['__content__'] rescue ''), | 226 :author => (le['author']['__content__'] rescue ''), |
227 :time => Time.parse(le['date']['__content__']), | 227 :time => Time.parse(le['date']['__content__']), |
232 self | 232 self |
233 end | 233 end |
234 | 234 |
235 # Returns list of nodes in the specified branch | 235 # Returns list of nodes in the specified branch |
236 def nodes_in_branch(branch, options={}) | 236 def nodes_in_branch(branch, options={}) |
237 hg_args = ['rhlog', '--template', '{node|short}\n', '--rhbranch', CGI.escape(branch)] | 237 hg_args = ['rhlog', '--template', '{node}\n', '--rhbranch', CGI.escape(branch)] |
238 hg_args << '--from' << CGI.escape(branch) | 238 hg_args << '--from' << CGI.escape(branch) |
239 hg_args << '--to' << '0' | 239 hg_args << '--to' << '0' |
240 hg_args << '--limit' << options[:limit] if options[:limit] | 240 hg_args << '--limit' << options[:limit] if options[:limit] |
241 hg(*hg_args) { |io| io.readlines.map { |e| e.chomp } } | 241 hg(*hg_args) { |io| io.readlines.map { |e| e.chomp } } |
242 end | 242 end |