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