Reviewing merge request #2240: Site wikis

Adds wiki to each Site. The wiki index is accessible through SITE-BASE-URL/wiki, each page is SITE-BASE-URL/wiki/PAGENAME -same as the regular project wikis.

The wiki is a simple Grit object, not a full-on Repository model object (which would break a lot of assumptions about repos always having parent projects etc)

The repo is created the first time it's accessed for a given Site. This happens synchronously for now, as it's a one time operation per Site (do we have other reasons than perf/scaling for the usual asynch repo creation?)

Didn't end up creating any db-persisted wiki reference in the Site model: The wikis repo name/path is simply derived from Site title, e.g. 'SITENAME-site-wiki' (I assumed that each Site coexisting on a Gitorious installation has a unique name, here.)

Adds separate views for Site-wide wikis. Started looking into reusing/DRYing views and controllers between Site wiki pages and regular Pages, but seemed too fiddly - there's lots of little differences in the paths created etc so it seemed shared partials would be very small/many/parameterized?

Backend git clone/push/pull of the site wiki repos also handled and tested.

DRYed up the wiki "wikization" code into its own module in lib.

Only setting up minimal prereceive hook for the site wikis, to avoid normal post push event processing which doesnt apply for site wiki.

Note: discovered that wiki page->edit->preview is broken in mainline (after jQuery upgrade or something?). Will look into it and create separate merge request once I figure out how our js asset pipeline works. :)

Commits that would be merged:

Version 1
  • Version 1
  • 8625198
  • 6172d48
  • Adds wiki functionality to each Site. Created on demand on first use - synchronously for now (one-time operation on each site). Wiki repo name/path derived from Site title.

  • 9a90208
  • Neat-freak-tweak: forgot to update copyright notices in some files.

  • 81a460d
  • Tests completely emptied due to earlier DRYing of wiki content stuff into own module, so out they go.

  • d395e9f
  • Now persisting wiki git repo path in site model, also persisting default site.

  • 3df06bd
  • Fixed git push pull of wiki repos

  • c22ab36
  • Revert push processor tweak, will need to fix post push hook instead for site wiki git repo.

  • 23b8fa1
  • Now only setting up bare minimum of hooks for site git repo.

Showing 8625198-6172d48

Comments

→ State changed from Open to Merged

For the record: We reviewed this change at the office, and agreed that it would be better if the site wiki belonged to a site object persisted in the database. Sorry for not updating the MR with the summary of the review.

Add a new comment:

Login or create an account to post a comment

How to apply this merge request to your repository