It is currently 31 Oct 2025, 20:25
   
Text Size

SVN

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, CCGHQ Admins

Re: SVN

Postby silly freak » 24 Oct 2009, 21:29

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?
___

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: SVN

Postby DennisBergkamp » 24 Oct 2009, 21:54

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.
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Re: SVN

Postby silly freak » 24 Oct 2009, 22:53

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.
___

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: SVN

Postby DennisBergkamp » 24 Oct 2009, 23:31

Ahh, I see... alright I will just keep it the same then :)
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Re: SVN

Postby DennisBergkamp » 26 Oct 2009, 15:54

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
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Re: SVN

Postby DennisBergkamp » 26 Oct 2009, 16:13

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.
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Re: SVN

Postby silly freak » 26 Oct 2009, 16:48

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...
___

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: SVN

Postby DennisBergkamp » 26 Oct 2009, 18:59

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
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Re: SVN

Postby DennisBergkamp » 27 Oct 2009, 03:38

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.
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Re: SVN

Postby zerker2000 » 27 Oct 2009, 04:42

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?
O forest, hold thy wand'ring son
Though fears assail the door.
O foliage, cloak thy ravaged one
In vestments cut for war.


--Eladamri, the Seed of Freyalise
zerker2000
Programmer
 
Posts: 569
Joined: 09 May 2009, 21:40
Location: South Pasadena, CA
Has thanked: 0 time
Been thanked: 0 time

Re: SVN

Postby silly freak » 27 Oct 2009, 12:21

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;
    }
}
___

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: SVN

Postby DennisBergkamp » 27 Oct 2009, 16:30

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?
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Re: SVN

Postby silly freak » 27 Oct 2009, 16:37

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)...
___

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: SVN

Postby DennisBergkamp » 27 Oct 2009, 17:06

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?
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Re: SVN

Postby DennisBergkamp » 27 Oct 2009, 18:27

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.
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 30 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 30 users online :: 0 registered, 0 hidden and 30 guests (based on users active over the past 10 minutes)
Most users ever online was 9298 on 10 Oct 2025, 12:54

Users browsing this forum: No registered users and 30 guests

Login Form