14

I want to use SVN externals on my projects to include a number of third party plugins. I've found this blog post recommending saving the svn:externals value in a file (called svn.externals) with the destination/source pairs, like this:

akismet http://svn.wp-plugins.org/akismet/trunk
all-in-one-seo-pack http://svn.wp-plugins.org/all-in-one-seo-pack/trunk

and to use the the -F flag to set the property, like so:

svn propset svn:externals -F svn.externals

I got the above info from beer planet.

Now to the quesiton. Does SVN support a comment format allowing me to comment this svn.externals file? I'd like to group the external repositories under libraries, widgets and the like. Also, I was thinking to add instructions on how to update this file/property for my fellow developers at the top of the file. Example, assuming the # starts a comment:

# README: When updating svn:externals
#  1. Update and save this file
#  2. Run 'svn propset svn:externals -F svn.externals
#  3. Commit 'svn ci -m "plugin XXXXXXXX added to svn:externals"'

# wp plugins
wp/content/plugins/akismet http://svn.wp-plugins.org/akismet/trunk
wp/content/plugins/all-in-one-seo-pack http://svn.wp-plugins.org/all-in-one-seo-pack/trunk

# jquery + plugins
js/jquery http://jquery-ui.googlecode.com/svn/trunk
# etc etc (this is just a random example of my idea)

-

To sum up, my question is, does SVN support some sort of comments in its properties? And if it does, what's the syntax?

Aziz Shaikh
  • 16,245
  • 11
  • 62
  • 79
davur
  • 1,420
  • 1
  • 15
  • 37

2 Answers2

18

From the source code \svn\main.c:1124 (version 1.7.1)

 "      Lines in externals definitions starting with the '#' character\n"
 "      are considered comments and are ignored.\n"
sylvanaar
  • 8,096
  • 37
  • 59
  • Two answers within an hour after nearly a year, what's that about? Anyway thanks, it seems my own hypothetical file format actually works. I asked the question when I had just started using SVN and didn't dare just testing it on the company's repo. – davur Nov 17 '11 at 04:06
  • i'm not sure. somehow this question ended up the front page on the day i answered it. – sylvanaar Nov 17 '11 at 15:16
  • 3
    "svnadmin create /tmp/repo" "svn co file:///tmp/repo ." to experiment with a local repository. – Veda Jan 09 '14 at 15:37
  • The latest version has moved the location of this comment to Line 1589 of`subversion/trunk/subversion/svn/svn.c` [see source](https://svn.apache.org/repos/asf/subversion/trunk/subversion/svn/svn.c#:~:text=Lines%20starting%20with%20a%20%27%23%27%20character%20are%20ignored) – Forge Oct 31 '22 at 13:07
0

Using # works for comments, as per

http://www.mail-archive.com/dev@subversion.apache.org/msg00189.html

I've tested this with 1.6.12, at least.

xyphoid
  • 1,380
  • 10
  • 12