Menu

Trac Commit Log


Commit Date  
[r7338] by cboos

WikiRename: added a functional test for the wiki rename operation

- create wiki page with one attachment
- try a few pathological rename (to itself, to existing page)
- do a real rename, leaving a redirection page in place
- check for the attachment move, for the redirection page
- do another real rename, this time without redirection
- check the original page is gone

2008-07-08 18:31:26 Tree
[r7337] by cboos

WikiRename (rebasing r6424, r6497): add the possibility to leave a redirection page for pointing to the renamed page.

This is admittedly a poor way to fix dangling links, but perhaps the most effective one in the current state, as it's not really possible for now to go back to all the wiki texts (on wiki pages, tickets, ...) that may contain a link to the old page and update them.

2008-07-08 13:44:00 Tree
[r7336] by cboos

WikiRename (rebasing r6423, r6496): add a simple user interface for renaming wiki pages.

The interface was modeled after the one for deleting wiki pages, i.e. with a confirmation page that asks for the additional details.

2008-07-08 13:33:35 Tree
[r7335] by cboos

WikiRename: added unit-test for `WikiPage.rename`.

- set correctly the `WikiPage.name` property after the rename
- add `old_name` parameter to `page_renamed` listener method

2008-07-08 13:23:16 Tree
[r7334] by cboos

WikiRename (rebasing r6422): add a method to the model for renaming a wiki page in-place.

New methods:
- `WikiPage.rename(self, new_name, db=None)`
- `Attachment.reparent_all(cls, env, old_realm, old_id, new_realm, new_id, db)`

Implementation note for `Attachment.reparent_all`: we move files individually instead of the whole folder, because:
1. this will work even if the new resource already exists (e.g. for merges)
2. it's complex when the new resource is a sub-folder if the old one
3. it's simply not possible in the general case (e.g. when the new page doesn'titself exist, but there are already sub-folders)

Note also that it's because of 3. (sub-folders may exists) that we don't remove the old attachment folder after the reparent.

2008-07-08 12:52:01 Tree
[r7333] by cboos

WikiRename (rebasing r6421): simplify transaction handling in the Wiki model

The !WikiPage public API is not modified. A helper `transaction` function is used to factor out the `handle_ta` business. Its usage is very simple:
- if the function is given a database connection, it will simply execute the callback as part of another transaction,
- if the function has to retrieve a new database connection, it takes responsibility to either `commit` the changes performed by the callback or to `rollback` them, if any exception was raised.

TODO: similar changes could apply to `trac.ticket.model`

2008-07-08 12:48:18 Tree
[r7332] by cboos

Recreate WikiRename branch for rebasing log:sandbox/wiki-rename@...

2008-07-08 11:51:07 Tree
[r7331] by cboos

0.12dev: merged revisions r7320 and r7327 from 0.11-stable (r7325 was already merged), via svnmerge.

2008-07-08 11:49:02 Tree
[r7330] by cboos

Rebase WikiRename branch

2008-07-08 11:44:00 Tree
[r7329] by cboos

Retiring old [VcRefactoring/Controller] branch

2008-07-08 10:54:59 Tree
Older >
MongoDB Logo MongoDB