Merge branch 'master' into cvs

master
Amitai Schlair 2012-02-07 08:33:32 -05:00
commit a5e84ae3fd
8 changed files with 91 additions and 35 deletions

View File

@ -9,7 +9,6 @@ use open qw{:utf8 :std};
my $sha1_pattern = qr/[0-9a-fA-F]{40}/; # pattern to validate Git sha1sums 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 $dummy_commit_msg = 'dummy commit'; # message to skip in recent changes
my $git_dir=undef;
sub import { sub import {
hook(type => "checkconfig", id => "git", call => \&checkconfig); 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 (&@) { sub safe_git (&@) {
# Start a child process safely without resorting to /bin/sh. # Start a child process safely without resorting to /bin/sh.
# Returns command output (in list content) or success state # Returns command output (in list content) or success state
@ -302,8 +312,6 @@ sub merge_past ($$$) {
return $conflict; return $conflict;
} }
{
my $prefix;
sub decode_git_file ($) { sub decode_git_file ($) {
my $file=shift; my $file=shift;
@ -325,7 +333,6 @@ sub decode_git_file ($) {
return decode("utf8", $file); return decode("utf8", $file);
} }
}
sub parse_diff_tree ($) { sub parse_diff_tree ($) {
# Parse the raw diff tree chunk and return the info hash. # 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 # (Also, if a subdir is involved, we don't want to chdir to
# it and only see changes in it.) # it and only see changes in it.)
# The pre-receive hook already puts us in the right place. # The pre-receive hook already puts us in the right place.
$git_dir="."; in_git_dir(".", sub {
push @rets, git_parse_changes(0, git_commit_info($oldrev."..".$newrev)); push @rets, git_parse_changes(0, git_commit_info($oldrev."..".$newrev));
$git_dir=undef; });
} }
return reverse @rets; return reverse @rets;
@ -860,23 +867,21 @@ sub rcs_preprevert ($) {
# Examine changes from root of git repo, not from any subdir, # Examine changes from root of git repo, not from any subdir,
# in order to see all changes. # in order to see all changes.
my ($subdir, $rootdir) = git_find_root(); my ($subdir, $rootdir) = git_find_root();
$git_dir=$rootdir; in_git_dir($rootdir, sub {
my @commits=git_commit_info($sha1, 1);
if (! @commits) {
error "unknown commit"; # just in case
}
my @commits=git_commit_info($sha1, 1); # git revert will fail on merge commits. Add a nice message.
if (! @commits) { if (exists $commits[0]->{parents} &&
error "unknown commit"; # just in case @{$commits[0]->{parents}} > 1) {
} error gettext("you are not allowed to revert a merge");
}
# git revert will fail on merge commits. Add a nice message. git_parse_changes(1, @commits);
if (exists $commits[0]->{parents} && });
@{$commits[0]->{parents}} > 1) {
error gettext("you are not allowed to revert a merge");
}
my @ret=git_parse_changes(1, @commits);
$git_dir=undef;
return @ret;
} }
sub rcs_revert ($) { sub rcs_revert ($) {

View File

@ -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!

View File

@ -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',

View File

@ -4,19 +4,24 @@ ikiwiki-makerepo - check an ikiwiki srcdir into revision control
# SYNOPSIS # SYNOPSIS
ikiwiki-makerepo git|svn|monotone|darcs|cvs srcdir repository ikiwiki-makerepo git|svn|monotone|darcs|cvs srcdir repo
ikiwiki-makerepo bzr|mercurial srcdir ikiwiki-makerepo bzr|mercurial srcdir
# DESCRIPTION # DESCRIPTION
`ikiwiki-makerepo` injects a `srcdir` directory, containing an ikiwiki wiki, `ikiwiki-makerepo` injects an existing `srcdir` directory, containing
into a `repository` that it creates. The repository can be created using sources for an ikiwiki wiki, into revision control. It is rarely
any of a variety of revision control systems. 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 For git, the `repo` is created as a bare git repository, and the srcdir is
repository. There is no need to have a separate repository with mercurial made into a clone of it. (monotone and darcs are similar.)
or bzr.
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 For darcs, the master repo's apply hook will be preconfigured to call a
ikiwiki wrapper. ikiwiki wrapper.
@ -24,13 +29,13 @@ ikiwiki wrapper.
Note that for monotone, you are assumed to already have run "mtn genkey" Note that for monotone, you are assumed to already have run "mtn genkey"
to generate a key. to generate a key.
# EXAMPLE # 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. This creates a bare repository `/srv/git/wiki.git/`,
It then initializes the /home/user/wiki git repo and makes the /var/www/wiki a clone. and sets up `/srv/web/wiki` to be a clone of it, committing
any files that already exist in that directory.
# AUTHOR # AUTHOR

View File

@ -172,4 +172,7 @@ Bugs found and fixed so far:
> Merged to current head. --[[Joey]] > Merged to current head. --[[Joey]]
* Return bounded output from `rcs_diff()` when asked, as the API states. * 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)

View File

@ -171,3 +171,5 @@ endmodule
#<asd> #<asd>
This is simple enough for now [[sandbocen]] no? This is simple enough for now [[sandbocen]] no?
Do code tags work?

View File

@ -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 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 are not html5 aware (like MSIE). If you want to include the javascript with
those hacks, you can edit `page.tmpl` to do so. 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 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/). JS shiv for enabling HTML5 elements in IE is available through [html5shiv at Google Code](http://code.google.com/p/html5shiv/).

View File

@ -13,3 +13,8 @@ installable on a wheezy host. -- [[Jon]]
> `libtext-markdown-discount-perl | libtext-markdown-perl', > `libtext-markdown-discount-perl | libtext-markdown-perl',
> then users will not automatically transition to using discount, which > then users will not automatically transition to using discount, which
> I want them to do. [[done]] --[[Joey]] > 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]]