require "P4"
p4 = P4.new
p4.connect
# Just looking for known errors that I'm reasonably sure I can clear.
expression = "DTG_ERROR=:java.util.ConcurrentModificationException | DTG_ERROR=SAVE_DEFECT | DTG_ERROR=java.util.ConcurrentModificationException"
begin
issueList = p4.run_jobs "-e", expression
puts "Job count = #{issueList.size}"
if issueList.size < 1
exit
end
cnt = 0
totCnt = 0
loopCnt = 0
issueList.each do | jobLoop |
job = p4.fetch_job jobLoop["Job"]
cnt += 1
puts "\n\n"
print job["Job"]
print " "
print job["DTG_DTISSUE"]
print " "
print job["DTG_ERROR"]
puts ""
print "Clear DTG_ERROR (y/n/q): "
response = $stdin.gets.chomp
if response == "q"
exit
end
if response == "y"
puts "clearing ...."
job["DTG_ERROR"] = ""
p4.save_job(job)
else
puts "not touching ...."
end
end
rescue P4Exception
# If any errors occur, we'll jump in here. Just log them
# and raise the exception up to the higher level
p4.errors.each { |e| $stderr.puts( e ) }
raise
end
def handle_job
end
def getIssueList
end
# |
Change |
User |
Description |
Committed |
|
#1
|
19624 |
Joel Brown |
Sample script to clear DTG_ERROR for known errors. |
|
|