st - CVS-style interaction with a Socialtext WikiWikiWeb
st checkout http://www.socialtext.net/your-wiki-name cd your-wiki-name vi homepage st diff -u st update st diff -u st commit
st is extremely alpha; use at your own risk. I hope it doesn't
mangle all of your Wiki pages. It's behaved well in my limited
testing, but it hasn't been reviewed by anybody and it has none of the
usual correctness aids, such as automatically checked behavior
specifications.
st is an example application of Socialtext's REST API. It checks
out a copy of your Socialtext Wiki into your local filesystem and lets
you edit the text of your Wiki pages with your text editor of choice,
and then upload them again later, possibly merging in changes.
st checkout or st co prompts you for your email address and
Socialtext password, creates the work directory, and downloads all of
the pages in your Wiki. This takes a while, and won't be practical on
a sufficiently large Wiki, but you only need to do it once.
st diff or st di shows the edits you currently have waiting to
be committed. It produces unified diff output by default;
st diff -c will give you context diffs instead. This command works
even when you have no network access, such as when you're on a
commercial flight.
st update or st up updates the pages in your filesystem to the
current version on the Wiki server, trying to automatically merge in
any changes you have made locally.
st commit or st ci uploads any edits you have made to the Wiki
server.
st creates a directory named after your Socialtext workspace as a
child of the current directory. Inside that directory, it creates a
.st directory containing the following files:
user
Your email address.
pass
Your Socialtext password.
url
The URL of the Wiki.
pristine
A directory containing the last versions of all of the pages downloaded from the server, one per file.
etags
A directory containing the entity tags (``ETags'') of all of the pages downloaded from the server, one per file.
Asks you for your username and password even for unparsable URLs.
Has a lost-update race condition when saving.
http://www.socialtext.net/st-rest-docs/index.cgi
doesn't list 412 Precondition Failed (see
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.13)
so there probably isn't any way to avoid that. Should use If-Match
(http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.24)
or If-Unmodified-Since
(http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.28)
in order to try to avoid that.
Will fail if someone puts a newline in the user or password file using
vi.
Won't be able to merge if diff3 isn't installed. diff3 is an
``essential'' package on Debian and has been part of Unix since at least
the 1980s, so this probably won't be a problem on any Unix system.
Won't be able to show diffs if diff isn't installed.
No support for tags.
No support for attachments.
No support for comments.
No support for users, breadcrumbs, backlinks.
Very inefficient at figuring out whether files have been locally modified.
Emits useless message apparently when there's a conflict:
diff3 exited with 256. at ../st line 442.
Doesn't keep you from committing with conflicts.
Copyright 2008 Kragen Javier Sitaker.