Page 4 of 6

Re: SVN

PostPosted: 24 Oct 2009, 21:29
by silly freak
the current situation is that:
Code: Select all
svn/
  branches/
  src/
    .settings/
    src/           <-- code
    res/
  tags/
  trunk/
    MTGForgeNew/   <-- code
    workspace/
      CardForge/   <-- code
  wiki/
i have imported the svn/src/ folder into my project, which means that my local copy directly contains .settings/, src/ and res/

i think everything but the svn/src/ directory isn't needed. that means we could move src, res and .settings up, and importing is easy again. you know, I just didn't want to import from svn/ down because of the two obsolete sources

i hope there are no misunderstandings anymore, could we do it that way?

Re: SVN

PostPosted: 24 Oct 2009, 21:54
by DennisBergkamp
Ah yes, I agree with this. However, I'm not sure how to remove trunk/MTGForgeNew and trunk/CardForge, and I will probably change this to:

Code: Select all
svn/
  branches/
  src/ <--- code
    .settings/
    src/ 
    res/
  tags/
  trunk/
    MTGForgeNew/   <-- code
    workspace/
      CardForge/   <-- code
  wiki/
"src/src" is not necessary.

Re: SVN

PostPosted: 24 Oct 2009, 22:53
by silly freak
more like...
Code: Select all
svn/
  branches/
  .settings/
  res/
  src/ <--- code
  tags/
  trunk/
    MTGForgeNew/   <-- code
    workspace/
      CardForge/   <-- code
  wiki/
...that, i think.
your structure had the 2nd src folder still in, but moved the code to the 1st. that would mean that src is a package in forge. (edit: just saw that line after the code block. ignore the previous paragraph)
and additionally, .settings/ and res/ shouldn't be inside src.

for removing a folder, simply remove it in your local copy and commit that change. i'd like you to do that, so i don't have to check out trunk/ just for that.

Re: SVN

PostPosted: 24 Oct 2009, 23:31
by DennisBergkamp
Ahh, I see... alright I will just keep it the same then :)

Re: SVN

PostPosted: 26 Oct 2009, 15:54
by DennisBergkamp
Ok, this is where the fun starts.
Both Silly Freak and Zerker have made changes to the SVN. Now hopefully I won't mess things up with my changes #-o

Re: SVN

PostPosted: 26 Oct 2009, 16:13
by DennisBergkamp
Ok I think the source update went alright. However, when I try to commit my cards.txt and card-pictures.txt I get the following error:

RA layer request failed
svn: Commit failed (details follow):
svn: MKCOL of '/svn/!svn/wrk/4349e0cd-9345-4f42-b023-4eeab2d05163/src/res': 405 Method Not Allowed (https://cardforge.googlecode.com)

And when I want to type in notes in Eclipse during the commit (to show what changes have been made exactly), I always end up hitting enter, and instead of going to the next line in the notes field it actually does the commit :oops:

Also, hopefully I didn't overwrite any changes made by you guys, but I think updates were made to a different set of files.

Re: SVN

PostPosted: 26 Oct 2009, 16:48
by silly freak
there is a team synchronizing perspective (i guess you have found that, in window/open perspective/other...). before you do a commit, you should use the "synchronize SVN" command, which has the same symbol as the perspective.
in the status bar, it shows you what changes were made by you and others, and if there are conflicting updates. it should be pretty save when doing that way

as for typing comments, that behavior seems to depend on the platform. I try to press enter to commit, but then i just get a new line... i guess i have got the better alternative.

as for the error, i have no idea...

Re: SVN

PostPosted: 26 Oct 2009, 18:59
by DennisBergkamp
Ah yes, I went through the Synchronize with repository step, and checked all differences... all looked good :)
Still not sure why the error occurs though when committing cards.txt and card-pictures.txt #-o

Re: SVN

PostPosted: 27 Oct 2009, 03:38
by DennisBergkamp
Silly Freak,

I'm getting some funky error when running GUI_NewGame in the latest version:

Code: Select all
Error handling registered!
java.lang.ArrayStoreException
   at java.lang.System.arraycopy(Native Method)
   at java.util.ArrayList.toArray(Unknown Source)
   at forge.DeckIO.getDecks(DeckIO.java:147)
   at forge.Gui_NewGame.getDecks(Gui_NewGame.java:197)
   at forge.Gui_NewGame.<init>(Gui_NewGame.java:127)
   at forge.Gui_NewGame.main(Gui_NewGame.java:118)
