diff options
Diffstat (limited to 'IkiWiki/Rcs')
-rw-r--r-- | IkiWiki/Rcs/Stub.pm | 6 | ||||
-rw-r--r-- | IkiWiki/Rcs/bzr.pm | 6 | ||||
-rw-r--r-- | IkiWiki/Rcs/git.pm | 8 | ||||
-rw-r--r-- | IkiWiki/Rcs/mercurial.pm | 6 | ||||
-rw-r--r-- | IkiWiki/Rcs/monotone.pm | 6 | ||||
-rw-r--r-- | IkiWiki/Rcs/svn.pm | 17 | ||||
-rw-r--r-- | IkiWiki/Rcs/tla.pm | 6 |
7 files changed, 55 insertions, 0 deletions
diff --git a/IkiWiki/Rcs/Stub.pm b/IkiWiki/Rcs/Stub.pm index 6b69e65dc..375591c96 100644 --- a/IkiWiki/Rcs/Stub.pm +++ b/IkiWiki/Rcs/Stub.pm @@ -33,6 +33,12 @@ sub rcs_add ($) { # prepare for it to be checked in when rcs_commit is called. } +sub rcs_remove ($) { + # Remove a file. The filename is relative to the root of the srcdir. + # Note that this should not check the removal in, it should only + # prepare for it to be checked in when rcs_commit is called. +} + sub rcs_recentchanges ($) { # Examine the RCS history and generate a list of recent changes. # The data structure returned for each change is: diff --git a/IkiWiki/Rcs/bzr.pm b/IkiWiki/Rcs/bzr.pm index 0dc456de2..ca60190ea 100644 --- a/IkiWiki/Rcs/bzr.pm +++ b/IkiWiki/Rcs/bzr.pm @@ -89,6 +89,12 @@ sub rcs_add ($) { # {{{ } } #}}} +sub rcs_remove ($) { # {{{ + my ($file) = @_; + + error("rcs_remove not implemented for bzr"); # TODO +} #}}} + sub rcs_recentchanges ($) { #{{{ my ($num) = @_; diff --git a/IkiWiki/Rcs/git.pm b/IkiWiki/Rcs/git.pm index 7fb612a39..b02b286bd 100644 --- a/IkiWiki/Rcs/git.pm +++ b/IkiWiki/Rcs/git.pm @@ -348,6 +348,14 @@ sub rcs_add ($) { # {{{ run_or_cry('git', 'add', $file); } #}}} +sub rcs_remove ($) { # {{{ + # Remove file from archive. + + my ($file) = @_; + + run_or_cry('git', 'rm', '-f', $file); +} #}}} + sub rcs_recentchanges ($) { #{{{ # List of recent changes. diff --git a/IkiWiki/Rcs/mercurial.pm b/IkiWiki/Rcs/mercurial.pm index bfe6ba49c..1bfcf6242 100644 --- a/IkiWiki/Rcs/mercurial.pm +++ b/IkiWiki/Rcs/mercurial.pm @@ -101,6 +101,12 @@ sub rcs_add ($) { # {{{ } } #}}} +sub rcs_remove ($) { # {{{ + my ($file) = @_; + + error("rcs_remove not implemented for mercurial"); # TODO +} #}}} + sub rcs_recentchanges ($) { #{{{ my ($num) = @_; diff --git a/IkiWiki/Rcs/monotone.pm b/IkiWiki/Rcs/monotone.pm index ce4a2a3ed..948edac0a 100644 --- a/IkiWiki/Rcs/monotone.pm +++ b/IkiWiki/Rcs/monotone.pm @@ -370,6 +370,12 @@ sub rcs_add ($) { #{{{ } } #}}} +sub rcs_remove ($) { # {{{ + my $file = shift; + + error("rcs_remove not implemented for monotone"); # TODO +} #}}} + sub rcs_recentchanges ($) { #{{{ my $num=shift; my @ret; diff --git a/IkiWiki/Rcs/svn.pm b/IkiWiki/Rcs/svn.pm index 6a822e896..6c15c2ca9 100644 --- a/IkiWiki/Rcs/svn.pm +++ b/IkiWiki/Rcs/svn.pm @@ -134,6 +134,23 @@ sub rcs_add ($) { #{{{ } } #}}} +sub rcs_remove ($) { #{{{ + # filename is relative to the root of the srcdir + my $file=shift; + + if (-d "$config{srcdir}/.svn") { + my $parent=dirname($file); + while (! -d "$config{srcdir}/$parent/.svn") { + $file=$parent; + $parent=dirname($file); + } + + if (system("svn", "rm", "--force", "--quiet", "$config{srcdir}/$file") != 0) { + warn("svn rm failed\n"); + } + } +} #}}} + sub rcs_recentchanges ($) { #{{{ my $num=shift; my @ret; diff --git a/IkiWiki/Rcs/tla.pm b/IkiWiki/Rcs/tla.pm index e7fed9ad8..29dbd092a 100644 --- a/IkiWiki/Rcs/tla.pm +++ b/IkiWiki/Rcs/tla.pm @@ -88,6 +88,12 @@ sub rcs_add ($) { #{{{ } } #}}} +sub rcs_remove ($) { # {{{ + my $file = shift; + + error("rcs_remove not implemented for tla"); # TODO +} #}}} + sub rcs_recentchanges ($) { my $num=shift; my @ret; |