i can't checkout cardsfolder (SVN troubles)
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
32 posts
• Page 2 of 3 • 1, 2, 3
Re: i can't checkout cardsfolder (SVN troubles)
by Braids » 29 Jun 2011, 03:04
i sincerely doubt it. svn can be used for all sorts of files, text, binary, etc.slapshot5 wrote:could this be because Wall of Hope doesn't have a newline character at the end of it?
unfortunately, appearances are deceiving. running <<svn status>> shows that the cardsfolder directory is locked. if i kill the svn checkout, the locks are left in a bad state. i haven't been able to clean up lock files with much success.slapshot5 wrote:Seems like it's got all the files though, right?
"That is the dumbest thing I've ever seen." --Rob Cashwalker, regarding Innistrad double-sided cards. One of the first times he and I have ever agreed on something. 

-
Braids - Programmer
- Posts: 556
- Joined: 22 Jun 2011, 00:39
- Location: Unknown. Hobby: Driving myself and others to constructive madness.
- Has thanked: 1 time
- Been thanked: 1 time
Re: i can't checkout cardsfolder (SVN troubles)
by Rob Cashwalker » 29 Jun 2011, 14:22
I was able to update the cardsfolder last night at home, but now I can't on my work pc...
edit - I let it sit there and went on to something else.. it eventually updated, and claimed it only took 0:1:30 to complete...
edit - I let it sit there and went on to something else.. it eventually updated, and claimed it only took 0:1:30 to complete...
The Force will be with you, Always.
-
Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
Re: i can't checkout cardsfolder (SVN troubles)
by silly freak » 29 Jun 2011, 16:36
I used this procedure:
http://glob.bushi.net.nz/glob/2007/02/1 ... orkaround/
when I once had a checkout problem in another project. It should help at least for the locks, I think. in a nutshell, checkout only the desired dir plus its parent into an empty directory, and then copy the contents, including the .svn dir into your real working copy.
What made the checkout not work in the first place, I don't know, but maybe the problem has to do with your working copy...
http://glob.bushi.net.nz/glob/2007/02/1 ... orkaround/
when I once had a checkout problem in another project. It should help at least for the locks, I think. in a nutshell, checkout only the desired dir plus its parent into an empty directory, and then copy the contents, including the .svn dir into your real working copy.
What made the checkout not work in the first place, I don't know, but maybe the problem has to do with your working copy...
___
where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
- silly freak
- DEVELOPER
- Posts: 598
- Joined: 26 Mar 2009, 07:18
- Location: Vienna, Austria
- Has thanked: 93 times
- Been thanked: 25 times
Re: i can't checkout cardsfolder (SVN troubles)
by Braids » 29 Jun 2011, 18:38
i have already reduced the problem to a single folder, res/cardsfolder and its contents. i and others have had problems checking out this simple case.silly freak wrote:in a nutshell, checkout only the desired dir plus its parent into an empty directory . . .
i find that exceedingly unlikely. if the problem description has no preexisting working copy, then the problem itself cannot lie in something that does not exist.silly freak wrote:What made the checkout not work in the first place, I don't know, but maybe the problem has to do with your working copy...
i believe the problem is the large number of files that cardsfolder contains. it is unusual to have a single directory with so many files. i think svn gets overwhelmed or times out, because it has to lock the parent directory until it has locked and unlocked all of its children.
i would like to experiment with changing the structure of cardsfolder.
we could organize it by using subdirectories for the first two characters in the cards' names. for example,
res/cardsfolder/a/f/affa_guard_hound.txt
res/cardsfolder/a/f/afflict.txt
res/cardsfolder/a/f/afterlife.txt
res/cardsfolder/a/f/aftershock.txt
i am comfortable modifying ReadCard.java so that it loads the cards from the proper places. (i know the last time i touched ReadCard was a fiasco, but this would be a smaller change.)
i can write a shell script to automatically move cards into these subdirectories from res/cardsfolder. this script would be executable under Linux, MacOS, and Cygwin.
would this affect existing tools too much? i see a couple of Python scripts. i love how it highlights Python.
Last edited by Braids on 30 Jun 2011, 04:41, edited 1 time in total.
"That is the dumbest thing I've ever seen." --Rob Cashwalker, regarding Innistrad double-sided cards. One of the first times he and I have ever agreed on something. 

