Re: [Fwd: Q on keyword substitution]

2005-01-11 Thread Frederic Brehm

Pierre Asselin wrote:
Well, suppose you edit the file and add a line with a '$Rvision' marker,
misspelled.  You commit that, the bad marker goes in the repository.  You
check out or update, the keyword is not expanded/clobbered because of
the spelling error.  The information you need is still present in the
repository and you can still see it, e.g. with 'cvs annotate', but
someone will have to edit the file and manually correct the bad line.
If you are going to depend on the expansion of a keyword, 
then your process should specify a check that the keyword is 
expanded correctly immediately after a commit. Your local 
file will have the expansion. If it doesn't, then correct 
the misspelling and try again.

My suggestion was to use a spelling that can be checked by a utility,
and to enforce that check in a commitinfo hook.
You can do that anyway. Just make a commitinfo hook that 
tries to find the string '$Revision: ' in the file. Of 
course, that leads to extra configuration management work 
because you probably want to exclude some files from the 
check. That, of course, can lead to more errors.

You still need pay attention to process.
Fred
--
Frederic W. Brehm, Sarnoff Corporation, http://www.sarnoff.com/
___
Info-cvs mailing list
Info-cvs@gnu.org
http://lists.gnu.org/mailman/listinfo/info-cvs


Re: [Fwd: Q on keyword substitution]

2005-01-10 Thread Pierre Asselin
jsWalter [EMAIL PROTECTED] wrote:

  It's -kv, not '-ko'.  '-kv' removes the keyword (and the bracketing
  $$) and leaves only the value.

 OK, but doesn't this strip ALL the keywords?

Yes.  It's all or nothing.


  and you have to be *very* careful with the spelling of '$Revision:
  $' when you add a new line in the file you're editing.  [ ... ]

 OK, you lost me here.

Well, suppose you edit the file and add a line with a '$Rvision' marker,
misspelled.  You commit that, the bad marker goes in the repository.  You
check out or update, the keyword is not expanded/clobbered because of
the spelling error.  The information you need is still present in the
repository and you can still see it, e.g. with 'cvs annotate', but
someone will have to edit the file and manually correct the bad line.

My suggestion was to use a spelling that can be checked by a utility,
and to enforce that check in a commitinfo hook.

-- 
pa at panix dot com
___
Info-cvs mailing list
Info-cvs@gnu.org
http://lists.gnu.org/mailman/listinfo/info-cvs


Re: [Fwd: Q on keyword substitution]

2005-01-09 Thread jsWalter

 jsWalter [EMAIL PROTECTED] wrote:
 Try 'cvs admin -kv'.  Try it on a test repository first.


 Well, doesn't this tell CVS not to proces *any* keywords on this
 particular file?

 It's -kv, not '-ko'.  '-kv' removes the keyword (and the bracketing
 $$) and leaves only the value.

OK, but doesn't this strip ALL the keywords?


 and you have to be *very* careful with the spelling of '$Revision:
 $' when you add a new line in the file you're editing.  I recommend
 ending it with a colon and space before the dollar, as above, so you
 can verify the presence of the keyword with the RCS command 'ident'
 before you commit into cvs.  Maybe even in a commitinfo script !

OK, you lost me here.

Walter



___
Info-cvs mailing list
Info-cvs@gnu.org
http://lists.gnu.org/mailman/listinfo/info-cvs


Re: [Fwd: Q on keyword substitution]

