]> sipb.mit.edu Git - ikiwiki.git/blobdiff - doc/todo/darcs.mdwn
new gitweb url form fixes some bugs too
[ikiwiki.git] / doc / todo / darcs.mdwn
index f383514a2cea6e9d8cd80505c6fca8c765d53c11..882a41379dde48ebebc2dbb4f3c4b524521a4ae1 100644 (file)
@@ -219,14 +219,14 @@ This is my ([bma](bma@bmalee.eu)) darcs.pm - it's messy (my Perl isn't up to muc
        
        package IkiWiki;
        
-       sub rcs_update () { #{{{
+       sub rcs_update () {
                # Do nothing - there's nowhere to update *from*.
-       } #}}}
+       }
        
-       sub rcs_prepedit ($) { #{{{
-       } #}}}
+       sub rcs_prepedit ($) {
+       }
        
-       sub rcs_commit ($$$;$$) { #{{{
+       sub rcs_commit ($$$;$$) {
                my ($file, $message, $rcstoken, $user, $ipaddr) = @_;
        
                # $user should probably be a name and an email address, by darcs
@@ -257,16 +257,16 @@ This is my ([bma](bma@bmalee.eu)) darcs.pm - it's messy (my Perl isn't up to muc
        
                return undef; # success
                
-       sub rcs_add ($) { # {{{
+       sub rcs_add ($) {
                my ($file) = @_;
        
                my @cmdline = ("darcs", "add", "--repodir", "$config{srcdir}", "-a", "-q", "$file");
                if (system(@cmdline) != 0) {
                        warn "'@cmdline' failed: $!";
                }
-       } #}}}
+       }
        
-       sub rcs_recentchanges ($) { #{{{
+       sub rcs_recentchanges ($) {
                # TODO: This is horrible code. It doesn't work perfectly, and uses regexes
                # rather than parsing Darcs' XML output.
                my $num=shift;
@@ -314,15 +314,15 @@ This is my ([bma](bma@bmalee.eu)) darcs.pm - it's messy (my Perl isn't up to muc
                                }
                }
                return @ret;
-       } #}}}
+       }
        
-       sub rcs_notify () { #{{{
+       sub rcs_notify () {
                # TODO
-       } #}}}
+       }
        
-       sub rcs_getctime ($) { #{{{
+       sub rcs_getctime ($) {
                error gettext("getctime not implemented");
-       } #}}}
+       }
        
        1
 
@@ -490,6 +490,9 @@ And here's yet another one, including an updated `ikiwiki-makerepo`. :)
 
 <http://khjk.org/~pesco/ikiwiki-darcs/> (now a darcs repo)
 
+> Note that there's a 'darcs' branch in git that I'm keeping a copy of your
+> code in. Just in case. :-)
+
 I've taken all the good stuff from the above and added the missing hooks. The code hasn't seen a lot of testing, so some bugs are likely yet to surface. Also, I'm not experienced with perl and don't know where I should have used the function `possibly_foolish_untaint`.
 
 Regarding the repository layout: There are two darcs repositories. One is the `srcdir`, the other we'll call `master`.
@@ -539,4 +542,10 @@ Regarding the repository layout: There are two darcs repositories. One is the `s
 > correctly that "adding" a file that's already in the repo should just be a no-op?
 > --pesco
 
+>> It should result in the new file contents being committed by
+>> `rcs_commit_staged`. For some revision control systems, which
+>> automatically commit modifications, it would be a no-op. --[[Joey]]
+
+>>> Done. --pesco
+
 [[!tag patch]]