-
Braids - Programmer
- Posts: 556
- Joined: 22 Jun 2011, 00:39
- Location: Unknown. Hobby: Driving myself and others to constructive madness.
- Has thanked: 1 time
- Been thanked: 1 time
Re: i can't checkout cardsfolder (SVN troubles)
by Rob Cashwalker » 29 Jun 2011, 18:47
The ReadCard code should only need a slight modification to wrap the existing card iteration code with a folder iteration. Unless someone's already changed it, there's likely more "for-get(i)" stuff that would be better converted to for-each, while you're in there....
Notice ReadCard doesn't care at all what the filename is, and therefore should not care about the folder either. It's just for human comfort of finding what you're looking for.
edit- thinking about it, just go with the first letter... We never had any issues until recently, so we know a single folder is good for at least a few thousand files.
Oh, and friarsol's the python-head around here.... It's neat stuff and can parse webpages like there's no tomorrow... but those scripts were the only reason I would've ever considered installing it on my system.
Notice ReadCard doesn't care at all what the filename is, and therefore should not care about the folder either. It's just for human comfort of finding what you're looking for.
edit- thinking about it, just go with the first letter... We never had any issues until recently, so we know a single folder is good for at least a few thousand files.
Oh, and friarsol's the python-head around here.... It's neat stuff and can parse webpages like there's no tomorrow... but those scripts were the only reason I would've ever considered installing it on my system.
The Force will be with you, Always.
-
Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
Re: i can't checkout cardsfolder (SVN troubles)
by Braids » 29 Jun 2011, 19:17
bundling changes? Rob, "I'm shocked, shocked to find that gambling is going on in here!"Rob Cashwalker wrote:The ReadCard code should only need a slight modification to wrap the existing card iteration code with a folder iteration. Unless someone's already changed it, there's likely more "for-get(i)" stuff that would be better converted to for-each, while you're in there....


seriously, i'll clean the code up first, commit, and then change it. i have to do something while my script runs.
ok, 26 folders it is. i'm updating my working copy of the trunk now.Rob Cashwalker wrote:edit- thinking about it, just go with the first letter... We never had any issues until recently, so we know a single folder is good for at least a few thousand files.
Python is an interesting language, but i am a static typing kind of girl. i find its postmodernism unsettling. C++'s upcoming "auto" keyword looks neat. way off topic.Rob Cashwalker wrote:Oh, and friarsol's the python-head around here.... It's neat stuff and can parse webpages like there's no tomorrow... but those scripts were the only reason I would've ever considered installing it on my system.
"That is the dumbest thing I've ever seen." --Rob Cashwalker, regarding Innistrad double-sided cards. One of the first times he and I have ever agreed on something. 

-
Braids - Programmer
- Posts: 556
- Joined: 22 Jun 2011, 00:39
- Location: Unknown. Hobby: Driving myself and others to constructive madness.
- Has thanked: 1 time
- Been thanked: 1 time
Re: i can't checkout cardsfolder (SVN troubles)
by Rob Cashwalker » 29 Jun 2011, 20:20
... and way over my head...Python is an interesting language, but i am a static typing kind of girl. i find its postmodernism unsettling. C++'s upcoming "auto" keyword looks neat. way off topic.
I'm a VB-kinda-guy.
The Force will be with you, Always.
-
Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
Re: i can't checkout cardsfolder (SVN troubles)
by Braids » 29 Jun 2011, 20:25
i think in upcoming versions of C++, one can use the first form instead of the second:
- Code: Select all
auto var = new ReallyLongClassName();
ReallyLongClassName var = new ReallyLongClassName();
"That is the dumbest thing I've ever seen." --Rob Cashwalker, regarding Innistrad double-sided cards. One of the first times he and I have ever agreed on something. 

-
Braids - Programmer
- Posts: 556
- Joined: 22 Jun 2011, 00:39
- Location: Unknown. Hobby: Driving myself and others to constructive madness.
- Has thanked: 1 time
- Been thanked: 1 time
Re: i can't checkout cardsfolder (SVN troubles)
by friarsol » 30 Jun 2011, 00:39
Python-head? I'm probably more of a Monty Python head than a Python Language head. But it is a handy tool, to be able to script things. The three py scripts that live in the /res/ folder would all need some altering if there is going to be a cardsfolder structure change.
They can probably be changed to some sort of routine to just grab all files that don't start with '.' and end in '.txt' in a directory (and all subdirectories), so in the future if more structure changes occur the files won't need to.
They can probably be changed to some sort of routine to just grab all files that don't start with '.' and end in '.txt' in a directory (and all subdirectories), so in the future if more structure changes occur the files won't need to.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Python-head Re: i can't checkout cardsfolder (SVN troubles)
by Braids » 30 Jun 2011, 03:32
Sol, can you go ahead and update the Python scripts? i'm about to check in the changes to ReadCard and to res/cardsfolder.
"That is the dumbest thing I've ever seen." --Rob Cashwalker, regarding Innistrad double-sided cards. One of the first times he and I have ever agreed on something. 

