Hi,

I am working on $subject.Three methods below

   1.

   checkout(int tenantId, String filePath, int depth)

   2.

   update(int tenantId, String rootPath, String filePathToUpdate, int depth)

   3.

   checkout(int tenantId, String filePath)


 in [1] uses the code,

filesUpdated = svnClient.update(root, SVNRevision.HEAD,Depth.infinity,
NO_SET_DEPTH,ignoreExternals, forceUpdate);

svnClient.update(..) returns revision number but assigned to filesUpdated.
The method return value is set to

filesUpdated >1

which is incorrect. According to javadocs[2], methods should return true if
files were checked out or updates, false otherwise. If files were changed,
it can be detected comparing revision numbers. Therefore the return value
would be,

         long lastRevisionNumber =
svnClient.getInfo(root).getLastChangedRevision();
     long newRevisionNumber = svnClient.update(root,
SVNRevision.HEAD,Depth.infinity, NO_SET_DEPTH,ignoreExternals, forceUpdate);

     return newRevisionNumber>lastRevisionNumber;

This gives different values for newRevisionNumberLog and lastRevisionNumber,
when I debug with a worker node, but gave same value for both variables for
manager node. What could be the issue here?. Log messages should also
updated accordingly. Is there any other issue to consider?

[1]
https://github.com/wso2-dev/carbon-commons/blob/master/components/deployment-synchronizer/org.wso2.carbon.deployment.synchronizer.subversion/src/main/java/org/wso2/carbon/deployment/synchronizer/subversion/SVNBasedArtifactRepository.java

[2]
https://svn.wso2.org/repos/wso2/carbon/platform/trunk/components/deployment-synchronizer/org.wso2.carbon.deployment.synchronizer/src/main/java/org/wso2/carbon/deployment/synchronizer/ArtifactRepository.java

Thanks,
Nipuni
-- 
Nipuni Perera
Software Engineer; WSO2 Inc.; http://wso2.com
Email: [email protected]
Git hub profile: https://github.com/nipuni
Mobile: +94 (71) 5626680
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to