This is the output, not sure what's going on.

Re: SVN

PostPosted: 27 Oct 2009, 04:42
by zerker2000
DennisBergkamp wrote:Ok I think the source update went alright. However, when I try to commit my cards.txt and card-pictures.txt I get the following error:
I think I got something similar, I ended up clearing the file, updating it, and then doing first a history compare and then a svn submission, worked fine. Also, in the deck editor, one of the new arcane spells has a box in its type line and a comma-looking character in cards.txt, I haven't been able to get rid of that :(.
silly freak wrote:as for typing comments, that behavior seems to depend on the platform. I try to press enter to commit, but then i just get a new line... i guess i have got the better alternative.
Morale: either select a previous response or type your new one in a text editor. To commit, use the Big Friendly Button(it's there for that reason :)). What happens if you debug with a breakpoint at DeckIO.java:147?

Re: SVN

PostPosted: 27 Oct 2009, 12:21
by silly freak
DennisBergkamp wrote:Silly Freak,

I'm getting some funky error when running GUI_NewGame in the latest version:

Code: Select all
Error handling registered!
java.lang.ArrayStoreException
   at java.lang.System.arraycopy(Native Method)
   at java.util.ArrayList.toArray(Unknown Source)
   at forge.DeckIO.getDecks(DeckIO.java:147)
   at forge.Gui_NewGame.getDecks(Gui_NewGame.java:197)
   at forge.Gui_NewGame.<init>(Gui_NewGame.java:127)
   at forge.Gui_NewGame.main(Gui_NewGame.java:118)
This is the output, not sure what's going on.
i don't get this error, sorry. try to debug with a breakpoint at DeckIO:147 and check the variables in Debug perspective. don't forget to check "Show Qualified Names".
What I expect is that your deckList contains Deck objects instead of forge.Deck
as for the reason, if we really have the same version, i have no clue. check the default package to make sure the Deck class is my version:
Code: Select all
import java.io.ObjectStreamException;
import java.io.Serializable;
import java.util.ArrayList;


/**
 * Deck.java
 *
 * Created on 26.10.2009
 */


/**
 * The class Deck. This class is only here for compatibility with forge versions 10/17 and older. When it is read
 * from the file stream, the object is replaced with an object of type {@link Deck} using {@link #readResolve()}.
 *
 * @author Clemens Koza
 */
public class Deck implements Serializable {
    private static final long serialVersionUID = -2188987217361601903L;
   
    private String            deckType;
   
    private boolean           isRegular;
    private boolean           isSealed;
    private boolean           isDraft;
   
    private ArrayList<String> main             = new ArrayList<String>();
    private ArrayList<String> sideboard        = new ArrayList<String>();
   
    //very important, do NOT change this
    private String            name             = "";
   
    private Object readResolve() throws ObjectStreamException {
        System.out.println("resolving obsolete Deck");
        forge.Deck d = new forge.Deck(deckType);
        d.setName(name);
        for(String s:main)
            d.addMain(s);
        for(String s:sideboard)
            d.addSideboard(s);
        return d;
    }
}

Re: SVN

PostPosted: 27 Oct 2009, 16:30
by DennisBergkamp
Turns out we do NOT have the same version... why, I don't know ???

Is there an easy way to just start a new project and checkOut / update to the current version that's on the SVN?

Re: SVN

PostPosted: 27 Oct 2009, 16:37
by silly freak
for me it's as easy as clicking "Synchrinize SVN" in the Team Synchronization perspective, and then "Update all incoming Changes" (granted you have no modifications to merge)...

Re: SVN

PostPosted: 27 Oct 2009, 17:06
by DennisBergkamp
Alright, I just deleted everything, and did an "update". Everything is working now, and it even accepted my commits for cards.txt/card-pictures.txt (which failed for some reason, a few releases ago).

You're right though, Quest still doesn't seem to work... maybe replace it with your questdata files?

Re: SVN

PostPosted: 27 Oct 2009, 18:27
by DennisBergkamp
Code: Select all
data.cardPool = state.cardPool;
data.myDecks = state.myDecks;
data.aiDecks = state.aiDecks;

readAIQuestDeckFiles(data, new ArrayList(data.aiDecks.keySet()));
state.aiDecks = null (as a result, same deal with data.aiDecks), which is why readAIQuestDeckFiles doesn't work. Actually, cardPool is null too, not sure if that matters.