WeBWorK Main Forum

problem switching to SVN

problem switching to SVN

by Richard Bayne -
Number of replies: 26
Summer Greetings,
Is there an alternate way to convert to SVN?
When I try to follow the directions to convert using the command
svn co http://wwrk.maa.org/svn/system/trunk/webwork2 temp-checkout
I get the error message
svn: PROPFIND request failed on '/svn/system/trunk/webwork2'
svn: PROPFIND of '/svn/system/trunk/webwork2': 405 Method Not Allowed (http://wwrk.maa.org)
which I take to mean that our system does not recognize the validity of the site at http://wwrk.maa.org
Please correct me if I am in error or if anyone has a suggestion for an alternate method of setting up svn, I would appreciate it.
Thanks.
Bayne
In reply to Richard Bayne

Re: problem switching to SVN

by Jason Aubrey -
Hi Richard,

Sorry about that - we've now switched to the permanent host name of svn.webwork.maa.org for subversion, and I missed updating that page.

I've now updated it to reflect the new hostname and say:
svn co http://svn.webwork.maa.org/system/trunk/webwork2 temp-checkout
Jason
In reply to Jason Aubrey

Re: problem switching to SVN

by Lars Jensen -
Hi Everyone,

After switching my test site to svn, I now get the "Site Information" block below on the main course display page as well as each course login page. Please update to the correct page.

Thanks,
Lars.

---------------------

Site Information
Information about the open source homework system WeBWorK can be found at http://webwork.maa.org
The courses on this machine will gradually be moved starting Monday, June 28 to a new machine at http://courses.webwork.maa.org located at MAA headquarters.
There will may be occasional short periods of downtime as this change takes place.
In reply to Lars Jensen

Re: problem switching to SVN

by Michael Gage -
Hi Lars,

Sorry about that -- there is file .../webwork2/htdocs/site_info.txt which should be empty.

I accidentally committed the site_info.txt file from hosted2.webwork.rochester.edu.

I'll fix it.

take care,

Mike
In reply to Jason Aubrey

Re: problem switching to SVN

by Richard Bayne -
Jason-
Thank you for the prompt response. Yes, now I am able to bring down the new versions using svn. I will report that in spite of the option -a, I too seem to need to redo permissions. I am using Fedora 9.
Now for the next problem. After doing the upgrade, all my previous problem sets appear to be not working. On each of the opening pages of the problems sets a pink page occurs and there is an error message in the Set Info section:
Can't locate object method "new" via package "PGcore" at /opt/webwork/pg/macros/PG.pl line 30 Died within main::DOCUMENT called at line 1 of (eval 4332)

Further, when trying to look at problems on the Library Browser page, all problems that appear indicate "this problen caused an error", and when I attempt to run the problem, the error reported is:
Can't locate object method "sub_status" via package
"WeBWorK::DB::Record::UserProblem" at
/opt/webwork/webwork2/lib/WeBWorK/PG/Local.pm line 360.

And finally, now I get an internal server error when trying to access any course via the web. This, of course, may have nothing to do with the new stuff. Since I am currently at a remote spot, I will have to check this out further on tomorrow. However, anything that you might suggest for the previously mentioned troubles would be appreciated.
Thanks.
Richard
In reply to Richard Bayne

Re: problem switching to SVN

by Lars Jensen -
Hi Mike and Richard,

We're also getting lost of errors after switching to svn. I've included below the errors I see upon login to a course.

One question I have is: How does svn know which version of webwork I've been running (patches)? I followed the instructions to switch from the maa.org website:

svn co http://svn.webwork.maa.org/system/trunk/webwork2 temp-checkout
rsync -a temp-checkout/ /path/to/webwork2 directory/
rm -rf temp-checkout

These instructions do not seem to be version specific... Is this going to upgrade the patches version correctly?

Lars.

---------------------------------------------
WeBWorK error
An error occured while processing your request. For help, please send mail to this site's webmaster (webmaster@localhost), including all of the following information as well as what what you were doing when the error occured.

Thu Jul 08 15:33:29 2010

Warning messages

Error messages

DBD::mysql::st execute failed: Unknown column 'merge1.enable_reduced_scoring' in 'field list' at /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm line 814.
Call stack

The information below can help locate the source of the problem.

in WeBWorK::DB::Schema::NewSQL::Std::handle_error called at line 198 of /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Merge.pm
in WeBWorK::DB::Schema::NewSQL::Merge::_get_fields_where_prepex called at line 380 of /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm
in WeBWorK::DB::Schema::NewSQL::Std::get_fields_where called at line 440 of /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm
in WeBWorK::DB::Schema::NewSQL::Std::get_records_where called at line 740 of /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm
in WeBWorK::DB::Schema::NewSQL::Std::gets called at line 1237 of /opt/webwork/webwork2/lib/WeBWorK/DB.pm
in WeBWorK::DB::getMergedSets called at line 141 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/ProblemSets.pm
in WeBWorK::ContentGenerator::ProblemSets::body called at line 152 of /opt/webwork/webwork2/lib/WeBWorK/Template.pm
in WeBWorK::Template::template called at line 491 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator.pm
in WeBWorK::ContentGenerator::content called at line 195 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator.pm
in WeBWorK::ContentGenerator::go called at line 353 of /opt/webwork/webwork2/lib/WeBWorK.pm
In reply to Lars Jensen

Re: problem switching to SVN

by Michael Gage -
Lars,

Go to the admin "course" and click on the "upgrade courses" tab -- it looks like your database table setup is older than the new distribution.

The default version in the svn is 2.4.9 (one step along the 2-4-patches version from 2.4.7). In particular the capability to allow a "reduced credit" grace period for handing in late homework which Arnie introduced last fall requires an extra field in the database.

-- Mike

In reply to Lars Jensen

Re: problem switching to SVN

by Jason Aubrey -
Hi Lars,

As Mike indicated, your problem should be fixed by upgrading your courses to match the db modifcations.

To answer your specific question: the instuctions on the wiki will convert your codebase from a cvs checkout to a subversion checkout *of the trunk*. So you went from rel-2-4-patches (via cvs) to HEAD (via svn).

I think (and Mike or Arnie can confirm this) that the next numbered relase will be fairly soon and will be essentially what is now in the trunk. (And when people switch to that release they will need to do this course upgrade.)

Nevertheless, switching to the trunk is not what you expected - I'll update the instructions to make it more clear how stay in the rel-2-4-patches branch when converting (replace /trunk/ with /branches/rel-2-4-patches/).

Also, you can switch back from the trunk to the branch if you want. If you are going to try this, I'd recommend *not* upgrading the courses - only do that if you want to stay where you're at).

