tags:

views:

305

answers:

2

What the title says

I tried svn pd but didn't know the proper syntax to use it.

>svn pd svn:keywords Id
svn: warning: 'Id' is not under version control

Update:

I want this across the entire current directory, not just a single file, so I tried:

>svn propdel svn:keywords "Id" . -R
svn: warning: 'Id' is not under version control
property 'svn:keywords' deleted (recursively) from '.'.

My files still have $Id$ expanded.

Update2:

To be more clear, I'm not committing anything to the svn, just checking it out and updating from time to time.

I noticed when I fetch it using git-svn, all the $Id$ tags are preserved (not expanded), I want svn to do the same thing.

So now I ran this command:

>svn propdel svn:keywords . -R

What should I do now to get the latest files without expanding $Id$? I suppose what I want is to tell svn to pull all files again ...

I tried:

>svn revert . -R

but it didn't seem to do what I want.

+1  A: 

You need to say on what you want the property removed. So you are missing a filename at the end

svn propdel svn:keywords "Id" file

Otherwise svn seems to take just the last argument as filename and this is not under revision control

Norbert Hartl
He don't miss the filename, it is '.' - the actual directory. But the "Id" is a parameter too much.
Mnementh
in his defense, I only updated the question after his answer
hasen j
yes, I missed the parameter that is not needed on delete. Better check before answer, sorry
Norbert Hartl
+2  A: 

'svn propdel' takes only a path as parameter, not "Id". So you can only remove the svn:keywords-property completely, or you edit the property.

So if you don't care about other keywords, you can use the following:

svn propdel svn:keywords . -R

If you want to have some keywords as standard, but NOT "ID", you can set recursively:

svn propset svn:keywords "Revision" . -R

Another thing is: If the keyword "Id" is removed, this keyword keeps untouched in the files. If it was expanded before it will stay this way, but it will not expanded if you go back to $Id$.

Answering to update 2: The svn-revert always get back the last revision from the file. That isn't what you want.

As I said before, if the keywords are expanded one time, they stay so, even if you later deactivate the expansion. So you need a script to get your files back to unexpanded $Id$ and commit that again. After that - if you deactivated the expansion as described - the keywords keeps unexpanded.

Mnementh