2005-01-07 Thread Thomas Marsh
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
jsWalter wrote:
|jsWalter [EMAIL PROTECTED] wrote:
|
|
|I'm using phpDocumentor and would like to have the '@since' tag auto
|insert the CVS file version, but not change it the next time the file is
| submitted.
|
|this... * @since $Version: $
|
|to become... * @since 1.24
|
|not... * @since $Version: 1.24$
looking at an example of java code in the apache struts cvs repository,
I see
/**
~ * Custom FormBeanConfig to demonstrate usage.
~ *
~ * @version $Revision: 1.2 $ $Date: 2004/03/14 06:23:50 $
~ */
Is this not the kind of documentation you want?
|
|
|Try 'cvs admin -kv'.  Try it on a test repository first.
|
|
| Well, doesn't this tell CVS not to proces *any* keywords on this
| particular file?
|
| Well, it looks like I'm asing for the impossible, again.
|
| oh well.
|
| Thanks
|
| Walter
|
|
|
| ___
| Info-cvs mailing list
| Info-cvs@gnu.org
| http://lists.gnu.org/mailman/listinfo/info-cvs
|
|
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD4DBQFB3qXWlUv1VPJ8EM4RArLQAJdKPsyWuESEtlqLS9r58tJ/TOBjAJ0aiIqr
5RPmyJ+lrN7NX05vgp3Sxg==
=2oqK
-END PGP SIGNATURE-
___
Info-cvs mailing list
Info-cvs@gnu.org
http://lists.gnu.org/mailman/listinfo/info-cvs


RE: [Fwd: Q on keyword substitution]

2005-01-07 Thread Jim.Hyslop
jsWalter wrote:
 I will take it form the deafing silence onthis that it can 
 not be done.
I don't think so. The problem is, the RCS keywords are not expanded until
you check the file out. By that point, you've lost the context of when the
keyword was added.

Could some combination of 'cvs annotate' and scripts help you here, perhaps?

