I was trying to figure out how I'd detect changes to cvs within a given period. This is because we're looking for projects that need to be built by the CI server. So I was at first playing around with cvs command, sed, and other commands. Then it occurred to me that I was over thinking this problem. When you check something in, the files change in cvs.
The actual solution was a lot simpler than I was making it out to be at first. It was essentially this:
find /our/cvs/location -mtime -32 | grep -v -f projects_already_tracked.txt
Now, I put in a script that has variables, emails me if it finds anything and I call that in a cron, but that one liner is pretty much it. The only draw back is that this solution doesn't work for branches (if the project is on the "already tracked" list), but I think that's 95% there.
No comments:
Post a Comment