Here's how to do this:
- first verify that your working copy points to the trunk:
[jason@localhost pg]$ svn info | grep URL
URL: http://svn.webwork.maa.org/system/trunk/pg
- now do the switch:
svn switch http://svn.webwork.maa.org/system/branches/rel-2-4-patches/pg
The output will be a list of files changed as Subversion makes your working copy look like the current state of rel-2-4-patches.

Repeat for the webwork2 directory.

Once there is a branch for the next stable release, you can switch out of the trunk and into that branch like this also.

Hope this helps,
Jason



In reply to Jason Aubrey

Re: problem switching to SVN

by Lars Jensen -
Hi Jason,

Thanks for help.

This worked fine for the pg directory, but when I did this for webwork2, e.g. when I did

svn switch http://svn.webwork.maa.org/system/branches/rel-2-4-patches/webwork2

I got this error:

svn: Failed to add file 'clients/webwork_xmlrpc_inc.pl': an unversioned file of the same name already exists

If I delete clients/webwork_xmlrpc_inc.pl svn runs a little longer, but then produces this error:

svn: Failed to add file 'conf/templates/math/math.css': an unversioned file of the same name already exists

If I remove this file, it runs longer yet, but then complains similarly about another file...

Lars.
In reply to Lars Jensen

Re: problem switching to SVN

by Jason Aubrey -
Hi Lars,

The problem is that those files
clients/webwork_xmlrpc_inc.pl
conf/templates/math/math.css
etc do not exist in the trunk.

For example, Mike has rewritten much of the webservice stuff in clients. And that math.css file actually belongs in htdocs/css/

When you converted from cvs rel-2-4-patches to svn trunk using rsync, the rsync program simply ignored those files, and the .svn directory that came with trunk would contain no information about those files since it wasn't pulled down with your checkout.

In other words, rsync didn't delete it and Subversion doesn't know anything about it (and so calls it 'unversioned').

Fixing this should be as easy as including --force with your switch command, as in

svn switch --force http://svn.webwork.maa.org/system/branches/rel-2-4-patches/webwork2

Let me know if you have any other trouble. Sorry for not anticipating this...

Jason
In reply to Jason Aubrey

Re: problem switching to SVN

by Lars Jensen -
Hi Jason,

Thanks! The --force flag took care of the problem for out test server. Now I can login without any errors.

Now on to the production server:

Is this the correct way to switch the production server and stay with patches?

svn co http://svn.webwork.maa.org/system/branches/rel-2-4-patches/webwork2 temp-checkout
rsync -a temp-checkout/ /path/to/webwork2 directory/
rm -rf temp-checkout

