You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by pn...@apache.org on 2004/01/20 12:46:18 UTC

cvs commit: jakarta-slide/src/webdav/server/org/apache/slide/webdav/util VersioningHelper.java PropertyHelper.java

pnever      2004/01/20 03:46:18

  Modified:    src/webdav/server/org/apache/slide/webdav/util
                        VersioningHelper.java PropertyHelper.java
  Log:
  Fixed bug with CHECKIN_keep-checked-out in the deltav area.
  
  Revision  Changes    Path
  1.95      +9 -5      jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/VersioningHelper.java
  
  Index: VersioningHelper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/VersioningHelper.java,v
  retrieving revision 1.94
  retrieving revision 1.95
  diff -u -r1.94 -r1.95
  --- VersioningHelper.java	1 Dec 2003 12:10:50 -0000	1.94
  +++ VersioningHelper.java	20 Jan 2004 11:46:15 -0000	1.95
  @@ -1207,12 +1207,14 @@
               }
               content.store(sToken, vhrNrds.getUri(), vrNrdOld, null);
               
  +            // check preconditions
               ViolatedPrecondition violatedPrecondition =
                   getCheckinPreconditionViolation( predSetProp, vhrNrds, forkOk, autoUpdNrd );
               if (violatedPrecondition != null) {
                   throw new PreconditionViolationException(violatedPrecondition, rUri);
               }
               
  +            // check forking
               String forkBranch = getForkBranch(predSetProp, vhrNrds, forkOk);
               NodeRevisionDescriptor vrNrdNew = null;
               if (forkBranch != null) {
  @@ -1275,7 +1277,9 @@
                   rNrd.setProperty(
                       new NodeProperty(P_CHECKED_OUT, pHelp.createHrefValue(vrUriNew)) );
                   rNrd.setProperty(
  -                    new NodeProperty(P_PREDECESSOR_SET, vrNrdNew.getProperty(P_PREDECESSOR_SET).getValue()) );
  +                    new NodeProperty(P_PREDECESSOR_SET, "") );
  +                PropertyHelper.addHrefToProperty(rNrd, P_PREDECESSOR_SET, vrUriNew);
  +                PropertyHelper.addHrefToProperty(vrNrdNew, P_CHECKOUT_SET, rUri);
               }
               else {
                   if( !isWorkingResource ) {
  @@ -1304,7 +1308,7 @@
                   new NodeProperty(P_VERSION_NAME, vrUhNew.getVersionName()) );
               vrNrdNew.setProperty(
                   new NodeProperty(P_PREDECESSOR_SET, predSetProp.getValue()) );
  -            
  +
               // Store changes
               if( keepCheckedOut || !isWorkingResource ) {
                   content.store( sToken, rUri, rNrd, null ); //revisionContent=null
  
  
  
  1.63      +9 -3      jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/PropertyHelper.java
  
  Index: PropertyHelper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/PropertyHelper.java,v
  retrieving revision 1.62
  retrieving revision 1.63
  diff -u -r1.62 -r1.63
  --- PropertyHelper.java	17 Jan 2004 21:48:00 -0000	1.62
  +++ PropertyHelper.java	20 Jan 2004 11:46:15 -0000	1.63
  @@ -388,6 +388,12 @@
                   }
               }
           }
  +        else if( P_PREDECESSOR_SET.equals(propName) ) {
  +            result = "";
  +        }
  +        else if( P_SUCCESSOR_SET.equals(propName) ) {
  +            result = "";
  +        }
           return result;
       }
       
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org