-
Bug
-
Resolution: Fixed
-
Major
-
None
ProjectSet files support added in the 2.6 version of the CVS plugin parses incorrectly the psf file. The current regular expression has some shortcomings:
- If the name of the server contains dots, (cvs.example.org, 192.168.0.24), the parsing fails.
- If the port is not explicitly set, it also fails, since the colon after the hostname is mandatory, and the expression only acknowledges it before a port (:pserver:host:/cvsroot vs :pserver:host:2401/cvsroot)
- The module remote name does not support nested folders, since it does not allow slashes (:pserver:host:/cvsroot,CORE/com.example.project,com.example.project)
The following expression solves these problems while keeping the groups, so the rest of the code doesn't need changes:
private static final Pattern PSF_PATTERN = Pattern.compile("<project reference=\"[^,]+,((:[a-z]+:)([a-z|A-Z|0-9|\\.]+)" + "(:([0-9]+)?)([/|a-z|A-Z|_|0-9]+)),(/|[A-Z|a-z|0-9|_|\\.]+),([A-Z|a-z|0-9|_|\\.]+)(,(.*?)){0,1}\"/>");