1

Good Day, I am controlling an SVN repository with over 10k .sql files. There is a need to have the revision number updated inside the file whenever there is a commit. To address this I ran this line on every exisiting file

svn propset svn:keywords "Id" filename.sql

This worked and was able to see $Id$ expanded properly on the files that had $Id$

Next to make sure this property was set on new files I modified my local svn config file to contain

enable-auto-props = yes
*.sql = svn:keywords="Id";

This worked too for all my initial tests as it seemed new files were also getting properly expanded. But after further testing it seems some new files are not getting the $Id$ expanded. This is causing issues so I tried to narrow down why some are not getting expanded. To test i created a dummy file that contained the $Id$ and i added/comitted(Using TortoiseSVN) this file to a few different directories and found mixed results. (No means $Id$ didn't expand, Yes means it did)

NO: Breakfix\DB\schema\MasterMind\nonMAS\grants\testSVN.sql
YES: Breakfix\EnvSetup\testSVN.sql
YES: Breakfix\DB\schema\MasterMind\testSVN.sql
YES: Breakfix\DB\schema\MasterMind\nonMAS\testSVN.sql
NO: Breakfix\DB\schema\MasterMind\nonMAS\indexes\testSVN.sql
NO: Breakfix\DB\schema\MasterMind\nonMAS\Scripts\testSVN.sql
NO: Breakfix\DB\schema\MasterMind\nonMAS\triggers\testSVN.sql
YES: Trunk\DB\schema\MasterMind\nonMAS\grants\testSVN.sql
YES: Trunk\DB\schema\MasterMind\nonMAS\Objects\testSVN.sql

My question is, What are some possible reasons as to why the $Id$ is not getting expanded in some directories as it is in others in the same SVN repository?

Note: svn propget returns "Id" for the files that worked, and for the files that didn't svn propget returns "Header".

Any advice or suggestions would be greatly appreciated!

Thank you

Matt Kimball
  • 121
  • 2
  • 13
  • If TortoiseSVN is relevant please explain what role it plays in the question. It's property handling has some features wit subtle differences from the command-line ones. – Álvaro González Jul 29 '19 at 18:40
  • I used TortoiseSVN for adding and committing the files. – Matt Kimball Jul 29 '19 at 18:56
  • You **must** to note, which version of SVN you have *and* current state of `svn:auto-props` property (for SVN 1.8+) - it makes **BIG difference** – Lazy Badger Jul 29 '19 at 22:31
  • Locally I'm using SVN1.11.0, our repository server is using SVN1.9.3. and auto-props is set to yes. Maybe we need to update the SVN version on our repository server then. If its possible to resolve without upgrading to the latest version that would be ideal. – Matt Kimball Jul 30 '19 at 16:21

1 Answers1

0

Solved! I've been looking at this issue for months, but finally figured it out. This article from Tortoise SVN helped. https://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-propertypage.html

Turns out my predecessor setup some svn:keywords that were folder based. This was the reason some folders didn't work for me. I was able to go to the parent folder of everything and setup a global svn:keyword and now it works for everyone.

Matt Kimball
  • 121
  • 2
  • 13