Closed
Bug 79457
Opened 25 years ago
Closed 25 years ago
$VERSION should automagically update
Categories
(Webtools Graveyard :: Mozbot, defect)
Tracking
(Not tracked)
VERIFIED
WONTFIX
People
(Reporter: jacob, Assigned: ian)
Details
Attachments
(2 files)
|
1.23 KB,
patch
|
Details | Diff | Splinter Review | |
|
1.23 KB,
patch
|
Details | Diff | Splinter Review |
Was doing some reading and discovered that if you included the string $Id$ in
your file, CVS will autmagically replace it with a string of information about
the file in question (RCS file, Rev Number, Last commit date, Last User to
commit). So, using that and a regular expression, I came up with a patch that
will automagically keep the $VERSION variable set to the CVS Rev level. CVS
updates this string anytime you commit, checkout, or update the file (obviously,
it only really changes on commit).
About the patch (forthcoming):
* I put the $Id$ line near the top of the file. While this can go anywhere, I
thought it made sence for it to be at the top.
* It didn't make sence to me why $VERSION was to to "Revision: x.x" and then 3
lines later changed to only contain x.x, so I didn't set the value when I
initialized $VERSION.
* In order to have CVS ignore my expression, I put a set of (?:) around the
letters "Id". The ?: makes the expression supress storing the value in an
integer variable for that set of ().
* Unfortunately, testing of this is a bit difficult until it's checked into
CVS... I did however test the expression with my local CVS and then used
copy and paste to put it into mozbot.pl
* The expression does grab more info than will probably ever be needed, but as
long as the info is there... :)
| Reporter | ||
Comment 1•25 years ago
|
||
| Reporter | ||
Comment 2•25 years ago
|
||
| Reporter | ||
Comment 3•25 years ago
|
||
Talked to Hixie on IRC and it seems there's also a $Revision$ tag that does
basically the same thing (but doesn't bring as much garbage with it). I guess
that's why it's first assigned "Revision: x.x" then 3 lines later changed to
simply x.x :)
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → WONTFIX
| Assignee | ||
Comment 4•25 years ago
|
||
hehe... why do you think that's the one place in the entire app where I used
the weird q$$ quote syntax instead of normal 'quotes'? ;-)
Status: RESOLVED → VERIFIED
| Reporter | ||
Comment 5•25 years ago
|
||
Actually, I did wonder about that, too... but now it all makes sense :)
Updated•20 years ago
|
QA Contact: timeless → mozbot
Updated•7 years ago
|
Product: Webtools → Webtools Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•