Does SVN support some sort of comments in its properties?
Asked Answered
D

2

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?

Dovetailed answered 22/11, 2010 at 5:50 Comment(0)
G
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"
Gipps answered 8/11, 2011 at 3:26 Comment(4)
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.Dovetailed
i'm not sure. somehow this question ended up the front page on the day i answered it.Gipps
"svnadmin create /tmp/repo" "svn co file:///tmp/repo ." to experiment with a local repository.Enzymology
The latest version has moved the location of this comment to Line 1589 ofsubversion/trunk/subversion/svn/svn.c see sourceJolty
U
0

Using # works for comments, as per

http://www.mail-archive.com/[email protected]/msg00189.html

I've tested this with 1.6.12, at least.

Uncrowned answered 8/11, 2011 at 2:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.