It is currently 13 Sep 2025, 23:13
   
Text Size

Issue 118: Bug Reporting inside Forge lacks checks on Rev

Post MTG Forge Related Programming Questions Here

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

Issue 118: Bug Reporting inside Forge lacks checks on Rev

Postby Braids » 12 Aug 2011, 19:12

Rob Cashwalker wrote:Luckilly, we have switched to SVN, and GIT revision will no longer be a problem.

Thanks to r.9764, the version data can be auto-selected, possibly removed from UI
thanks for noticing. :)

of course, this begs the question: shall I create new fields for subversion rev numbers or repurpose the ones we used for Git?

if BuildInfo.getBuildID() returns null, i would suggest letting the user edit the field. actually, i wouldn't mind implementing this edit: {editing the code for issue 118} once we figure out the answer to the above question. i already implemented it once and had to undo the changes after i disocvered git's limitations.
Last edited by Braids on 12 Aug 2011, 19:16, 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. ;)
User avatar
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: Issue 118: Bug Reporting inside Forge lacks checks on Re

Postby Rob Cashwalker » 12 Aug 2011, 19:15

Create new fields. When I get to changing the report screen, I'll match the fields.
The Force will be with you, Always.
User avatar
Rob Cashwalker
Programmer
 
Posts: 2167
Joined: 09 Sep 2008, 15:09
Location: New York
Has thanked: 5 times
Been thanked: 40 times

Re: Issue 118: Bug Reporting inside Forge lacks checks on Re

Postby Braids » 12 Aug 2011, 19:17

Rob Cashwalker wrote:Create new fields. When I get to changing the report screen, I'll match the fields.
creating now.
"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. ;)
User avatar
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: Issue 118: Bug Reporting inside Forge lacks checks on Re

Postby Braids » 12 Aug 2011, 19:41

created.
"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. ;)
User avatar
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: Issue 118: Bug Reporting inside Forge lacks checks on Re

Postby Rob Cashwalker » 19 Aug 2011, 20:27

Trying to use this code:
Code: Select all
String curVer = BuildInfo.getVersion();
Getting an error that getVersion needs to be static.
The Force will be with you, Always.
User avatar
Rob Cashwalker
Programmer
 
Posts: 2167
Joined: 09 Sep 2008, 15:09
Location: New York
Has thanked: 5 times
Been thanked: 40 times

Re: Issue 118: Bug Reporting inside Forge lacks checks on Re

Postby Braids » 19 Aug 2011, 21:02

Rob Cashwalker wrote:Trying to use this code:
Code: Select all
String curVer = BuildInfo.getVersion();
Getting an error that getVersion needs to be static.
one must go through the static methods of the Singletons class to get what you want.

Code: Select all
import forge.Singletons;
import forge.model.BuildInfo;

BuildInfo buildInfo = Singletons.getModel().getBuildInfo();
String curVer = buildInfo.getVersion();  // might be "SVN"
String buildID = buildInfo.getBuildID();  // might be null
"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. ;)
User avatar
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: Issue 118: Bug Reporting inside Forge lacks checks on Re

Postby Rob Cashwalker » 19 Aug 2011, 21:10

I get a NPE on
Code: Select all
BuildInfo bi = Singletons.getModel().getBuildInfo();
The Force will be with you, Always.
User avatar
Rob Cashwalker
Programmer
 
Posts: 2167
Joined: 09 Sep 2008, 15:09
Location: New York
Has thanked: 5 times
Been thanked: 40 times

Re: Issue 118: Bug Reporting inside Forge lacks checks on Re

Postby Braids » 19 Aug 2011, 21:26

Rob Cashwalker wrote:I get a NPE on
Code: Select all
BuildInfo bi = Singletons.getModel().getBuildInfo();
the FModel needs to be initialized. if you're not running through forge.view.swing.Main.main, it won't be. if you are, then, try this. please tell me what line the NPE is on.

try chaining less:
Code: Select all
import forge.Singletons;
import forge.model.FModel;  //edit
import forge.model.BuildInfo;

