diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-07-27 00:54:15 -0400 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-07-27 00:54:15 -0400 |
commit | e1f7146041ab7dbbaf045a5da959d9086fbaae50 (patch) | |
tree | 3b7d8930244306381792d126e62809e80ffc42d5 /IkiWiki/Plugin | |
parent | bc3363beb767a82e3bdde2d038e7b678bd35f193 (diff) |
avoid clobbering example diffurl
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r-- | IkiWiki/Plugin/bzr.pm | 5 | ||||
-rw-r--r-- | IkiWiki/Plugin/git.pm | 5 | ||||
-rw-r--r-- | IkiWiki/Plugin/mercurial.pm | 5 | ||||
-rw-r--r-- | IkiWiki/Plugin/svn.pm | 5 | ||||
-rw-r--r-- | IkiWiki/Plugin/tla.pm | 5 |
5 files changed, 5 insertions, 20 deletions
diff --git a/IkiWiki/Plugin/bzr.pm b/IkiWiki/Plugin/bzr.pm index 39227cbae..99025a973 100644 --- a/IkiWiki/Plugin/bzr.pm +++ b/IkiWiki/Plugin/bzr.pm @@ -23,9 +23,6 @@ sub import { #{{{ } #}}} sub checkconfig () { #{{{ - if (! defined $config{diffurl}) { - $config{diffurl}=""; - } if (defined $config{bzr_wrapper} && length $config{bzr_wrapper}) { push @{$config{wrappers}}, { wrapper => $config{bzr_wrapper}, @@ -225,7 +222,7 @@ sub rcs_recentchanges ($) { #{{{ # Skip source name in renames $filename =~ s/^.* => //; - my $diffurl = $config{'diffurl'}; + my $diffurl = defined $config{'diffurl'} ? $config{'diffurl'} : ""; $diffurl =~ s/\[\[file\]\]/$filename/go; $diffurl =~ s/\[\[file-id\]\]/$fileid/go; $diffurl =~ s/\[\[r2\]\]/$info->{revno}/go; diff --git a/IkiWiki/Plugin/git.pm b/IkiWiki/Plugin/git.pm index b20793d86..5e302729e 100644 --- a/IkiWiki/Plugin/git.pm +++ b/IkiWiki/Plugin/git.pm @@ -26,9 +26,6 @@ sub import { #{{{ } #}}} sub checkconfig () { #{{{ - if (! defined $config{diffurl}) { - $config{diffurl}=""; - } if (! defined $config{gitorigin_branch}) { $config{gitorigin_branch}="origin"; } @@ -472,7 +469,7 @@ sub rcs_recentchanges ($) { #{{{ foreach my $detail (@{ $ci->{'details'} }) { my $file = $detail->{'file'}; - my $diffurl = $config{'diffurl'}; + my $diffurl = defined $config{'diffurl'} ? $config{'diffurl'} : ""; $diffurl =~ s/\[\[file\]\]/$file/go; $diffurl =~ s/\[\[sha1_parent\]\]/$ci->{'parent'}/go; $diffurl =~ s/\[\[sha1_from\]\]/$detail->{'sha1_from'}/go; diff --git a/IkiWiki/Plugin/mercurial.pm b/IkiWiki/Plugin/mercurial.pm index 738be8c32..d2c34fa6a 100644 --- a/IkiWiki/Plugin/mercurial.pm +++ b/IkiWiki/Plugin/mercurial.pm @@ -23,9 +23,6 @@ sub import { #{{{ } #}}} sub checkconfig () { #{{{ - if (! defined $config{diffurl}) { - $config{diffurl}=""; - } if (exists $config{mercurial_wrapper} && length $config{mercurial_wrapper}) { push @{$config{wrappers}}, { wrapper => $config{mercurial_wrapper}, @@ -199,7 +196,7 @@ sub rcs_recentchanges ($) { #{{{ } foreach my $file (split / /,$info->{files}) { - my $diffurl = $config{'diffurl'}; + my $diffurl = defined $config{diffurl} ? $config{'diffurl'} : ""; $diffurl =~ s/\[\[file\]\]/$file/go; $diffurl =~ s/\[\[r2\]\]/$info->{changeset}/go; diff --git a/IkiWiki/Plugin/svn.pm b/IkiWiki/Plugin/svn.pm index 05312a1ed..51683704c 100644 --- a/IkiWiki/Plugin/svn.pm +++ b/IkiWiki/Plugin/svn.pm @@ -22,9 +22,6 @@ sub import { #{{{ } #}}} sub checkconfig () { #{{{ - if (! defined $config{diffurl}) { - $config{diffurl}=""; - } if (! defined $config{svnpath}) { $config{svnpath}="trunk"; } @@ -318,7 +315,7 @@ sub rcs_recentchanges ($) { #{{{ $file=$1; } - my $diffurl=$config{diffurl}; + my $diffurl=defined $config{diffurl} ? $config{diffurl} : ""; $diffurl=~s/\[\[file\]\]/$file/g; $diffurl=~s/\[\[r1\]\]/$rev - 1/eg; $diffurl=~s/\[\[r2\]\]/$rev/g; diff --git a/IkiWiki/Plugin/tla.pm b/IkiWiki/Plugin/tla.pm index b95c1a522..6faaecccc 100644 --- a/IkiWiki/Plugin/tla.pm +++ b/IkiWiki/Plugin/tla.pm @@ -21,9 +21,6 @@ sub import { #{{{ } #}}} sub checkconfig () { #{{{ - if (! defined $config{diffurl}) { - $config{diffurl}=""; - } if (defined $config{tla_wrapper} && length $config{tla_wrapper}) { push @{$config{wrappers}}, { wrapper => $config{tla_wrapper}, @@ -215,7 +212,7 @@ sub rcs_recentchanges ($) { my @pages; foreach my $file (@paths) { - my $diffurl=$config{diffurl}; + my $diffurl=defined $config{diffurl} ? $config{diffurl} : ""; $diffurl=~s/\[\[file\]\]/$file/g; $diffurl=~s/\[\[rev\]\]/$change/g; push @pages, { |