Friday, June 13, 2008

Subversion trials and errors

Late yesterday I tried
$ cd htdocs
$ svn import -m "New import" file:///usr/local/svn/newrepos
which then started processing (what exactly was done?) many large files in the htdocs tree which, on reflection, I don't want in the repository (archived Apache access logs(!), movies which are never revised, etc.). The import then choked on a file for which permissions were wrong.

Two questions now:
  1. How to undo all the processing that was done? (Maybe nothing was done since it choked?)
  2. How to do it better next time?
I don't think that the huge files were actually copied to another location on the filesystem, since this shows that the space is unchanged (if they'd all really been copied, Used should have almost doubled):
$ df -h /
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 131G 27G 98G 22% /
And it looks like the best way to undo is to use a system (not svn) rmdir. stspiffy says,
you can svn delete directories, but if you want to get rid of the entire repo forever-ever, ... the correct way to delete a repository is actually to delete the directory.
As far as How to do it better next time,
  1. I think www, not htdocs, should be the 'root' of the project (so that libraries and other (admin, etc) servers are included in the same repository)
    [ah but maybe it's better to have separate repositories? probably not, if it makes updates and commits harder. (But it doesn't, right, since these commands don't require the repository url?) So actually, at an extreme, I could have separate repositories (with granular revision numbers) for each directory in htdocs!] Is it reasonable to have one repository for libraries (which hardly ever change) and another for htdocs (which change 1-4 times/year) and another for the clearinghouseAdmin server, etc? 
  2. I could move archived access logs out of this tree. But what to do with other bulky files?
  3. Probably the best thing to do is vi a folder-by-folder svn import script (vi, :r !ls, :%s/^.*$/svn import -m "New Import" & file:///usr/local/svn/newrepos, zap unwanted lines from the file and then run as a script)

Labels: , ,

Thursday, June 12, 2008

Subversion notes

We have an existing project (web site).
We want to start using Subversion (svn) to document (and be able to undo) changes.
We have installed svn version 1.4.4 (r25188).
We need network access to the repository, at least for Daniel. (I may just continue editing on the server.)
Q: Which Subversion server process are we running? We have two choices. Quoting the Subversion FAQ:
either svnserve, which is small standalone program similar to cvs pserver, or Apache httpd-2.0 using a special mod_dav_svn module. svnserve speaks a custom protocol, while mod_dav_svn uses WebDAV as its network protocol.
Integration with Dreamweaver: it looks like DW CS4 will support svn.

Labels: , , ,

Thursday, June 05, 2008

Web Survey Tools

It might be a good idea to have polls (quick one-question surveys) on our site.

How to find tools?

a look at SourceForge finds:

(search (+poll +php +mysql))

PHPOLL php - mysql poll system
looks active. email confirmation of votes; max one vote per e-mail

(search: php survey)

nabopoll (http://www.nabocorp.com/nabopoll/)
looks orphaned.
Unit Command Climate Assessment and Survey System (UCCASS) (pronounced yoo-kas)
nothing new since 2005.

(search (+survey +php +mysql))

Multi-Platform Survey Architect
nothing new since 2004

Labels: , , , ,