Closed coenwouters closed 9 years ago
I guess this pattern is wrong:
private static Pattern URL_PATTERN = Pattern.compile("(.*)/(?:trunk|branches/([^/]+))/?");
The whole branch handling for Pride in SVN is pretty messed up. The expectation is that you supply an URL like ".../trunk" -- that should work. So you could try http://subversion.planon-fm.com/svn/planon-gradle/trunk
That said, this should be fixed, I just don't know how it should work. Ideas are welcome. :)
Actually, the pattern is not "wrong." It is now a requirement that you supply a URL ending either in /trunk
or in /branch/something-something
. That said, the error message could be a little more informative. And again, the whole branch handling for SVN is not really thought through. Maybe we should simply switch off branch tracking in Pride somehow for SVN, just as we don't do the repo caching with SVN.
The structure of our repository for each module is like: http://subversion.planon-fm.com/svn/planon-gradle/"module"/trunk
That is the pattern that is expected by the pride add -T svn "module" command
The "pride list" command uses internally the "svn info" to retrieve information on a module. The information looks like (left out some unrelated stuff):
Path: . Working Copy Root Path: C:\Gradle\ws\nl.planon.ee.hera URL: http://subversion.planon-fm.com/svn/planon-gradle/nl.planon.ee.hera/trunk Repository Root: http://subversion.planon-fm.com/svn/planon-gradle Repository UUID: c05c28a1-a7f4-6d40-a4f4-dd85f20176be Revision: 156 Node Kind: directory Schedule: normal
It seems to parse the Repostory Root property from this list in stead of the URL property
When the pride workspace contains modules from s SubVersion repository, the pride list command gives an IllegalArgumentError: Unable to parse URL. The URL reported in the error message is valid and correct.
Output of pride list -v: FileName set to .prideconfig Base path set to C:\Users\cawout ConfigurationUtils.locate(): base is C:\Users\cawout, name is .prideconfig Could not locate file .prideconfig at C:\Users\cawout: unknown protocol: c Loading configuration from the path C:\Users\cawout.prideconfig Directory C:\Gradle\test contains a pride: true FileName set to config Base path set to C:\Gradle\test.pride ConfigurationUtils.locate(): base is C:\Gradle\test.pride, name is config Could not locate file config at C:\Gradle\test.pride: unknown protocol: c Loading configuration from the path C:\Gradle\test.pride\config Found svn module nl.planon.suite.assembly Filtering modules by: (ALL) AND (ALL) AND (ALL) AND (ALL) Executing in C:\Gradle\test\nl.planon.suite.assembly: svn info Executing in C:\Gradle\test\nl.planon.suite.assembly: svn status Executing in C:\Gradle\test\nl.planon.suite.assembly: svn info ERROR: Exception: java.lang.IllegalArgumentException: Unable to parse URL: http://subversion.planon-fm.com/svn/planon-gradle at com.prezi.pride.vcs.svn.SvnVcsSupport$RepositoryUrl.fromString(SvnVcsSupport.java:161) ~[pride-svn-support-0.10.jar:na] at com.prezi.pride.vcs.svn.SvnVcsSupport.getRepositoryUrlInternal(SvnVcsSupport.java:113) ~[pride-svn-support-0.10.jar:na] at com.prezi.pride.vcs.svn.SvnVcsSupport.getBranch(SvnVcsSupport.java:103) ~[pride-svn-support-0.10.jar:na] at com.prezi.pride.vcs.svn.SvnVcsSupport.getStatus(SvnVcsSupport.java:78) ~[pride-svn-support-0.10.jar:na] at com.prezi.pride.cli.commands.ListCommand$StatusFormatter.formatModule(ListCommand.java:68) ~[pride-0.10.jar:na] at com.prezi.pride.cli.commands.ListCommand.executeInModules(ListCommand.java:35) ~[pride-0.10.jar:na] at com.prezi.pride.cli.commands.AbstractFilteredPrideCommand.executeInPride(AbstractFilteredPrideCommand.java:87) ~[pride-0.10.jar:na] at com.prezi.pride.cli.commands.AbstractPrideCommand.executeWithConfiguration(AbstractPrideCommand.java:10) ~[pride-0.10.jar:na] at com.prezi.pride.cli.commands.AbstractConfiguredCommand.call(AbstractConfiguredCommand.java:30) ~[pride-0.10.jar:na] at com.prezi.pride.cli.commands.AbstractConfiguredCommand.call(AbstractConfiguredCommand.java:11) ~[pride-0.10.jar:na] at com.prezi.pride.cli.PrideCli.execute(PrideCli.java:84) [pride-0.10.jar:na] at com.prezi.pride.cli.PrideCli.main(PrideCli.java:27) [pride-0.10.jar:na]