working with dokuwiki plugins using darcs

Here are some steps for those of you who would like to use a darcs repository.

  • requirements:
    • a valid shell account on your server
    • the darcs binary, check for it with
      which darcs
    • something where you can upload your repository and others can download it
      • supported protocols and limitations:
protocol syntax direction notes
shell <user>@<host>:/dir pull/push you should use puplickey authentication
ftp ftp://<user>:<pass>@<host>/<dir> pull/push should work quite fine, but push not tested
http http://<host>/<dir> pull for public access

Create a new plugin

1. create you repository

Hint: dokuwiki/lib/plugins/<NAME> does not need to be empty.

$> cd dokuwiki/lib/plugins/<NAME>
$> darcs initialize

2. add files

$> darcs add *
$> darcs add lang/*
$> darcs add lang/de/*
$> darcs add lang/en/*

3. record and upload

  • see below

Record and upload changes

that will generate a patchset oriented on your last recorded version

$> cd dokuwiki/lib/plugins/<NAME>
$> darcs record

Comment your changes and push them via:

$> darcs push

Note: use darcs send if you're using a pull-only url

Pull and apply patches

$> cd dokuwiki/lib/plugins/<NAME>
$> darcs pull
And select which patches you'd like to apply.

Get a repository

...for installing new plugins maintained by others

Hint: you can also use the darcs plugin for this job

Important: use darcs get in the parent directory and check if there isn't another directory with our plugin name

$> cd dokuwiki/lib/plugins/
$> darcs get <URL>

Repositories on erazor-zone.de

There are 2 URLs you've to know:

FAQ

Comments/Discussion

  • darcs push with ftp is non-simple :-? It appears to require an environment variable DARCS_APPLY_FTP to be set with appropriate commands to make it work - I haven't found anything definitive on what those commands could/should be for ftp. There is mention of darcshive and darcsmirror however they aren't in the Gentoo package library. All of which is because I am trying to setup the public component of my plugin repo on higher bandwidth webspace to which I only have ftp access, finding out how to do this would be useful. — Chris 2005-09-13
E-Razor: Indeed, using darcs push with ftp isn't that easy and i wouldn't recommend it. The only good way to use ftp would be to:
  1. check for _darcs/lock
  2. touch _darcs/lock
  3. fetch the whole repo on the ftp-server
  4. add and apply patches
  5. upload the repo again
that could be done with a bash script and lftp.
 
wiki/projects/php/dokuwiki/plugins/darcs/howto.txt · Last modified: 2005/09/13 15:23 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki