Does anyone know of a MediaWiki extension to provide revision control for uploaded images, say, via subversion?
On first thought it seems easy -- just let the /images folder be a subversion working copy, and run hooks to do "svn add/commit" on upload or "svn delete/commit" on deletion, providing the user comment as an svn comment. Maybe the hardest parts would be:
* The necessary "svn add" operations when new subfolders get created in /images. * Adding this extension to an existing wiki that hasn't been running it before (i.e., only some historical images will be in subversion) * Doing a "history" command on an image file, as opposed to the article in the Image: namespace... UI considerations....
A very simple, though incomplete, implementation, would be to run an svn commit (and associated adds & deletes) every N minutes on /images. That might yield 80% of the benefits without writing an extension.
Thoughts? DanB
On 30/11/2007, Daniel Barrett danb@vistaprint.com wrote:
Does anyone know of a MediaWiki extension to provide revision control for uploaded images, say, via subversion?
On first thought it seems easy -- just let the /images folder be a subversion working copy, and run hooks to do "svn add/commit" on upload or "svn delete/commit" on deletion, providing the user comment as an svn comment. Maybe the hardest parts would be:
The necessary "svn add" operations when new subfolders get
created in /images.
Adding this extension to an existing wiki that hasn't been
running it before (i.e., only some historical images will be in subversion)
Doing a "history" command on an image file, as opposed to the
article in the Image: namespace... UI considerations....
A very simple, though incomplete, implementation, would be to run an svn commit (and associated adds & deletes) every N minutes on /images. That might yield 80% of the benefits without writing an extension.
Does MediaWiki do that itself? There are file histories on all the [[Image:X]] pages, aren't those what you want?
Nope, uploads are not versioned. *Articles* in the Image: namespace *are* versioned. In other words, the text you write on an Image: page is versioned, but not the uploaded file.
Images sit in the /wiki/images folder. When you upload a new version, the old file is overwritten.
DanB
-----Original Message----- Does MediaWiki do that itself? There are file histories on all the [[Image:X]] pages, aren't those what you want?
Wait a minute... I appear to be mistaken.
Old images are indeed saved automatically... in /images/archive. I never noticed this before. Has this been the case for a long time? I don't remember it in Mediawiki 1.9.
DanB
Daniel Barrett wrote:
Wait a minute... I appear to be mistaken.
Old images are indeed saved automatically... in /images/archive. I never noticed this before. Has this been the case for a long time? I don't remember it in Mediawiki 1.9.
DanB
It has been. What has been done more recently is the support for deleted images storage (they were deleted forever) so now they can be undeleted. But it's disabled by default.
Hi - In order to reduce the burden of dealing with images on my MediaWiki site, I upload all my images to my Flickr account; then I use an interwiki link to point to the images. Saves me from dealing with backup/restore etc.
Just a thought. Jean-Lou PS: I have crafted PHING tasks that deal with SVN commands if you are interested.
On Nov 30, 2007 1:59 PM, Daniel Barrett danb@vistaprint.com wrote:
Does anyone know of a MediaWiki extension to provide revision control for uploaded images, say, via subversion?
On first thought it seems easy -- just let the /images folder be a subversion working copy, and run hooks to do "svn add/commit" on upload or "svn delete/commit" on deletion, providing the user comment as an svn comment. Maybe the hardest parts would be:
The necessary "svn add" operations when new subfolders get
created in /images.
Adding this extension to an existing wiki that hasn't been
running it before (i.e., only some historical images will be in subversion)
Doing a "history" command on an image file, as opposed to the
article in the Image: namespace... UI considerations....
A very simple, though incomplete, implementation, would be to run an svn commit (and associated adds & deletes) every N minutes on /images. That might yield 80% of the benefits without writing an extension.
Thoughts? DanB
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org