TOPIC: Version Control ... How to use for the first time?
#1466
Version Control ... How to use for the first time? 11 Months ago
I would like to use Version Control on a project I am just starting on. I selected my library, choose Tools>Version Control Settings. There, I checked "Standalone", left the password blank, and entered jeremy for the "Default User". I then clicked "OK".

From there, I clicked IDE>Version Control. I selected my library from the Library Dropdown (jeremy was already set in the User field). Once selecting my library, a large list of changes appeared in the left list box. I clicked the "All" button to select all changes. Then I clicked "Send Checked Local Changes". When doing this, I get an error:

"query: nonexistent table: svc_last_get"

How do I initialize the Version Control System?

Jeremy
 
 
#1473
Re:Version Control ... How to use for the first time? 11 Months ago
Looks like that is a bug. It creates the table in SvcControl.update_lastsvcget but it's obviously trying to access it earlier.

As a work-around you can just manually run the line that creates it.

Sorry about that.
 
 
andrew
 
#1478
Re:Version Control ... How to use for the first time? 11 Months ago
OK, that fixed that error, but I had another problem:

Code:


last_test_success()
  {
    x = Query1('testrunner_success')
    return x is false ? Date.Begin() : x.date_time
  }



testrunner_success is not a valid table. I then created a Tests folder in my lib, added a DummyTest that did AssertEq(1,1), and ran w/Test Runner, however that did not fix the problem.

I commented out the code in the above function and simply did return Date() and that made the version control work, but it would be nice to have it integrate with the test runner correctly.

Jeremy
 
 
#1482
Re:Version Control ... How to use for the first time? 11 Months ago
Did you use Run All in TestRunner? That's what sets this.

Version control should handle the table not existing - I'll fix it.

This should probably be optional - not everyone will want to be forced to use tests.
 
 
andrew
 
#1483
Re:Version Control ... How to use for the first time? 11 Months ago
Yes. I added to the flightlog lib:

/Tests/DummyTest
Code:


Test
  {
  Test_main()
    {
    AssertEq(1,1)
    }
  }



I then selected the lib folder flightlog, selected IDE>Test Runner. I noticed I had to select then the lib as well in the dropdown. When I did so, my one test appeared, DummyTest. I clicked the Run All button and the status bar turned green saying "S U C C E S S - 1 tests".

Running version control again (with the Query1 line not commented out) yields the same result: "query: nonexistent table: testrunner_success".

Jeremy
 
 
#1484
Re:Version Control ... How to use for the first time? 11 Months ago
To play with it more trying to figure things out, I looked at IDE>Schema View, and no tables at all exist with "testrunner" in the name. I then changed my AssertEq to (1,0) causing a failure thinking that may create the table, but it did not.

Jeremy
 
 
#1485
Re:Version Control ... How to use for the first time? 11 Months ago
Oh, I just ran all tests for stdlib, all 265 passed but still no testrunner_success table.

Jeremy
 
 
#1486
Re:Version Control ... How to use for the first time? 11 Months ago
Looking at the code (TestRunnerGui.On_Run_All) it looks like it only updates this if the library choice is "(All)"

Note: As a shortcut, if you choose Run All without selecting a library it automatically defaults to "(All)".
 
 
andrew
 
#1487
Re:Version Control ... How to use for the first time? 11 Months ago
Yup, that made it work. Is that a bug as well? I would assume it should update for just running on a selected library?

Jeremy
 
 
#1488
Re:Version Control ... How to use for the first time? 11 Months ago
No, it's deliberate. The reason is that there can be "dependencies" between libraries i.e. a change in one library can "break" things in another library. The only way to find that is to run the tests from all the libraries.
 
 
andrew
 
#1489
Re:Version Control ... How to use for the first time? 11 Months ago
Hm. I can understand that from the perspective of the author of Suneido, but many may not want to wait through the tests of all libraries. Right now it is only taking 2.6 seconds which is not a big deal, but it can't be testing everything in the stdlib, for instance, PopClient, SmtpServer, or Internet access in general. What happens when it starts to take multiple minutes when testing just the standard library?

That seems like a good practice, but I think it should be up to the developer to choose. I would think the testrunner_success should store multiple records, one for each library and if the user wants to commit library ABC and the testrunner_success table says it passes, then I would allow them to commit.

However, again, it's only 2.6 seconds, so it's not a big deal right now :-)

Jeremy
 
 
#1490
Re:Version Control ... How to use for the first time? 11 Months ago
I agree it should be up to the developer.

So far I think we've been the only ones using the version control so we haven't worried too much.

We do make an effort to keep the tests fast, but it adds up. Our entire test suite is up to about a minute, which is a nuisance, but I think worth it for us.
 
 
andrew
 
#1494
Re:Version Control ... How to use for the first time? 11 Months ago
andrew wrote:

Version control should handle the table not existing - I'll fix it.


Is there a way to get nightly builds or the "CVS" copy of Suneido or do we have to wait for releases?

Jeremy
 
 
#1496
Re:Version Control ... How to use for the first time? 11 Months ago
Currently our internal version control is not public, although there is no reason we could not provide read-only access.

Or we could probably set up something to post nightly snapshots on the web.

Of course, you might get changes that are not well tested.
 
 
andrew
 
#1546
Re:Version Control ... How to use for the first time? 10 Months, 4 Weeks ago
andrew wrote:
Currently our internal version control is not public, although there is no reason we could not provide read-only access.

Or we could probably set up something to post nightly snapshots on the web.

Of course, you might get changes that are not well tested.


It would be nice to be able to access the latest copy from a public version control.

Jeremy