Subversion Repositories DevTools

Rev

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

Rev 896 Rev 902
Line 186... Line 186...
186
  public boolean mRequiresSourceControlInteraction = true;
186
  public boolean mRequiresSourceControlInteraction = true;
187
 
187
 
188
  /**constructor
188
  /**constructor
189
   */
189
   */
190
  Package(int pv_id, String pkg_name, String v_ext, String alias, 
190
  Package(int pv_id, String pkg_name, String v_ext, String alias, 
191
          String pkg_label, String src_path, char change_type)
191
          String pkg_label, String src_path, char change_type, char ripple_field)
192
  {
192
  {
193
    mLogger.debug("Package 1: pv_id " + pv_id + " pkg_name " + pkg_name + " v_ext " + v_ext + " alias " + alias + " pkg_label " + pkg_label + " src_path " + src_path + " change_type " + change_type);
193
    mLogger.debug("Package 1: pv_id " + pv_id + " pkg_name " + pkg_name + " v_ext " + v_ext + " alias " + alias + " pkg_label " + pkg_label + " src_path " + src_path + " change_type " + change_type);
194
    mId = pv_id;
194
    mId = pv_id;
195
    mName = pkg_name;
195
    mName = pkg_name;
196
    mVersion = "0.0.0000";
196
    mVersion = "0.0.0000";
Line 199... Line 199...
199
    mLabel = pkg_label;
199
    mLabel = pkg_label;
200
    mLocation = src_path;
200
    mLocation = src_path;
201
    
201
    
202
    if (change_type == 'M')
202
    if (change_type == 'M')
203
    {
203
    {
-
 
204
      // a ripple_field of 'L' indicates this package has limited version numbering
204
      mChangeType.setMajor();
205
      mChangeType.setMajor(ripple_field == 'L' ? true : false);
205
    }
206
    }
206
    else if (change_type == 'N')
207
    else if (change_type == 'N')
207
    {
208
    {
208
      mChangeType.setMinor();
209
      mChangeType.setMinor(ripple_field == 'L' ? true : false);
209
    }
210
    }
210
    else
211
    else
211
    {
212
    {
212
      mChangeType.setPatch();
213
      mChangeType.setPatch(ripple_field == 'L' ? true : false);
213
    }
214
    }
214
  }
215
  }
215
 
216
 
216
  /**constructor
217
  /**constructor
217
   */
218
   */
Line 585... Line 586...
585
   */
586
   */
586
  private boolean incrementFieldsAccordingToLimits(int field, MutableInt major, MutableInt minor, MutableInt patch)
587
  private boolean incrementFieldsAccordingToLimits(int field, MutableInt major, MutableInt minor, MutableInt patch)
587
  {
588
  {
588
    boolean retVal = true;
589
    boolean retVal = true;
589
    
590
    
590
    if (!mRippleField.mLimit)
591
    if (!mChangeType.mLimit && !mRippleField.mLimit)
591
    {
592
    {
592
      // simple case
593
      // simple case
593
      // no need to take field limits into consideration
594
      // no need to take field limits into consideration
594
      switch (field)
595
      switch (field)
595
      {
596
      {
Line 932... Line 933...
932
     * @attribute
933
     * @attribute
933
     */
934
     */
934
    private boolean mBuild = true;
935
    private boolean mBuild = true;
935
 
936
 
936
    /**in terms of the mChangeType Package field,
937
    /**in terms of the mChangeType Package field,
937
     * always false, does not apply
938
     * when true indicates the major, minor, and patch number will be incremented according to field limits
938
     * in terms of the mRippleField Package field,
939
     * in terms of the mRippleField Package field,
939
     * when true indicates the major, minor, patch and build number will be incremented according to field limits
940
     * when true indicates the major, minor, patch and build number will be incremented according to field limits
940
     * @attribute
941
     * @attribute
941
     */
942
     */
942
    private boolean mLimit = false;
943
    private boolean mLimit = false;
Line 970... Line 971...
970
      mMinor = false;
971
      mMinor = false;
971
      mPatch = false;
972
      mPatch = false;
972
      mLimit = false;
973
      mLimit = false;
973
    }
974
    }
974
 
975
 
-
 
976
    /**sets mBuild false, mMajor true, mMinor false, mPatch false, mLimit limit
-
 
977
     */
-
 
978
    void setMajor( boolean limit )
-
 
979
    {
-
 
980
      mLogger.debug("setMajor " + limit);
-
 
981
      mBuild = false;
-
 
982
      mMajor = true;
-
 
983
      mMinor = false;
-
 
984
      mPatch = false;
-
 
985
      mLimit = limit;
-
 
986
    }
-
 
987
 
975
    /**sets mBuild false, mMajor false, mMinor true, mPatch false, mLimit false
988
    /**sets mBuild false, mMajor false, mMinor true, mPatch false, mLimit false
976
     */
989
     */
977
    void setMinor()
990
    void setMinor()
978
    {
991
    {
979
      mLogger.debug("setMinor");
992
      mLogger.debug("setMinor");
Line 982... Line 995...
982
      mMinor = true;
995
      mMinor = true;
983
      mPatch = false;
996
      mPatch = false;
984
      mLimit = false;
997
      mLimit = false;
985
    }
998
    }
986
 
999
 
-
 
1000
    /**sets mBuild false, mMajor false, mMinor true, mPatch false, mLimit limit
-
 
1001
     */
-
 
1002
    void setMinor( boolean limit )
-
 
1003
    {
-
 
1004
      mLogger.debug("setMinor " + limit);
-
 
1005
      mBuild = false;
-
 
1006
      mMajor = false;
-
 
1007
      mMinor = true;
-
 
1008
      mPatch = false;
-
 
1009
      mLimit = limit;
-
 
1010
    }
-
 
1011
 
987
    /**sets mBuild false, mMajor false, mMinor false, mPatch true, mLimit false
1012
    /**sets mBuild false, mMajor false, mMinor false, mPatch true, mLimit false
988
     */
1013
     */
989
    void setPatch()
1014
    void setPatch()
990
    {
1015
    {
991
      mLogger.debug("setPatch");
1016
      mLogger.debug("setPatch");
Line 994... Line 1019...
994
      mMinor = false;
1019
      mMinor = false;
995
      mPatch = true;
1020
      mPatch = true;
996
      mLimit = false;
1021
      mLimit = false;
997
    }
1022
    }
998
 
1023
 
-
 
1024
    /**sets mBuild false, mMajor false, mMinor false, mPatch true, mLimit limit
-
 
1025
     */
-
 
1026
    void setPatch( boolean limit )
-
 
1027
    {
-
 
1028
      mLogger.debug("setPatch");
-
 
1029
      mBuild = false;
-
 
1030
      mMajor = false;
-
 
1031
      mMinor = false;
-
 
1032
      mPatch = true;
-
 
1033
      mLimit = limit;
-
 
1034
    }
-
 
1035
 
999
    /**sets mBuild false, mMajor false, mMinor false, mPatch false, mLimit true
1036
    /**sets mBuild false, mMajor false, mMinor false, mPatch false, mLimit true
1000
     */
1037
     */
1001
    void setLimit()
1038
    void setLimit()
1002
    {
1039
    {
1003
      mLogger.debug("setPatch");
1040
      mLogger.debug("setPatch");