aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/mercurial.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2008-12-17 15:22:16 -0500
committerJoey Hess <joey@gnu.kitenet.net>2008-12-17 15:22:16 -0500
commitbb93fccf0690344aa77f9538a508959a6de09847 (patch)
tree2381c9c097e553f384b6136be1322ec205695119 /IkiWiki/Plugin/mercurial.pm
parent985b229be632126f376aaad7bd354d0d7d014464 (diff)
downloadikiwiki-bb93fccf0690344aa77f9538a508959a6de09847.tar
ikiwiki-bb93fccf0690344aa77f9538a508959a6de09847.tar.gz
Coding style change: Remove explcit vim folding markers.
Diffstat (limited to 'IkiWiki/Plugin/mercurial.pm')
-rw-r--r--IkiWiki/Plugin/mercurial.pm52
1 files changed, 26 insertions, 26 deletions
diff --git a/IkiWiki/Plugin/mercurial.pm b/IkiWiki/Plugin/mercurial.pm
index 7aceebcdb..82423286d 100644
--- a/IkiWiki/Plugin/mercurial.pm
+++ b/IkiWiki/Plugin/mercurial.pm
@@ -7,7 +7,7 @@ use IkiWiki;
use Encode;
use open qw{:utf8 :std};
-sub import { #{{{
+sub import {
hook(type => "checkconfig", id => "mercurial", call => \&checkconfig);
hook(type => "getsetup", id => "mercurial", call => \&getsetup);
hook(type => "rcs", id => "rcs_update", call => \&rcs_update);
@@ -20,18 +20,18 @@ sub import { #{{{
hook(type => "rcs", id => "rcs_recentchanges", call => \&rcs_recentchanges);
hook(type => "rcs", id => "rcs_diff", call => \&rcs_diff);
hook(type => "rcs", id => "rcs_getctime", call => \&rcs_getctime);
-} #}}}
+}
-sub checkconfig () { #{{{
+sub checkconfig () {
if (exists $config{mercurial_wrapper} && length $config{mercurial_wrapper}) {
push @{$config{wrappers}}, {
wrapper => $config{mercurial_wrapper},
wrappermode => (defined $config{mercurial_wrappermode} ? $config{mercurial_wrappermode} : "06755"),
};
}
-} #}}}
+}
-sub getsetup () { #{{{
+sub getsetup () {
return
plugin => {
safe => 0, # rcs plugin
@@ -65,9 +65,9 @@ sub getsetup () { #{{{
safe => 1,
rebuild => 1,
},
-} #}}}
+}
-sub mercurial_log ($) { #{{{
+sub mercurial_log ($) {
my $out = shift;
my @infos;
@@ -111,20 +111,20 @@ sub mercurial_log ($) { #{{{
close $out;
return @infos;
-} #}}}
+}
-sub rcs_update () { #{{{
+sub rcs_update () {
my @cmdline = ("hg", "-q", "-R", "$config{srcdir}", "update");
if (system(@cmdline) != 0) {
warn "'@cmdline' failed: $!";
}
-} #}}}
+}
-sub rcs_prepedit ($) { #{{{
+sub rcs_prepedit ($) {
return "";
-} #}}}
+}
-sub rcs_commit ($$$;$$) { #{{{
+sub rcs_commit ($$$;$$) {
my ($file, $message, $rcstoken, $user, $ipaddr) = @_;
if (defined $user) {
@@ -149,7 +149,7 @@ sub rcs_commit ($$$;$$) { #{{{
}
return undef; # success
-} #}}}
+}
sub rcs_commit_staged ($$$) {
# Commits all staged changes. Changes can be staged using rcs_add,
@@ -159,28 +159,28 @@ sub rcs_commit_staged ($$$) {
error("rcs_commit_staged not implemented for mercurial"); # TODO
}
-sub rcs_add ($) { # {{{
+sub rcs_add ($) {
my ($file) = @_;
my @cmdline = ("hg", "-q", "-R", "$config{srcdir}", "add", "$config{srcdir}/$file");
if (system(@cmdline) != 0) {
warn "'@cmdline' failed: $!";
}
-} #}}}
+}
-sub rcs_remove ($) { # {{{
+sub rcs_remove ($) {
my ($file) = @_;
error("rcs_remove not implemented for mercurial"); # TODO
-} #}}}
+}
-sub rcs_rename ($$) { # {{{
+sub rcs_rename ($$) {
my ($src, $dest) = @_;
error("rcs_rename not implemented for mercurial"); # TODO
-} #}}}
+}
-sub rcs_recentchanges ($) { #{{{
+sub rcs_recentchanges ($) {
my ($num) = @_;
my @cmdline = ("hg", "-R", $config{srcdir}, "log", "-v", "-l", $num,
@@ -225,13 +225,13 @@ sub rcs_recentchanges ($) { #{{{
}
return @ret;
-} #}}}
+}
-sub rcs_diff ($) { #{{{
+sub rcs_diff ($) {
# TODO
-} #}}}
+}
-sub rcs_getctime ($) { #{{{
+sub rcs_getctime ($) {
my ($file) = @_;
# XXX filename passes through the shell here, should try to avoid
@@ -251,6 +251,6 @@ sub rcs_getctime ($) { #{{{
my $ctime = str2time($log[0]->{"date"});
return $ctime;
-} #}}}
+}
1