Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does SVN support some sort of comments in its properties?

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?

like image 758
davur Avatar asked Nov 22 '10 05:11

davur


People also ask

What are svn properties?

Subversion allows users to invent arbitrarily named versioned properties on files and directories, as well as unversioned properties on revisions. The only restriction is on properties whose names begin with svn: (those are reserved for Subversion's own use).

Where are svn properties stored?

As @detunized mentioned, they're stored in the svn database on the server. Each commit creates one revision which has associated revision properties like svn:author and svn:log which has the log message. Unlike file changes in a revision, revision properties can be changed after the fact.

How do I commit properties in svn?

In order to commit only the explicit paths specified on the command line use the --depth empty option e.g. in the directory with the newly modified externals property: $svn commit --depth empty . -m "Modify svn externals definition only."

What are svn externals?

What are externals definitions? Externals definitions map a local directory to the URL of a versioned resource. The svn:externals property can be set on any versioned directory and its value is a multi-line table of subdirectories and absolute repository URLs.


2 Answers

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"
like image 143
sylvanaar Avatar answered Oct 15 '22 22:10

sylvanaar


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.

like image 27
xyphoid Avatar answered Oct 15 '22 21:10

xyphoid