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?

2 Answers 2

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"
Sign up to request clarification or add additional context in comments.

4 Comments

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.
i'm not sure. somehow this question ended up the front page on the day i answered it.
"svnadmin create /tmp/repo" "svn co file:///tmp/repo ." to experiment with a local repository.
The latest version has moved the location of this comment to Line 1589 ofsubversion/trunk/subversion/svn/svn.c see source
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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.