Bug 738834 - Add support for multiple repositories.
Summary: Add support for multiple repositories.
Alias: None
Product: Topic Tool
Classification: Other
Component: cli-Topic_Tool
Version: 0.0.x
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Stephen Gordon
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2011-09-15 23:33 UTC by Stephen Gordon
Modified: 2011-09-29 04:26 UTC (History)
1 user (show)

Fixed In Version: topic-tool-0.0.8-0
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2011-09-29 04:26:50 UTC

Attachments (Terms of Use)

Description Stephen Gordon 2011-09-15 23:33:14 UTC
Description of problem:

This is mainly to support topic export from multiple sources, including skynet which now supports exporting of topics over http :D.

topic.conf syntax:


For compatibility TOPIC_INDEX/TOPIC_REPO without a numeric suffix should be assumed to be TOPIC_INDEX0/TOPIC_REPO0.

Comment 1 Stephen Gordon 2011-09-28 23:54:44 UTC
Also needed to change from using URLConnection to HttpURLConnection for export logic to ensure that we can follow redirects where required.

Comment 2 Stephen Gordon 2011-09-29 03:01:56 UTC
Topic export now looks for:

1) TOPIC_INDEX / TOPIC_INDEX0 - At least one repository must be set. Where both keys are used TOPIC_INDEX is taken and TOPIC_INDEX0 ignores.
2) TOPIC_INDEXn keys increasing from TOPIC_INDEX1 (inclusive) onwards. Once it finds a value of n that is not set it stops looking. As a result, for example, with the configuration:


The TOPIC_INDEX4 value is ignored.

3) Where a given URL has been used for more than one TOPIC_INDEXn value then an error is returned and no further exporting occurs.

There is still a potential for error when a topic is used which clashes, by name and path, with a topic from another repo. This needs to be looked at further though as any fix needs to also take into account the fact that including the same topic multiple times (from a single repo) is an existing valid use case. As a result basic checks such as displaying a warning or error if the given file exists already are not suitable. A marker needs to be kept somewhere during the export operation as to which repo each topic file was exported from so that such an error is only displayed where the repo is actually different.

Comment 3 Stephen Gordon 2011-09-29 03:22:41 UTC
Moving to MODIFIED in spite of the issue at the end of the above comment, while it's important at this stage the multiple repository support is being used for export of topics from Skynet and the normal topic repo which have substantially differing naming schemes. Not an issue at this time.

Note You need to log in before you can comment on or make changes to this bug.