Subversion Repositories DevTools

Rev

Rev 866 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 866 Rev 868
Line 44... Line 44...
44
   */
44
   */
45
  public BuildExclusion(int identifier, int rootIdentifier, String rootCause)
45
  public BuildExclusion(int identifier, int rootIdentifier, String rootCause)
46
  {
46
  {
47
    mLogger.debug("BuildExclusion");
47
    mLogger.debug("BuildExclusion");
48
    mId = identifier;
48
    mId = identifier;
49
    mRootId = rootIdentifier;
49
    mRootId = dealWithNullRootPvId(identifier, rootIdentifier);
50
    mRootCause = rootCause;
50
    mRootCause = rootCause;
51
  }
51
  }
52
 
52
 
53
  /**sets mProcessed true
53
  /**sets mProcessed true
54
   */
54
   */
Line 71... Line 71...
71
   */
71
   */
72
  boolean compare( int identifier, int rootIdentifier, String rootCause)
72
  boolean compare( int identifier, int rootIdentifier, String rootCause)
73
  {
73
  {
74
    mLogger.debug("compare " + mId + ", " + identifier + ", " + rootIdentifier + ", " + rootCause);
74
    mLogger.debug("compare " + mId + ", " + identifier + ", " + rootIdentifier + ", " + rootCause);
75
    boolean retVal = false;
75
    boolean retVal = false;
-
 
76
    rootIdentifier = dealWithNullRootPvId(identifier, rootIdentifier);
76
    
77
    
77
    if ( mRootCause == null )
78
    if ( mRootCause == null )
78
    {
79
    {
79
      if ( mId == identifier && mRootId == rootIdentifier && rootCause == null )
80
      if ( mId == identifier && mRootId == rootIdentifier && rootCause == null )
80
      {
81
      {
Line 87... Line 88...
87
      {
88
      {
88
        retVal = true;
89
        retVal = true;
89
      }
90
      }
90
    }
91
    }
91
    
92
    
92
    mLogger.debug("isProcessed");
93
    mLogger.info("compare returned " + retVal);
93
    return retVal;
94
    return retVal;
94
  }
95
  }
95
  
96
  
96
  /**return true if mId attribute matches
97
  /**return true if mId attribute matches
97
   */
98
   */
Line 246... Line 247...
246
            {
247
            {
247
            }
248
            }
248
          }
249
          }
249
        }
250
        }
250
      }
251
      }
-
 
252
    }
-
 
253
    
-
 
254
    /**
-
 
255
     * hides how a root_pv_id is treated
-
 
256
     * only use root_pv_id if not equal to the pv_id
-
 
257
     * this is to drive a direct build exclusion in the release manager
-
 
258
    */
-
 
259
    private int dealWithNullRootPvId( int pvId, int rootPvId )
-
 
260
    {
-
 
261
      int retVal = rootPvId;
-
 
262
      
-
 
263
      if ( pvId == rootPvId )
-
 
264
      {
-
 
265
        // force a null root_pv_id in the database
-
 
266
        retVal = -1;
-
 
267
      }
251
      
268
      
-
 
269
      return retVal;
252
    }
270
    }
253
}
271
}