Ah phooey. Okay.Project name is regex'ed out of the svn URL.
How do you think I think svn behaves when I move files At this point my question was strictly mafia, no svn. I had always been under the impression that you had to explicitly state the location of an imported script, so I had never really thought about it.I don't think svn behaves like you think it does when you move local files, for one. But to answer your question, the same thing that's always happened. It uses the first one that it finds.
It's in my opinion a bug that we allow a name to be defined twice in the same namespace. I would prefer that we throw a runtime exception there.
The regex is posted here. It's actually the - in the first part that made it not match.
private static Pattern SOURCEFORGE_PATTERN = Pattern.compile( "/p/([^/]+)/code(.*)", Pattern.DOTALL );
I propose that if there is anything after "/code/" then that should be the project name, otherwise use the part before "/code". What should that more complicated regexp look like?
I propose that if there is anything after "/code/" then that should be the project name, otherwise use the part before "/code". What should that more complicated regexp look like?
While were at it, any chance we could get some love for google code users?
Note that giving me a regex is preferable to making me do the work and having your regex malformed anyway
private static Pattern GOOGLECODE_PATTERN = Pattern.compile( "http://([^.]+)\.googlecode\.com/svn/trunk/([^/]*)", Pattern.DOTALL );
You could make it a tab in preferences for now since for me it is a higher priority than a GUI for the SVN. This is a prerequisite for me (and perhaps Winterbay) befire BatBrain, etc all start updating with svn.
Ditto what Bale said: use group 1 if group 2 is empty. Otherwise use group 2 or possibly some conjunction of the two.Code:private static Pattern GOOGLECODE_PATTERN = Pattern.compile( "http://([^.]+)\.googlecode\.com/svn/trunk/([^/]*)", Pattern.DOTALL );
Is /trunk/ obligatory? Or just recommended, as with sourceforge?
Also, we can't just take the first subdirectory after trunk/, we have to take them all. Group 2 has to be (.*)
Just so everyone's expectations are clear, I internally classify this as a Request For Enhancement - Cosmetic and prioritize it thusly. Cosmetic improvements take a back seat to bug fixes and feature requests dealing with the API.
I realize that some people love their scripts menu very dearly and seeing it sullied is a deal breaker. I am sorry that your inner OCD demons compel you so. I counsel you to remain patient and wait for the API to be fully implemented because I won't be looking at the scripts menu prior to that.
I feel little incentive to use svn for all my scripts, but it works so terribly well for ChIT that I don't know how I lived without it.
Updating /p/mafiachit/code
Validating repo...
Something went wrong while fetching svn directory info
D:\Dropbox\kolmafia\svn\mafiachit
AU https://svn.code.sf.net/p/mafiachit/code/images/chit/effects.png
AU https://svn.code.sf.net/p/mafiachit/code/images/chit/tracker.png
https://svn.code.sf.net/p/mafiachit/code/images/chit
https://svn.code.sf.net/p/mafiachit/code/images
U https://svn.code.sf.net/p/mafiachit/code/data/chit_effects.txt
https://svn.code.sf.net/p/mafiachit/code/data
U https://svn.code.sf.net/p/mafiachit/code/relay/chit.js
U https://svn.code.sf.net/p/mafiachit/code/relay/charpane.ash
U https://svn.code.sf.net/p/mafiachit/code/relay/chit.css
https://svn.code.sf.net/p/mafiachit/code/relay
https://svn.code.sf.net/p/mafiachit/code
At revision 16
Something went wrong fetching SVN info
Something went wrong fetching SVN info
Something went wrong fetching SVN info
Pushing local updates...
chit.css => D:\Dropbox\kolmafia\relay\chit.css
charpane.ash => D:\Dropbox\kolmafia\relay\charpane.ash
chit.js => D:\Dropbox\kolmafia\relay\chit.js
chit_effects.txt => D:\Dropbox\kolmafia\data\chit_effects.txt
tracker.png => D:\Dropbox\kolmafia\images\chit\tracker.png
effects.png => D:\Dropbox\kolmafia\images\chit\effects.png
Done.
Are you under that impression? Because no.
My proxy settings just in case:
http
host: 172.16.34.70
port: 3128
all other fields are empty
Updating /p/mafiachit/code
Validating repo...
svn: E175002: connection refused by the server
Something went wrong while fetching svn directory info
D:\Dropbox\kolmafia\svn\mafiachit
At revision 16
Done.
Updating /p/towerchecker/code
Validating repo...
svn: E175002: connection refused by the server
Something went wrong while fetching svn directory info
D:\Dropbox\kolmafia\svn\towerchecker
At revision 2
Done.
12161: no debug log, but "svn update" stopped working.
Just so everyone's expectations are clear, I internally classify this as a Request For Enhancement - Cosmetic and prioritize it thusly. Cosmetic improvements take a back seat to bug fixes and feature requests dealing with the API.
It didn't stop working, it was just at the latest revision. That's how svn update works.
Updating /p/mafiachit/code
Validating repo...
Repo validated.
d:\Dropbox\kolmafia\svn\mafiachit
At revision 16
Done.