]> sipb.mit.edu Git - ikiwiki.git/blobdiff - doc/todo.mdwn
web commit by joey: conflict test
[ikiwiki.git] / doc / todo.mdwn
index d4abc832d0a6f17fdb5005cd3c039fcab7e14146..71c0eb9727a8e74fc066b78dd63c55e60ace39dd 100644 (file)
@@ -2,6 +2,24 @@
 
 * Missing conflict detection, just overwrites changes and does not svn up
   first..
+
+  How to resolve this? Would this work when saving a page?
+
+  1. write changes to wc
+  2. svn up (so it can merge with any other changes)
+  3. check for conflicts
+  4. if conflicts, read in page w/conflict markers, svn revert page, and display resolution form
+  5. otherwise, svn commit
+  6. if commit fails, perhaps we were raced and there are conflicts still; so check for conflicts and if found, goto 2.
+
+  No, it won't work, because the other committer updates the srcdir when they make their commit, so svn does not get a chance to merge in the changes on update in step 2. Hmm..
+
+  Well, it could keep track of the version number of the page it started editing, and if it's changed during the edit, ask svn to merge all changes from that version number to head into the page after writing it out. Doing that without races with other svn committers seems tricky.
+
+  If each commit operated in a separate copy of the wc, that was created for the commit, the steps above would work. But it would be very expensive to make and maintain all those copies.
+
+  Note that unless we use `svn lock`, we really can't "warn" about concurrent edits and such the way other wikis do, which is ok, since that system sucks anyway. Using svn up for smart merging will be much nicer most of the time.
+   
 * Eventually, might want page deletion.
 * Eventually, might want file upload.
 
@@ -23,6 +41,12 @@ is built. (As long as all changes to all pages is ok.)
      explicitly named pages would be desirable.
   2. I think that since we're using Perl on the backend, being able to
      let users craft their own arbitrary regexes would be good.
+
+     Joey points out that this is actually a security hole, because Perl
+     regexes let you embed (arbitrary?) Perl expressions inside them.  Yuck!
+
+     It would also be good to be able to subscribe to all pages except discussion pages or the SandBox: `* !*/discussion !sandobx`, maybe --[[Joey]]
+
   3. Of course if you do that, you want to have form processing on the user
      page that lets them tune it, and probably choose literal or glob by
      default.
@@ -108,4 +132,10 @@ docs to use as a seed for new wikis.
 
 Might be nice to support automatically generating an index based on headers in a page, for long pages. The question is, how to turn on such an index?
 
+## page locking
+
+Some wikis will need the abiity to lock a page, or the whole wiki, so that only admins can edit them. Probably using the same globbing as for recentchanges mails to determine what to lock. 
+
+Probably it's ok if locking is only supported for web commits.
+
 ## [[Bugs]]