SVN
Post MTG Forge Related Programming Questions Here
	Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, CCGHQ Admins
Re: SVN
 by silly freak » 24 Oct 2009, 21:29
by silly freak » 24 Oct 2009, 21:29 
the current situation is that:
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?
			- Code: Select all
- svn/
 branches/
 src/
 .settings/
 src/ <-- code
 res/
 tags/
 trunk/
 MTGForgeNew/ <-- code
 workspace/
 CardForge/ <-- code
 wiki/
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!
		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
 by DennisBergkamp » 24 Oct 2009, 21:54
by 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/
- 
				 
 DennisBergkamp
- AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: SVN
 by silly freak » 24 Oct 2009, 22:53
by silly freak » 24 Oct 2009, 22:53 
more like...
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.
			- Code: Select all
- svn/
 branches/
 .settings/
 res/
 src/ <--- code
 tags/
 trunk/
 MTGForgeNew/ <-- code
 workspace/
 CardForge/ <-- code
 wiki/
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!
		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
 by DennisBergkamp » 24 Oct 2009, 23:31
by DennisBergkamp » 24 Oct 2009, 23:31 
Ahh, I see... alright I will just keep it the same then 
			
		
- 
				 
 DennisBergkamp
- AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: SVN
 by DennisBergkamp » 26 Oct 2009, 15:54
by 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
			
		Both Silly Freak and Zerker have made changes to the SVN. Now hopefully I won't mess things up with my changes

- 
				 
 DennisBergkamp
- AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: SVN
 by DennisBergkamp » 26 Oct 2009, 16:13
by 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
Also, hopefully I didn't overwrite any changes made by you guys, but I think updates were made to a different set of files.
			
		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

Also, hopefully I didn't overwrite any changes made by you guys, but I think updates were made to a different set of files.
- 
				 
 DennisBergkamp
- AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: SVN
 by silly freak » 26 Oct 2009, 16:48
by 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...
			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!
		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
 by DennisBergkamp » 26 Oct 2009, 18:59
by 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
			
		
Still not sure why the error occurs though when committing cards.txt and card-pictures.txt

- 
				 
 DennisBergkamp
- AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: SVN
 by DennisBergkamp » 27 Oct 2009, 03:38
by DennisBergkamp » 27 Oct 2009, 03:38 
Silly Freak, 
I'm getting some funky error when running GUI_NewGame in the latest version:
			
		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)
- 
				 
 DennisBergkamp
- AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: SVN
 by zerker2000 » 27 Oct 2009, 04:42
by zerker2000 » 27 Oct 2009, 04:42 
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 thatDennisBergkamp 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:
 .
.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 reasonsilly 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.
 ). What happens if you debug with a breakpoint at DeckIO.java:147?
). 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
		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
 by silly freak » 27 Oct 2009, 12:21
by silly freak » 27 Oct 2009, 12:21 
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".DennisBergkamp wrote:Silly Freak,
I'm getting some funky error when running GUI_NewGame in the latest version:This is the output, not sure what's going on.
- 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)
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!
		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
 by DennisBergkamp » 27 Oct 2009, 16:30
by 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?
			
		Is there an easy way to just start a new project and checkOut / update to the current version that's on the SVN?
- 
				 
 DennisBergkamp
- AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: SVN
 by silly freak » 27 Oct 2009, 16:37
by 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!
		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
 by DennisBergkamp » 27 Oct 2009, 17:06
by 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?
			
		You're right though, Quest still doesn't seem to work... maybe replace it with your questdata files?
- 
				 
 DennisBergkamp
- AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: SVN
 by DennisBergkamp » 27 Oct 2009, 18:27
by 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()));
- 
				 
 DennisBergkamp
- AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Who is online
Users browsing this forum: No registered users and 30 guests