-- 
Jim Hyslop
Senior Software Designer
Leitch Technology International Inc. ( http://www.leitch.com )
Columnist, C/C++ Users Journal ( http://www.cuj.com/experts )



___
Info-cvs mailing list
Info-cvs@gnu.org
http://lists.gnu.org/mailman/listinfo/info-cvs


RE: [Fwd: Q on keyword substitution]

2005-01-07 Thread Jim.Hyslop
Thomas Marsh wrote:
 looking at an example of java code in the apache struts cvs 
 repository,
 I see
 
 /**
 ~ * Custom FormBeanConfig to demonstrate usage.
 ~ *
 ~ * @version $Revision: 1.2 $ $Date: 2004/03/14 06:23:50 $
 ~ */
 
 Is this not the kind of documentation you want?
I suspect not. This will work for '@version', which I gather is similar in
concept to the $REvision$ keyword - i.e. it gets updated whenever the file
is checked out (I'm not familiar with phpDocumentor, I'm just guessing).

Walter wants to use the @since keyword, which I gather indicates when a
specific feature was added. This is *not* something you want updated each
time you check out the file.

-- 
Jim Hyslop
Senior Software Designer
Leitch Technology International Inc. ( http://www.leitch.com )
Columnist, C/C++ Users Journal ( http://www.cuj.com/experts )


 


___
Info-cvs mailing list
Info-cvs@gnu.org
http://lists.gnu.org/mailman/listinfo/info-cvs


Re: [Fwd: Q on keyword substitution]

2005-01-07 Thread jsWalter

 jsWalter wrote: |jsWalter [EMAIL PROTECTED] wrote:
 |
 |
 |I'm using phpDocumentor and would like to have the '@since' tag auto
 |insert the CVS file version, but not change it the next time the file
 is | submitted.
 |
 |this... * @since $Version: $
 |
 |to become... * @since 1.24
 |
 |not... * @since $Version: 1.24$


 looking at an example of java code in the apache struts cvs repository,
 I see

 /**
 ~ * Custom FormBeanConfig to demonstrate usage.
 ~ *
 ~ * @version $Revision: 1.2 $ $Date: 2004/03/14 06:23:50 $
 ~ */


 Is this not the kind of documentation you want?

For @version, yes.

This label' should not be changed at each iteration, as VERSION will be.


But not for @since.

It is a way of knowing when something was addedd or removed from a file
based upon the CVS tracking version number

Walter



___
Info-cvs mailing list
Info-cvs@gnu.org
http://lists.gnu.org/mailman/listinfo/info-cvs


RE: [Fwd: Q on keyword substitution]

2005-01-07 Thread jsWalter

 Thomas Marsh wrote:

 looking at an example of java code in the apache struts cvs repository, I
 see

 /**
 ~ * Custom FormBeanConfig to demonstrate usage.
 ~ *
 ~ * @version $Revision: 1.2 $ $Date: 2004/03/14 06:23:50 $
 ~ */


 Is this not the kind of documentation you want?

 I suspect not. This will work for '@version', which I gather is similar
 in concept to the $REvision$ keyword - i.e. it gets updated whenever the
 file is checked out (I'm not familiar with phpDocumentor, I'm just
 guessing).

@version is just a label. It will display anything you want there.

If you marry that with $Version: $ then you hae an automatic version label
that updates all by itself.

   @version $Version: $


 Walter wants to use the @since keyword, which I gather indicates when a
 specific feature was added. This is *not* something you want updated each
 time you check out the file.

Exactly!

Right on the money!

Walter



___
Info-cvs mailing list
Info-cvs@gnu.org
http://lists.gnu.org/mailman/listinfo/info-cvs


Re: [Fwd: Q on keyword substitution]

2005-01-07 Thread Todd Denniston
jsWalter wrote:
 
SNIP
 For @version, yes.
 
 This label' should not be changed at each iteration, as VERSION will be.
 
 But not for @since.
 
 It is a way of knowing when something was addedd or removed from a file
 based upon the CVS tracking version number
 
 Walter
CVS might not do it for you, but you might be able to get some where in
between with a combination of $Version: $, commitinfo and a perl (or your
favorite scripting language).

put @since $Version: $ in your document.
check it in, and commitinfo should let it pass.

next time you go to commit it would read something like
@since $Version: 1.250 $

and commitinfo would deny the commit because there is a number between the
$'s.
if grep [EMAIL PROTECTED] $1 | grep [0-9]  /dev/null
then
   echo hey, you were supposed to run cleanup.pl on $1 
   exit 5
fi
(the above is not tested, and I am going from the way verifymsg works, so
YMMV)

and have the user run cleanup.pl to go into the file and change all
@since $Version: 1.250 $
to
@since 1.250

then add a target in your Makefile(s) to run cleanup.pl as needed.
Or if you wanted to do something you might later regret, you could have
commitinfo run cleanup.pl, however changing files in-transit between the
user sandbox and the repository is usually a recipe for trouble.
-- 
Todd Denniston
Crane Division, Naval Surface Warfare Center (NSWC Crane) 
Harnessing the Power of Technology for the Warfighter


___
Info-cvs mailing list
Info-cvs@gnu.org
http://lists.gnu.org/mailman/listinfo/info-cvs


Re: [Fwd: Q on keyword substitution]

2005-01-07 Thread Pierre Asselin
jsWalter [EMAIL PROTECTED] wrote:
  Try 'cvs admin -kv'.  Try it on a test repository first.

 Well, doesn't this tell CVS not to proces *any* keywords on this
 particular file?

It's -kv, not '-ko'.  '-kv' removes the keyword (and the bracketing
$$) and leaves only the value.

Your files will end up looking like this:

* Since $Revision: $: still working
* Since 1.24: ladidda badabba
* Since 1.23: tamtidelam

and you have to be *very* careful with the spelling of '$Revision: $'
when you add a new line in the file you're editing.  I recommend
ending it with a colon and space before the dollar, as above, so
you can verify the presence of the keyword with the RCS command 'ident'
before you commit into cvs.  Maybe even in a commitinfo script ! 

-- 
pa at panix dot com
___
Info-cvs mailing list
Info-cvs@gnu.org
http://lists.gnu.org/mailman/listinfo/info-cvs


Re: [Fwd: Q on keyword substitution]

2005-01-06 Thread Pierre Asselin
jsWalter [EMAIL PROTECTED] wrote:

 I'm using phpDocumentor and would like to have the '@since' tag auto
 insert the CVS file version, but not change it the next time the file is
 submitted.

 this...
* @since $Version: $

 to become...
* @since 1.24

 not...
* @since $Version: 1.24$

Try 'cvs admin -kv'.  Try it on a test repository first.


-- 
pa at panix dot com
___
Info-cvs mailing list
Info-cvs@gnu.org
http://lists.gnu.org/mailman/listinfo/info-cvs


Re: [Fwd: Q on keyword substitution]

2005-01-06 Thread jsWalter
 jsWalter [EMAIL PROTECTED] writes:

 Is there a way to have a substitution happen only once?

 ie:
 I'm using phpDocumentor and would like to have the '@since' tag auto
 insert the CVS file version, but not change it the next time the file
 is submitted.

 this... * @since $Version: $

 to become... * @since 1.24

 not... * @since $Version: 1.24$

 So, I'm asking for a one time substitution.

 And, yes, I could modifiy the line next time I'm in the file,
 if I remember.

Mark replied

 'cvs admin -ko' after the first commit.


This won't do what I'm looking for.

It will tell CVS to *never* do any more substitution. on any keywords.

I will take it form the deafing silence onthis that it can not be done.

Oh well.

Walter



___
Info-cvs mailing list
Info-cvs@gnu.org
http://lists.gnu.org/mailman/listinfo/info-cvs


Re: [Fwd: Q on keyword substitution]

2005-01-06 Thread jsWalter
 jsWalter [EMAIL PROTECTED] wrote:

 I'm using phpDocumentor and would like to have the '@since' tag auto
 insert the CVS file version, but not change it the next time the file is
  submitted.

 this... * @since $Version: $

 to become... * @since 1.24

 not... * @since $Version: 1.24$

 Try 'cvs admin -kv'.  Try it on a test repository first.

Well, doesn't this tell CVS not to proces *any* keywords on this
particular file?

Well, it looks like I'm asing for the impossible, again.

oh well.

Thanks

Walter



___
Info-cvs mailing list
Info-cvs@gnu.org
http://lists.gnu.org/mailman/listinfo/info-cvs


[Fwd: Q on keyword substitution]

2005-01-05 Thread jsWalter
Is there a way to have a substitution happen only once?

ie:
I'm using phpDocumentor and would like to have the '@since' tag auto
insert the CVS file version, but not change it the next time the file is
submitted.

this...
   * @since $Version: $

to become...
   * @since 1.24

not...
   * @since $Version: 1.24$


So, I'm asking for a one time substitution.

And, yes, I could modifiy the line enext time I'm in the file, if I remember.

Any ideas?

Thanks

Walter




Taking it to the next level.
   web.torres.ws/dev/php/walters_way



___
Info-cvs mailing list
Info-cvs@gnu.org
http://lists.gnu.org/mailman/listinfo/info-cvs


Re: [Fwd: Q on keyword substitution]

2005-01-05 Thread Mark D. Baushke
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

jsWalter [EMAIL PROTECTED] writes:

 Is there a way to have a substitution happen only once?
 
 ie:
 I'm using phpDocumentor and would like to have the '@since' tag auto
 insert the CVS file version, but not change it the next time the file is
 submitted.
 
 this...
* @since $Version: $
 
 to become...
* @since 1.24
 
 not...
* @since $Version: 1.24$
 
 
 So, I'm asking for a one time substitution.
 
 And, yes, I could modifiy the line enext time I'm in the file, if I remember.
 
 Any ideas?

'cvs admin -ko' after the first commit.

-- Mark
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.3 (FreeBSD)

iD8DBQFB3Ojf3x41pRYZE/gRAoRGAJ46RU7F639sjZyUHfkk3+gp9Ne8SgCg0DC6
jTFfIhDCPhreZfTyXxupaY4=
=Ibyd
-END PGP SIGNATURE-


___
Info-cvs mailing list
Info-cvs@gnu.org
http://lists.gnu.org/mailman/listinfo/info-cvs