-
Braids - Programmer
- Posts: 556
- Joined: 22 Jun 2011, 00:39
- Location: Unknown. Hobby: Driving myself and others to constructive madness.
- Has thanked: 1 time
- Been thanked: 1 time
Re: Python-head Re: i can't checkout cardsfolder (SVN troubl
by friarsol » 01 Jul 2011, 00:41
I'll try to make the changes tonight at some point. The three scripts all work slightly differently when dealing with files, so I'll have to actually test them separately.Braids wrote:Sol, can you go ahead and update the Python scripts? i'm about to check in the changes to ReadCard and to res/cardsfolder.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: i can't checkout cardsfolder (SVN troubles)
by Braids » 01 Jul 2011, 01:15
i didn't find anything using get(i), but there was some iteration over a large array. i updated that to not only use for-each, but also replaced the large array with a generator. this was all made possible by theRob Cashwalker wrote:there's likely more "for-get(i)" stuff that would be better converted to for-each, while you're in there....
edit: fixed typos as shown.
Last edited by Braids on 02 Jul 2011, 00:50, edited 2 times in total.
"That is the dumbest thing I've ever seen." --Rob Cashwalker, regarding Innistrad double-sided cards. One of the first times he and I have ever agreed on something. 

-
Braids - Programmer
- Posts: 556
- Joined: 22 Jun 2011, 00:39
- Location: Unknown. Hobby: Driving myself and others to constructive madness.
- Has thanked: 1 time
- Been thanked: 1 time
Re: i can't checkout cardsfolder (SVN troubles)
by Rob Cashwalker » 01 Jul 2011, 17:19
See, there you go again... waaayy over my head. Though I'm not too sure we should keep adding more library requirements...
The Force will be with you, Always.
-
Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
Re: i can't checkout cardsfolder (SVN troubles)
by jendave » 01 Jul 2011, 18:58
It is true that the "yield" mechanism makes certain iteration functions much easier. My only concern is that the java-yield jar appears to be relatively unsupported. For the maven build, I added it to my repo (http://arcane.googlecode.com/svn/trunk/repository/) so the builds go smoothly.Braids wrote:i didn't find anything using get(i), but there was some iteration over a large array. i updated that to not only use for-each, but also replaced the large array with a generator. this was all made possible by the python-yield library. without it, we would have to write methods that return iterators instead of collections. without the concept of yielding, this is very difficult for all but the simplest of operations.Rob Cashwalker wrote:there's likely more "for-get(i)" stuff that would be better converted to for-each, while you're in there....
python-yield provides a mechanism for converting generators to iterators, so they can then be used with foreach.
If anyone adds a dep, please post a note to the forum so I can add it to the Maven build.
Thanks
Dave
Edit - I tried a dryRun of the release process and there is an issue with the jyield jar. since it is a "SNAPSHOT", Maven does not want to use it as part of release. There is a workaround, but it required more attention during the release build.
Chris H. - the release process will ask to "resolve SNAPSHOT dependencies (yes/no) :no" Note that it will default to "no" and then the build will fail. You will need to enter "yes" manually at this point. I will investigate to see if I can use a flag to skip that question.
Re: i can't checkout cardsfolder (SVN troubles)
by Braids » 01 Jul 2011, 19:46
I can re-jar it if you want 

"That is the dumbest thing I've ever seen." --Rob Cashwalker, regarding Innistrad double-sided cards. One of the first times he and I have ever agreed on something. 

-
Braids - Programmer
- Posts: 556
- Joined: 22 Jun 2011, 00:39
- Location: Unknown. Hobby: Driving myself and others to constructive madness.
- Has thanked: 1 time
- Been thanked: 1 time
32 posts
• Page 2 of 3 • 1, 2, 3
Who is online
Users browsing this forum: No registered users and 90 guests