FModel model = Singletons.getModel();
BuildInfo buildInfo = model.getBuildInfo();
String curVer = buildInfo.getVersion();  // might be "SVN"
String buildID = buildInfo.getBuildID();  // might be null
"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. ;)
User avatar
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: Issue 118: Bug Reporting inside Forge lacks checks on Re

Postby Rob Cashwalker » 20 Aug 2011, 15:28

OK.. good point, I was just running the BugzReporter direct.
The Force will be with you, Always.
User avatar
Rob Cashwalker
Programmer
 
Posts: 2167
Joined: 09 Sep 2008, 15:09
Location: New York
Has thanked: 5 times
Been thanked: 40 times

Re: Issue 118: Bug Reporting inside Forge lacks checks on Re

Postby Braids » 20 Aug 2011, 18:34

Rob Cashwalker wrote:OK.. good point, I was just running the BugzReporter direct.
i think you can just construct the FModel yourself by passing null to it. . .
"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. ;)
User avatar
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: Issue 118: Bug Reporting inside Forge lacks checks on Re

Postby Rob Cashwalker » 22 Aug 2011, 18:28

I'm back on it now... I just ran Forge using Gui_NewGame so all is initialized. I get "null" for BuildID and "SVN" for Version, while running in eclipse.
The Force will be with you, Always.
User avatar
Rob Cashwalker
Programmer
 
Posts: 2167
Joined: 09 Sep 2008, 15:09
Location: New York
Has thanked: 5 times
Been thanked: 40 times

Re: Issue 118: Bug Reporting inside Forge lacks checks on Re

Postby Braids » 23 Aug 2011, 00:35

Rob Cashwalker wrote:I'm back on it now... I just ran Forge using Gui_NewGame so all is initialized. I get "null" for BuildID and "SVN" for Version, while running in eclipse.
yes, that is expected behavior, unless "svnversion" {or svnversion.exe} is in your PATH environment variable in your Eclipse Run Configuration. it tries to get the version from the {manifest of the} jar that it's running inside. it can only do that if it's actually running from a jar, or if there is a forge jar in the CLASSPATH.

my advice would be to make the SVN Revision Detected a text field. if the build ID != null, then set the field's text to the buildID and setEditable(false). otherwise, setEditable(true) and let the user type it in if s/he knows it.
"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. ;)
User avatar
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: Issue 118: Bug Reporting inside Forge lacks checks on Re

Postby Rob Cashwalker » 23 Aug 2011, 16:16

Thanks, I'll look into the svnversion thing. It sucks that there's no universal way to do that direct from eclipse/subclipse, because just testing this code means constantly doing Run As -> Maven install, then running java from command line.

BTW, can we ditch the Git fields from mantis?
The Force will be with you, Always.
User avatar
Rob Cashwalker
Programmer
 
Posts: 2167
Joined: 09 Sep 2008, 15:09
Location: New York
Has thanked: 5 times
Been thanked: 40 times

Re: Issue 118: Bug Reporting inside Forge lacks checks on Re

Postby Braids » 23 Aug 2011, 18:08

Rob Cashwalker wrote:Thanks, I'll look into the svnversion thing. It sucks that there's no universal way to do that direct from eclipse/subclipse, because just testing this code means constantly doing Run As -> Maven install, then running java from command line.

BTW, can we ditch the Git fields from mantis?
i'm pretty sure we can hide them. i'll look into it. first i'd like to make sure that anything having a Git Rev Detected has a version detected of Git. similar for Fix Pushed to Git Rev.
"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. ;)
User avatar
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: Issue 118: Bug Reporting inside Forge lacks checks on Re

Postby Rob Cashwalker » 23 Aug 2011, 19:30

Mind if I remove Git as a potential version?
The Force will be with you, Always.
User avatar
Rob Cashwalker
Programmer
 
Posts: 2167
Joined: 09 Sep 2008, 15:09
Location: New York
Has thanked: 5 times
Been thanked: 40 times

Next

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 19 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 19 users online :: 0 registered, 0 hidden and 19 guests (based on users active over the past 10 minutes)
Most users ever online was 7967 on 09 Sep 2025, 23:08

Users browsing this forum: No registered users and 19 guests

Login Form