[development] Managing node revisions with a backend like
derek at dwwright.net
Sat Feb 25 00:58:19 UTC 2006
I posted this topic as a development forum on drupal.org:
Someone suggested I send it to this list for additional input and
Why do we reinvent the wheel of doing revision control when we could
(possibly) just use another revision control system to manage the
change history of node bodies? We're currently storing the entire
body for each revision, which is wasteful, especially if the size of
the node is large, or it's changing frequently. For example, if I was
going to import the entire manual for the software project I develop
on my day job into a drupal site, a) I'd definitely need to save
revision history and b) that history would grow enormous if the full
text of each page was saved on every change.
One (complicated) option would be to store diffs in the node_revision
table, just like most revision control systems do. A (maybe) better
option would be to just store the name of a subversion tag (or
equivalent). We could still cache the full text of the currently
active revision in the drupal DB (for performance and minimizing
changes to other parts of the drupal code base), but we could split
off the work of maintaining the whole revision ourselves and use a
much more powerful tool for the job. Then, it'd be trivial to add
much better revision support within drupal, for example a "blame
annotated" view of a node, powerful diff viewing across revisions, and
perhaps even something crazy like branching and merging node text
(possibly integrated with taxonomy?).
For more info, check out the forum node I mentioned above.
I'd be willing to help make this a reality, but I wanted to know:
a) Is there some obvious reason this hasn't been done (other than lack
of developer time)?
b) What's the right way to go about this? I'm fairly new to drupal,
especially the core code. There seem to be numerous layers of
abstraction for everything, so part of me (wishfully?) thinks
there's some obvious layer to make this change and very little else
would need to be modified. Am I being crazy? ;)
c) Does anyone else think this would be a good idea, worth doing, etc?
p.s. It seems like the forum topic would be a better place for this
discussion, but I'm new to this list so I don't know if people prefer
talking about this via email, instead....
More information about the development