[contributions(DRUPAL-5--2):jpetso] /modules/versioncontrol/commitlog commitlog.module /modules/versioncontrol versioncontrol-backend.inc versioncontrol.install versioncontrol.module /modules/versioncontrol/versioncontrol_fakevcs versioncontrol_fakevcs.module
User: jpetso Branch: DRUPAL-5--2 Date: Thu, 25 Sep 2008 22:26:53 +0000 Modified files: /modules/versioncontrol/commitlog commitlog.module /modules/versioncontrol versioncontrol-backend.inc versioncontrol.install versioncontrol.module /modules/versioncontrol/versioncontrol_fakevcs versioncontrol_fakevcs.module Log message: jpetso saves the world *again*! Here comes the destruction of the Last Difficult Problem that had to be solved for the Version Control API's 2.x branch. Like, from an API design point of view. Everything from here on will be a piece of cake, so to speak. (Of course, there's still lots of work to do.) Changes? You bet. - Renamed the versioncontrol_add_whatever() function to versioncontrol_fetch_whatever(), as the old names just didn't sound intuitively at all. Especially when introducing versioncontrol_add_item_revision_id()... NOT. Everything that loads data into objects (or rather, arrays) and modifies those rather than returning them as a result is "fetch" now. Such as the versioncontrol_fetch_item_revision_id() helper function. - Introduced versioncontrol_fetch_successor_items(). The opposite of versioncontrol_fetch_source_items(). - Major strike #1: Implemented versioncontrol_get_item_history() in the API module! That means that a) it works for all backends even if they don't implement on-the-fly file history parsers, and b) we can assume bearable performance. The current implementation is the naive one going from item to item, but the potential for large performance gains is there. Oh, and c) you can limit the number of returned items. Yay. - Major strike #2: Got rid of the potential function overkill for backends to retrieve selected labels. It's now two functions only - [versioncontrol_backend]_get_selected_label_for_{operation,other_item}() - and stuffs all the retrievals with related or non-related items into that "from other item" function. Most important achievement, keeps the API somewhat usable (although still complex, but that's probably the price of abstraction and code reuse and stuff). It struck me during lunch! (...) - Renamed versioncontrol_get_commits() to versioncontrol_get_commit_operations(), for consistency. - Plus, as usual, a few fixes that I already forgot again. So all the hard API problems are solved, I think. The remaining ones are either relatively easy or stupid porting work, like for Commit Log. Ok, so much for saving the world, now on to the boring non-VCS stuff again... Links: http://cvs.drupal.org/diff.php?path=contributions/modules/versioncontrol/com... http://cvs.drupal.org/diff.php?path=contributions/modules/versioncontrol/ver... http://cvs.drupal.org/diff.php?path=contributions/modules/versioncontrol/ver... http://cvs.drupal.org/diff.php?path=contributions/modules/versioncontrol/ver... http://cvs.drupal.org/diff.php?path=contributions/modules/versioncontrol/ver...
participants (1)
-
drupal-cvs@drupal.org