<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>validate (CaseTrigger)</title>
<link rel=StyleSheet href="../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body bgcolor="white">
<pre><span class="cmt"># File checkcase.rb, line 64</span>
<span class="kw">def</span> validate()
badlist = Hash.new
change.each_file <span class="kw">do</span>
|file|
<span class="cmt"># Ignore files not open for add or branch</span>
action = file.revisions[ 0 ].action
<span class="kw">next</span> <span class="kw">unless</span> ( action == <span class="str">"add"</span> || action == <span class="str">"branch"</span> )
<span class="kw">if</span> ( mismatch_exists( file.depot_file ) )
<span class="cmt"># @mismatch set by mismatch_exists() et. al.</span>
badlist[ file.depot_file ] = @mismatch
<span class="kw">end</span>
<span class="kw">end</span>
<span class="cmt"># Now report any problems to the user</span>
report( badlist ) <span class="kw">if</span> ( ! badlist.empty? )
<span class="kw">return</span> badlist.empty?
<span class="kw">end</span></pre>
</body>
</html>
# |
Change |
User |
Description |
Committed |
|
#1
|
3637 |
Tony Smith |
Add RDoc documentation to the sample triggers. |
|
|