diff options
author | Amitai Schlair <schmonz-web-ikiwiki@schmonz.com> | 2012-02-07 08:33:32 -0500 |
---|---|---|
committer | Amitai Schlair <schmonz-web-ikiwiki@schmonz.com> | 2012-02-07 08:33:32 -0500 |
commit | a5e84ae3fd07eee895520dcadd0294252539ffee (patch) | |
tree | 9d2e3b3e5798b4dd77326fd2f71dff3d6aef1255 | |
parent | 414ccfb1e298a722d2afa8b8540ca84dc1ccc6f2 (diff) | |
parent | cd32099756c91298a3cb11e194006434eeb46864 (diff) | |
download | ikiwiki-a5e84ae3fd07eee895520dcadd0294252539ffee.tar ikiwiki-a5e84ae3fd07eee895520dcadd0294252539ffee.tar.gz |
Merge branch 'master' into cvs
-rw-r--r-- | IkiWiki/Plugin/git.pm | 49 | ||||
-rw-r--r-- | doc/bugs/Pandoc_plugin_and_UTF-8:_IkiWiki_and_UTF-8.mdwn | 13 | ||||
-rw-r--r-- | doc/bugs/Pandoc_plugin_and_UTF-8:_IkiWiki_and_UTF-8/discussion.mdwn | 23 | ||||
-rw-r--r-- | doc/ikiwiki-makerepo.mdwn | 27 | ||||
-rw-r--r-- | doc/rcs/cvs/discussion.mdwn | 5 | ||||
-rw-r--r-- | doc/sandbox.mdwn | 2 | ||||
-rw-r--r-- | doc/tips/html5.mdwn | 2 | ||||
-rw-r--r-- | doc/todo/recommend_libtext-markdown-discount_instead_of_depending.mdwn | 5 |
8 files changed, 91 insertions, 35 deletions
diff --git a/IkiWiki/Plugin/git.pm b/IkiWiki/Plugin/git.pm index 3117e4291..3dd910cd5 100644 --- a/IkiWiki/Plugin/git.pm +++ b/IkiWiki/Plugin/git.pm @@ -9,7 +9,6 @@ use open qw{:utf8 :std}; my $sha1_pattern = qr/[0-9a-fA-F]{40}/; # pattern to validate Git sha1sums my $dummy_commit_msg = 'dummy commit'; # message to skip in recent changes -my $git_dir=undef; sub import { hook(type => "checkconfig", id => "git", call => \&checkconfig); @@ -151,6 +150,17 @@ sub genwrapper { } } +my $git_dir=undef; +my $prefix=undef; + +sub in_git_dir ($$) { + $git_dir=shift; + my @ret=shift->(); + $git_dir=undef; + $prefix=undef; + return @ret; +} + sub safe_git (&@) { # Start a child process safely without resorting to /bin/sh. # Returns command output (in list content) or success state @@ -302,8 +312,6 @@ sub merge_past ($$$) { return $conflict; } -{ -my $prefix; sub decode_git_file ($) { my $file=shift; @@ -325,7 +333,6 @@ sub decode_git_file ($) { return decode("utf8", $file); } -} sub parse_diff_tree ($) { # Parse the raw diff tree chunk and return the info hash. @@ -845,9 +852,9 @@ sub rcs_receive () { # (Also, if a subdir is involved, we don't want to chdir to # it and only see changes in it.) # The pre-receive hook already puts us in the right place. - $git_dir="."; - push @rets, git_parse_changes(0, git_commit_info($oldrev."..".$newrev)); - $git_dir=undef; + in_git_dir(".", sub { + push @rets, git_parse_changes(0, git_commit_info($oldrev."..".$newrev)); + }); } return reverse @rets; @@ -860,23 +867,21 @@ sub rcs_preprevert ($) { # Examine changes from root of git repo, not from any subdir, # in order to see all changes. my ($subdir, $rootdir) = git_find_root(); - $git_dir=$rootdir; - - my @commits=git_commit_info($sha1, 1); - if (! @commits) { - error "unknown commit"; # just in case - } - - # git revert will fail on merge commits. Add a nice message. - if (exists $commits[0]->{parents} && - @{$commits[0]->{parents}} > 1) { - error gettext("you are not allowed to revert a merge"); - } + in_git_dir($rootdir, sub { + my @commits=git_commit_info($sha1, 1); + + if (! @commits) { + error "unknown commit"; # just in case + } - my @ret=git_parse_changes(1, @commits); + # git revert will fail on merge commits. Add a nice message. + if (exists $commits[0]->{parents} && + @{$commits[0]->{parents}} > 1) { + error gettext("you are not allowed to revert a merge"); + } - $git_dir=undef; - return @ret; + git_parse_changes(1, @commits); + }); } sub rcs_revert ($) { diff --git a/doc/bugs/Pandoc_plugin_and_UTF-8:_IkiWiki_and_UTF-8.mdwn b/doc/bugs/Pandoc_plugin_and_UTF-8:_IkiWiki_and_UTF-8.mdwn new file mode 100644 index 000000000..ab4dc8953 --- /dev/null +++ b/doc/bugs/Pandoc_plugin_and_UTF-8:_IkiWiki_and_UTF-8.mdwn @@ -0,0 +1,13 @@ +I'm writing [pykipandoc plugin](https://github.com/temmen/pykipandoc/blob/master/pykipandoc), that work at least as pandoc-iki. + +It works in compile mode, editing pages in web mode however results in + + pandoc: : hGetContents: invalid argument (Invalid or incomplete multibyte or wide character) + +I think that is because HTTP POST request building editpage doesn't correctly manage utf-8 contents: see strange chars in this form-data name="editcontent"? + + This principle has guided pandoc’s decisions in finding syntax for tables, footnotes, and other extensions. + +Please, any advice can be sent to [GitHub pykipandoc](https://github.com/temmen/pykipandoc) (some other info there on the [README](https://github.com/temmen/pykipandoc/blob/master/README.md)) and to [temmenel(at)gmail(dot)com](mailto:temmenel@gmail.com). + +¡Thank you all! diff --git a/doc/bugs/Pandoc_plugin_and_UTF-8:_IkiWiki_and_UTF-8/discussion.mdwn b/doc/bugs/Pandoc_plugin_and_UTF-8:_IkiWiki_and_UTF-8/discussion.mdwn new file mode 100644 index 000000000..9cdc9e746 --- /dev/null +++ b/doc/bugs/Pandoc_plugin_and_UTF-8:_IkiWiki_and_UTF-8/discussion.mdwn @@ -0,0 +1,23 @@ + # plugins to add to the default configuration + add_plugins => [qw{ + brokenlinks + map + orphans + pagecount + pagestats + tag + template + openid + attachment + edittemplate + remove + listdirectives + shortcut + pykipandoc}], + # plugins to disable + disable_plugins => [qw{passwordauth mdwn}], + +and + + # UTF-8 locale to use + locale => 'it_IT.UTF-8', diff --git a/doc/ikiwiki-makerepo.mdwn b/doc/ikiwiki-makerepo.mdwn index acb1211de..eccfb692a 100644 --- a/doc/ikiwiki-makerepo.mdwn +++ b/doc/ikiwiki-makerepo.mdwn @@ -4,19 +4,24 @@ ikiwiki-makerepo - check an ikiwiki srcdir into revision control # SYNOPSIS -ikiwiki-makerepo git|svn|monotone|darcs|cvs srcdir repository +ikiwiki-makerepo git|svn|monotone|darcs|cvs srcdir repo ikiwiki-makerepo bzr|mercurial srcdir # DESCRIPTION -`ikiwiki-makerepo` injects a `srcdir` directory, containing an ikiwiki wiki, -into a `repository` that it creates. The repository can be created using -any of a variety of revision control systems. +`ikiwiki-makerepo` injects an existing `srcdir` directory, containing +sources for an ikiwiki wiki, into revision control. It is rarely +run directly; consider using `ikiwiki -setup /etc/ikiwiki/wiki.setup` instead +to set up a wiki. -Note that for mercurial and bzr, the srcdir is converted into a -repository. There is no need to have a separate repository with mercurial -or bzr. +For git, the `repo` is created as a bare git repository, and the srcdir is +made into a clone of it. (monotone and darcs are similar.) + +For svn and cvs, the `repo` is the centralized repository, and the `srcdir` +is a checkout of it. + +For mercurial and bzr, the srcdir is the only repository set up. For darcs, the master repo's apply hook will be preconfigured to call a ikiwiki wrapper. @@ -24,13 +29,13 @@ ikiwiki wrapper. Note that for monotone, you are assumed to already have run "mtn genkey" to generate a key. - # EXAMPLE -`ikiwiki-makerepo git /var/www/wiki /home/user/wiki/` +`ikiwiki-makerepo git /srv/web/wiki /srv/git/wiki.git/` -The above command creates a new git repo in /home/user/wiki as well as a new git repo in the /var/www/wiki directory. -It then initializes the /home/user/wiki git repo and makes the /var/www/wiki a clone. +This creates a bare repository `/srv/git/wiki.git/`, +and sets up `/srv/web/wiki` to be a clone of it, committing +any files that already exist in that directory. # AUTHOR diff --git a/doc/rcs/cvs/discussion.mdwn b/doc/rcs/cvs/discussion.mdwn index 7df9e6b9f..fdd2fbfd4 100644 --- a/doc/rcs/cvs/discussion.mdwn +++ b/doc/rcs/cvs/discussion.mdwn @@ -172,4 +172,7 @@ Bugs found and fixed so far: > Merged to current head. --[[Joey]] * Return bounded output from `rcs_diff()` when asked, as the API states. - (6753235d98a3903364af26c0614106c47d93ae35 + (6753235d98a3903364af26c0614106c47d93ae35) +* When adding a text file under a name formerly tracked as binary, + fix CVS keyword substitution behavior by explicitly setting `-kkv`. + (e45175d5454cc72b261507260accb309f13b5e8b) diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn index 2f173677b..c3fb32b30 100644 --- a/doc/sandbox.mdwn +++ b/doc/sandbox.mdwn @@ -171,3 +171,5 @@ endmodule #<asd> This is simple enough for now [[sandbocen]] no? + + Do code tags work? diff --git a/doc/tips/html5.mdwn b/doc/tips/html5.mdwn index cb71c0887..b47c3fe39 100644 --- a/doc/tips/html5.mdwn +++ b/doc/tips/html5.mdwn @@ -14,7 +14,7 @@ The html5 support is still experimental, and may break in some browsers. No care is taken to add backwards compatibility hacks for browsers that are not html5 aware (like MSIE). If you want to include the javascript with those hacks, you can edit `page.tmpl` to do so. -[Dive Into HTML5](http://diveintohtml5.org/) is a good reference for +[Dive Into HTML5](http://diveintohtml5.info/) is a good reference for current compatability issues and workarounds with html5. And a remotely-loadable JS shiv for enabling HTML5 elements in IE is available through [html5shiv at Google Code](http://code.google.com/p/html5shiv/). diff --git a/doc/todo/recommend_libtext-markdown-discount_instead_of_depending.mdwn b/doc/todo/recommend_libtext-markdown-discount_instead_of_depending.mdwn index 736e34787..3c1446920 100644 --- a/doc/todo/recommend_libtext-markdown-discount_instead_of_depending.mdwn +++ b/doc/todo/recommend_libtext-markdown-discount_instead_of_depending.mdwn @@ -13,3 +13,8 @@ installable on a wheezy host. -- [[Jon]] > `libtext-markdown-discount-perl | libtext-markdown-perl', > then users will not automatically transition to using discount, which > I want them to do. [[done]] --[[Joey]] + +>> Sorry, I made a mistake in the phrasing of my original request. It's +>> not installable on *squeeze*, which is what I care about, rather than +>> *wheezy*. Someone needs to backport `libtext-markdown-discount` I +>> guess. — [[Jon]] |