Debian Codegraph @

tests/performance/makejobs.rb

raw
1 #!/usr/bin/env ruby
2
3 # this ruby script generates a chronologically sorted
4
5 res = ""
6 input = File.read(ARGV[0])
7 input = input.gsub(/#.*/, "")
8 input.split("\n").each {|a|
9 if a =~ /([^ ]*)\.\.([^ ]*) %(.*)/
10 res += `git log #{$1}..#{$2} | grep '^commit' | sed 's/commit //' | sed -n '0~#{$3}p'`
11 elsif a =~ /([^ ]*)\.\.([^ ]*)/
12 res += `git log #{$1}..#{$2} | grep '^commit' | sed 's/commit //'`
13 else
14 res += `echo #{a}`
15 end
16 }
17
18 all = `git log | grep '^commit' | sed 's/commit//' `
19 all.split("\n").reverse.each {|a|
20 if res.match(a.strip) != nil
21 puts "#{a.strip}"
22 end
23 }
24