Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

How to access Components in SVN (Buckminster)

(More or less straight from the newsgroup for now)

Sandro Weiser wrote:
> Can you please give an example how to access a svn repo with username
> and pass? And how to retrieve different versions (from trunk/tags) from it.
>

You will need an rmap entry that looks something like this:

RMAP Entry
<rm:searchPath name="default">
   <rm:provider readerType="svn" componentType="eclipse-project"
     mutable="false" source="true">
     <pv:uri format="http://example.org/svn/trunk/{0}?moduleAfterTag">
       <bc:property key="buckminster.component"/>
     </pv:uri>
   </rm:provider>
</rm:searchPath>

<rm:locator searchPathRef="default" pattern="^org\.example\..*$" />

You can add username and password info to the URL in a standard way, i.e. http://yourname:yourpassword@example.org/svn/...

With that in place, you create a cquery for some component in the SVN repository and execute that. Right now the documentation for the Subversion provider on the Wiki is a bit scarce. Here's a javadoc excerpt from the source:

SVN Reader javadoc excerpt
  * The SVN repository reader assumes that any repository contains the three
  * recommended directories <code>trunk</code>, <code>tags</code>, and
  * <code>branches</code>. A missing <code>tags</code> directory is
  * interpreted as no <code>tags</code>. A missing <code>branches</code>
  * directory is interpreted as no branches. The URL used as the repository
  * identifier must contain the path element trunk. Anything that follows the
  * <code>trunk</code> element in the path will be considered a
  * <code>module</code> path. The repository URL may also contain a query part
  * that in turn may have four different flags:
  * <dl>
  * <dt>moduleBeforeTag</dt>
  * <dd>When resolving a tag, put the module name between the <code>tags</code>
  * directory and the actual tag</dd>
  * <dt>moduleAfterTag</dt>
  * <dd>When resolving a tag, append the module name after the actual tag</dd>
  * <dt>moduleBeforeBranch</dt>
  * <dd>When resolving a branch, put the module name between the
  * <code>branches</code> directory and the actual branch</dd>
  * <dt>moduleAfterBranch</dt>
  * <dd>When resolving a branch, append the module name after the actual branch</dd>
  * </dl>
  * A fragment in the repository URL will be treated as a sub-module. It will be
  * appended at the end of the resolved URL.

Back to the top