M000014.html #1

  • //
  • guest/
  • tony_smith/
  • perforce/
  • P4Rubylib/
  • triggers/
  • doc/
  • classes/
  • CaseTrigger.src/
  • M000014.html
  • View
  • Commits
  • Open Download .zip Download (1 KB)
<!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>mismatch_exists (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 85</span>
    <span class="kw">def</span> mismatch_exists( path )
        path = path[ 2..-1 ]   <span class="cmt"># Strip off leading //</span>
        dirs = path.split( <span class="str">&quot;/&quot;</span> )
        depot = dirs.shift
        file  = dirs.pop

        <span class="cmt"># Now look for mis-matching depots</span>
        <span class="kw">return</span> <span class="kw">true</span> <span class="kw">if</span> mismatch_depot( depot )

        <span class="cmt"># Now look for mis-matching directories</span>
        <span class="kw">return</span> <span class="kw">true</span> <span class="kw">if</span> mismatch_dirs( depot, dirs )

        <span class="kw">return</span> <span class="kw">false</span>
    <span class="kw">end</span></pre>
</body>
</html>
# Change User Description Committed
#1 3637 Tony Smith Add RDoc documentation to the sample triggers.