Closed (fixed)
Project:
CVS deploy
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
11 Jul 2007 at 16:29 UTC
Updated:
31 Jan 2008 at 20:15 UTC
Jump to comment: Most recent file
As a way to make cvs_deploy work more nicely with update(_status?) module, it'd be great if we could come up with a reasonable fake value for the datestamp that's supposed to be in the .info file when you're deploying from a branch, not an official release tag. I think we could just stat CVS/Entries and check the mtime (modification time), and that'd be a reasonable approximation. Might be a little funky, but I think it'd work.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | cvs_deploy_system_info_alter.patch_1.txt | 4.82 KB | dww |
| #2 | cvs_deploy_system_info_alter.patch.txt | 3.87 KB | dww |
| #1 | cvs_deploy_datestamp.patch.txt | 2.98 KB | dww |
Comments
Comment #1
dwwHere's an initial patch for this. The bummer is that the last update to a given project could be in a subdir, instead of in the root module directory. For example, if someone happens to update a po/* file, and that's the last thing you grabbed via cvs update, the current patch will miss it, since it only calls stat() on [module_dir]/CVS/Entries. It should really do some more expensive operation to walk through the whole directory tree searching for CVS directories, stat all of the */CVS/Entries files it can find, and use the maximum mtime as the project's datestamp.
But, this patch is a start, so I wanted to post it here. Note that it requires a change to update_status so that we have a chance to alter the datestamp, too. In D6 this won't be necessary, since we already get a chance to alter the entire .info array.
Comment #2
dwwAfter discussion with merlinofchaos, we agreed it'd be better to just have update_status invoke a single hook that lets other modules alter any part of the .info array (just like D6 core). This way, it'll be easy to add code later to alter the 'project' attribute, if necessary.
This still doesn't do the smart stuff I mentioned above about recursively finding the most recently modified CVS/Entries file in a given directory tree, but at least the update_status code is cleaner now, and everything else is working nicely.
Comment #3
dwwNow with recursion. ;) Seems to be working great given my local testing.
Comment #4
webchicksubscribing.
Comment #5
jjeff commentedalso subscribing... and testing...
Comment #6
dwwAfter some further testing, committed the API change to DRUPAL-5--2 of update_status (http://drupal.org/cvs?commit=96179), committed this rest of this to DRUPAL-5 of cvs_deploy (http://drupal.org/cvs?commit=96181), ported to 6.x, and committed that to HEAD (http://drupal.org/cvs?commit=96184). Yay.
Now progress can be made on http://drupal.org/node/184664 and http://drupal.org/node/211259 ...
Comment #7
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.