X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/8e0ecb0ebdfb0f02f4bedb712a8f4749e1dfb4f9..32be1324a904ebe97e1a3336be9e6fd05be92a69:/doc/patchqueue/move_page.mdwn diff --git a/doc/patchqueue/move_page.mdwn b/doc/patchqueue/move_page.mdwn index e3109f062..5329a7a3b 100644 --- a/doc/patchqueue/move_page.mdwn +++ b/doc/patchqueue/move_page.mdwn @@ -3,6 +3,16 @@ This is my first cut at a feature like that requested in [[todo/Moving_Pages]]. A bunch of obvious shortcomings exist: * I'm not sure all the untaints are safe. + + > I've looked them over. + > + > * one is safe because it only allows existing page names through. + > * one is safe because it follows the example of editpage in calling + > titlepage to sanitize. + > * the last one follows the example of rcs_commit in svn.pm, so I + > hope it's safe.. + > + > --Ethan * No precautions whatsoever are made to protect against race conditions or failures in the rcs\_move function. * movepage.tmpl doesn't exist yet. @@ -26,6 +36,43 @@ Anyhow, here's the patch, for whatever good it does. > implement a move operation -- falling back to an add and delete. > --[[Joey]] +Hmm. Shouldn't that be done on a by-RCS basis, though? (i.e. implemented +by backends in the `rcs_move` function) + +> Probably, yes, but maybe there's a way to avoid duplicating code for that +> in several of them. + +Also, how should ikiwiki react if a page is edited (say, by another user) +before it is moved? Bail, or shrug and proceed? + +> The important thing is to keep in mind that the page could be edited, +> moved, deleted, etc in between the user starting the move and the move +> happening. So, the code really needs to deal with all of these cases in +> some way. It seems fine to me to go ahead with the move even if the page +> was edited. If the page was deleted or moved, it seems reasonable to exit +> with an error. +> +> Another set of issues exists if a separate web user is trying to edit the +> page at the same time. We'll have to make sure that something sane +> happens there; will ikiwiki re-add the moved page under the old name if +> the user saves their edit after the move? Could be confusing.. I think it +> probably errors out instead, but I'm not sure. Of course, this is an +> issue that occurs if the page is moved using a regular svn commit too, so +> it's not really your concern in a way. :-) + +>> I wrote a patch to address this -- it's in [[disappearing_pages]]. --Ethan + +Could you elaborate on [[commit-internals]]? Can I assume that ikiwiki's +working copy W will always reflect a revision of the master copy M? +(That is, nobody changes W and leaves it uncommitted.) I would guess +probably not; a user probably expects that if he starts editing W it +won't get randomly committed by web user actions. But then looking at +the svn backend, it looks like if I edit foo.mdwn, don't commit, and then +a web user makes different changes, my changes get wiped out. So does +W "belong" to ikiwiki? --Ethan + +> The working copy used by ikiwiki belongs to ikiwiki; it should not be +> edited directly. diff -urx .svn ikiwiki/IkiWiki/CGI.pm ikiwiki-new/IkiWiki/CGI.pm --- ikiwiki/IkiWiki/CGI.pm 2007-01-04 03:52:47.000000000 -0800