1) No problem committing and updating an expanded CVS $Id$ tag while the
svn:keyword id is _not_ set. I tested this on the test\readme.txt file.
2) No problem committing and updating an expanded CVS $Id$ tag while the
svn:keyword id _is_set. I tested this on the
test\testIdKeyword\ClearStack.java class. Check out test from subversion
to see the svn style Id.
ClearStack.java's Id line looked like this before the add/commit.
* @version $Id: ClearStack.java,v 1.1.1.1 2005/02/02 02:17:52 johnson Exp $
I committed the file. Then I enabled the svn:keyword id property on the
ClearStack.java file, by following these steps: Right Click > Properties >
Subversion tab > and then set the property svn:keyword with the value
id. And committed again. Now the Id line looks like this
* @version $Id: ClearStack.java 5 2005-10-22 05:03:24Z test $
So, it appears that the CVS Id tags will just stay the same unless the
svn:keyword is set. But, it will not cause an error. Can someone else
verify this? You probably could just checkout the test module from
subversion, make a change in ClearStack.java, and commit it. You should
see that the zulu time changed and that the revision number changed. Then
make a change in the test\readme.txt file and commit that. You should not
see a change in the CVS style Id tag.
thanks, aaron
At 08:24 AM 10/21/2005, you wrote:
Can a subversion user (Tim? Aaron? Todd?) clarify for me which of the
following is true:
- Expanded CVS $Id$ tags won't be maintained correctly by default in svn.
or
- Expanded CVS $Dd$ tags cause errors in svn
If the former, then I'm happy to ignore this issue for now. If the
latter, then I will write a little emacs script to unexpand them in
V7Hackystat before importing into svn.
I also read in one of the SVN books I bought that SVN folks generally
frown upon the use of the $Id$ keyword anyway, so I'm happy to discontinue
the use of this mechanism in Version 7.
Cheers,
Philip
--On Friday, October 21, 2005 1:49 AM -1000 Aaron Kagawa
<[EMAIL PROTECTED]> wrote:
this is probably a very minor issue, but I'm not sure that you want to
import files into subversion with the already expanded $Id$.
Subversion deals with these keywords differently than CVS. I think you
we would have edit a client side config file, in additon to setting a
another property. I'm trying to figure out the process to get that
working.
Anyway, you might want to test that out before having to fix every
single file later on just to get the $Id$ keyword working.
I know that this works for files with "@version $Id$", but haven't tested
it with files that already have the expanded $Id$ keyword:
Try this out (see
http://tortoisesvn.sourceforge.net/docs/release/TortoiseSVN_en/help-onepa
ge.html#tsvn-DUG-propertypage ). (disclaimer try at your own risk. I'm
learning subversion too). 1) right click on a directory and select
properties.
2) click on the Subversion tab
3) use the select box to select svn:keyword and type in "Id" and click on
recursive. But, one potential problem is that this will apply the keyword
expansion to all files. You might want to do just java files or maybe
just the src directory. You can check that you applied the keyword by
checking this folder .svn\props (ie C:\java\svn\test\.svn\props) you
should see a file in there called <something>.svn-work. In this file you
should see something that says keyword and id. 4) Next you have do a
commit.
5) You should see the expanded $Id$ keyword now (only locally, on the
server it will stay as $Id$), assuming that you have one in there. 6)
Once these steps are done, if someone else checksout/updates the file
they will see the expanded $Id$ keyword.
* people have written custom scripts to do this, you probably can find
some online. ** again, I'm not sure if subversion would know what to do
if the $Id$ is already expanded to something like
$Id: JBlanketSensor.java,v 1.3 2005/09/28 00:20:16
jsakuda Exp $
Part 2. yes there is a part 2.
It would be crazy to go through that process every time you add new
files. so, you can setup a subversion client side auto property. This is
an example:
[miscellany]
enable-auto-props = yes
[auto-props]
# Source-code files that should do keyword expansion
*.java = svn:eol-style=native;svn:keywords=Id
This can be set in the config file (ie C:\Documents and
Settings\akihisa\Application Data\Subversion\config). See
http://svnbook.red-bean.com/en/1.1/ch07.html#svn-ch-7-sect-1.3.2 .
So, each developer would have to provide settings similar to those to
correctly expand the $Id$ keyword when they add or import new files.
Someone let me know if this info helps. And/or I need any changes to the
instructions.
thanks, aaron