Subject: |
|
GIT "$Id$" Scripts, for setting source code "commit" timestamps. |
Date: |
|
Thu, 10 May 2012 12:09:42 -0600 |
From: |
|
Phil Weinstein |
To: CADSWES Software Group
Lee implemented perl scripts, and a (git) bash script which updates the old $Id$ cvs (rcs) tags in source files with a timestamp and login name. I'm going to use this before I do each commit, except in circumstances where I'm checking the same file in to both 6.2 (cvs) and 6.3 (git) -- I'll generally rely on the cvs timestamp in those cases.
To operate, in a Git Bash shell, you 'cd' to the top of your local repository, and execute the bash script
"update-id.sh" -- no parameters are needed. It effects your "staged" files (i.e. the files in the "index"), and looks for the $Id$ only within the first 10 lines of each staged file.
You can view text copies of the script at this URL, and I've put them aside also on the unified file system:
Lee and I tried hooking this up as an automatic action in GitExtensions, but didn't see a way of applying this to the desired directory. Specifically, we looked at this provision in GitExtensions: Settings >> Scripts >> addition of an item, initially executed manually, but ultimately on the "Before Commit" event. We attempted this script definition
(actually, I'm seeing a suspicious double-quote problem, but the problem we're concerned about is more fundamental):
C:\Windows\SysWOW64\cmd.exe /c ""C:\Program Files (x86)\Git\bin\sh.exe" -c "/c/Riverware/tools/git-idscript/update-id.sh"
|
So, for now, "update-id.sh" would need to be executed manually before a commit (if you choose to do this).
Locally, I've put the git-idscript directory, here:
C:\Riverware\tools\git-idscript
Bill, would it be reasonable to check these into /projects/riverware/tools/tools.cvs -- OR put them under /projects/riverware/windows/ ?
Phil
--- (end) ---