and the same for the pg directory, right?
Lars.
In reply to Lars Jensen

Re: problem switching to SVN

by Jason Aubrey -
That'll do it! You'll also need to switch your NationalProblemLibrary directory, but with trunk since that is not branched. (Well, there are branches, but those are for authors who are building new collections to add to the NPL.)

(And there have recently been *a lot* of bug fixes in the NPL, thanks to Arnie and Mike's student Spyro. And be sure to run NPL-update to get recently added problems into you database.)

Jason
In reply to Richard Bayne

Re: problem switching to SVN

by Michael Gage -
Hi Richard,

You will also need to switch the pg directory over to svn and will need to restart the server.
(I can't be sure that is the problem, but PGcore.pm is one of the modules in the new software distribution that would not have been in the cvs version.)

Finally, from the admin "course" -- select the "Upgrade course" tab and see if any of the data tables need to be upgraded -- webwork should be able to do this automatically if your previous webwork software was reasonably up to date (say the last year or two).


Hope this helps.

-- Mike
In reply to Richard Bayne

Re: problem switching to SVN

by Jason Aubrey -
For those of you following this discussion, I've updated the instructions at

http://webwork.maa.org/wiki/Converting_a_CVS_checkout_to_SVN

Please continue to report any issues you encounter with this conversion so that we can document those problems and get everyone converted to SVN.

Also, feel free to contribute to that documentation if you wish.

Jason
In reply to Jason Aubrey

Re: problem switching to SVN

by Richard Bayne -
Hi Jason,
I have now managed an apparently successful conversion to svn. I think my previous problem did have to do with using 'trunk' instead of 'branches' . Things now seem to be working ok. However, one of the problems that I had hoped would be solved still remains, but I guess that should be on a different discussion strand. There are still several problem sets which will not display on the Library Browser. I thought I had read that it was because of a problem with PGgraphmacros.pl that had been fixed.
Thanks again.
Richard
In reply to Richard Bayne

Re: problem switching to SVN

by Jason Aubrey -
Hi Richard,

Fantastic! I'm glad it worked. Regarding the problem collections - my first suggestion, if you haven't already done this, is to try running the NPL-update script in webwork2/bin.

Jason
In reply to Jason Aubrey

Re: problem switching to SVN

by Michael Gage -
Also tell us specifically which problems (at least one or two examples) don't work in the NPL. We have been continually making small fixes to get all of these problems working again-- but there may still be a few left that need tweaks.

In reply to Jason Aubrey

Re: problem switching to SVN

by Xiong Chiamiov -
One important thing I ran across while doing this transfer:

┌─[root@hostname35248] - [/opt/webwork] - [Mon Jul 12, 03:45]
└─[$]> ls
courses libraries pg temp-checkout webwork2
┌─[root@hostname35248] - [/opt/webwork] - [Mon Jul 12, 03:45]
└─[$]> rsync -a temp-checkout webwork2
┌─[root@hostname35248] - [/opt/webwork] - [Mon Jul 12, 03:45]
└─[$]> la webwork2
bin clients conf courses.dist DATA doc htdocs lib LICENSE logs README smtp_auth.3.diff temp-checkout tmp

As you can see, the temp-checkout directory was copied into webwork2, which is not at all what we want. The correct command is `rsync -a temp-checkout/ webwork2`, with a trailing slash on the first directory. While that is indeed how the instructions are, it is a very easy thing to miss (and my shell removes the trailing slash after tab-completing and pressing space).
In reply to Xiong Chiamiov

Re: problem switching to SVN

by Darwyn Cook -
I am having issues with problems 4 and 5 in the webwork orientation set that is installed in the myTestCourse. This is on a fresh install using the 64 bit vanilla_live, and the same problem occurs on the 32 bit running in a virtual mahchine.
The error I get is:

WeBWorK Error

WeBWorK has encountered a software error while attempting to process this problem. It is likely that there is an error in the problem itself. If you are a student, report this error message to your professor to have it corrected. If you are a professor, please consult the error output below for more information.

Error messages

Can't locate object method "new" via package "ChoiceList" (perhaps you forgot to load "ChoiceList"?) at line 116 of [TMPL]/Library/macros/Union/alignedChoice.pl Died within AlignedList::new called at line 106 of [TMPL]/Library/macros/Union/alignedChoice.pl from within main::new_aligned_list called at line 70 of [TMPL]/setOrientation/prob04.pg

Error details

 Problem4
ERROR caught by Translator while processing problem file:setOrientation/prob04.pg
****************
Can't locate object method "new" via package "ChoiceList" (perhaps you forgot to load "ChoiceList"?) at line 116 of [TMPL]/Library/macros/Union/alignedChoice.pl
 Died within AlignedList::new called at line 106 of [TMPL]/Library/macros/Union/alignedChoice.pl
 from within main::new_aligned_list called at line 70 of [TMPL]/setOrientation/prob04.pg

Everything else seems to be working fine, and this problem worked fine before the switch to svn.
In reply to Darwyn Cook

Re: problem switching to SVN

by Michael Gage -
Compare global.conf and global.conf.dist.

The module List.pm was renamed to ChoiceList.pm to reduce
confusion with the MathObjects Value::List.pm

The change needs to be made in the global.conf file where the
modules loaded into the Safe.pm compartment are defined.

(also make sure you use Safe.pm 2.19 and not the latest 2.27 version ).


In reply to Michael Gage

Re: problem switching to SVN

by Darwyn Cook -
Using safe.pm version 2.18.
This is in the 64bit Ubuntu live-CD version
I did a diff on global.conf and global.conf.dist and did not find anything relevant, so
I deleted global.conf, and global.conf.dist. Used svn up to reload global.conf.dist, and then copied that to global.conf. Updated the database password entries in global.conf, and then rebooted the server, still no luck

Where in global.conf should I find ChoiceList?
In reply to Darwyn Cook

Re: problem switching to SVN

by Michael Gage -
Hmmm. Not sure I understand what is going on there. But you find the module loading stanzas near the bottom of global.conf:

##### PG modules to load
# The first item of each list is the module to load. The remaining items are
# additional packages to import.
${pg}{modules} = [
 [qw(DynaLoader)],
 [qw(Exporter)],
 [qw(GD)],
 
 [qw(AlgParser AlgParserWithImplicitExpand Expr ExprWithImplicitExpand utf8)],
 [qw(AnswerHash AnswerEvaluator)],
 [qw(WWPlot)], # required by Circle (and others)
 [qw(Circle)],
 [qw(Complex)],
 [qw(Complex1)],
 [qw(Distributions)],
 [qw(Fraction)],
 [qw(Fun)],
 [qw(Hermite)],
 [qw(Label)],
 [qw(ChoiceList)],
 [qw(Match)],
 [qw(MatrixReal1)], # required by Matrix
....
........

This used to be List instead of ChoiceList.

Hope this helps.
In reply to Michael Gage

Re: problem switching to SVN

by Darwyn Cook -
Did a fresh install on a new virtual machine, used the 64bit Ubuntu vanilla-Live CD. After installing ran cvs update -dP in pg and webwork2. Then did the conversion to svn, same problem.

In my version of global.conf ( webwork2/conf/global.conf.dist,v 1.189.2.7.2.15 2010/05/19 14:51:25 ) I have List not ChoiceList. I tried changing it ChoiceList, copying List.pm to ChoiceList.pm in /pg/lib and rebooted the server. That didn't fix the problem either.

Am I the only one having this problem?
In reply to Darwyn Cook

Re: problem switching to SVN

by Jason Aubrey -
Hi Darwyn,

Are you trying to convert rel-2-4-patches or the development version?

There is no ChoiceList.pm in rel-2-4-patches. See lines 926-953 of global.conf.dist here:

http://webwork.maa.org/viewvc/system/branches/rel-2-4-patches/webwork2/conf/global.conf.dist?view=markup

There is ChoiceList.pm in the development trunk. See line 954 of that global.conf.dist here:

http://webwork.maa.org/viewvc/system/branches/rel-2-4-patches/webwork2/conf/global.conf.dist?view=markup

My guess is that you're probably converting rel-2-4-patches. Once we get that cleared up, that might make it easier to solve your original problem.

Jason
In reply to Jason Aubrey

Re: problem switching to SVN

by Jason Aubrey -
Yeah, I think the problem is that you're on rel-2-4-patches, but ChoiceList hasn't been added in there.

On the other hand, the macros in the NPL trunk have been updated to refer to the new packages in the webwork2 trunk.

This problem is going to affect anyone running on rel-2-4-patches, and there may be similar problems with other macros. We'll fix this!

Jason
In reply to Darwyn Cook

Re: problem switching to SVN

by Jason Aubrey -
Hi Darwyn,

Lars was having the same problem. The solution I suggested for him should work for you as well. See

http://webwork.maa.org/moodle/mod/forum/discuss.php?d=2301

Hope this helps,

Jason

In reply to Jason Aubrey

Re: problem switching to SVN

by Darwyn Cook -
Jason,
That works nicely, thanks for the quick reply. Appreciate all the work the webwork team does on our behalf!