Merging Repositories - techtalk/SpecLog-Resources GitHub Wiki

You can import another repository into your current SpecLog repository. The source repository’s requirements and workspaces are imported into the current repository. The layout of requirements on the imported workspaces is retained, and the import process also attempts to retain the IDs of imported requirements if possible. However if another requirement already exists with the same numeric ID, imported requirements are re-assigned the next available ID.

You can also export a subset of requirements to a new repository, which you can then import into your target repository. This allows you to export a repository containing only those requirements and workspaces you want to import.

The following restrictions apply:

  • You cannot import a repository into itself
  • You cannot re-import a repository to update the requirements previously imported from that repository. The requirements in the source repository are always added as new requirements on new workspaces each time a repository is imported.
  • The card templates used by the two repositories must be identical. If an imported requirement's type does not match one of the types in the target repository (defined in the card templates), the requirement is added as the default requirement type (the first card type defined in the card templates). If you are using customised card templates, you can duplicate the template between repositories as follows:
    1. Open the repository containing the customised card template.
    2. Select Edit card templates from the New Requirement widget's menu.
    3. Switch to the XML editor tab in the Edit card templates dialog and copy the XML contents to the clipboard (Ctrl+A, Ctrl+C).
    4. Open the second repository you want to copy the template to.
    5. Select Edit card templates from the New Requirement widget's menu and switch to the XML editor tab.
    6. Replace the XML by pasting the contents of the clipboard (Ctrl+A, Ctrl+V).

Importing a Repository into Another Repository

To import a repository:

  1. If your source repository (i.e. the repository containing the requirements you want to transfer to another repository) is a shared repository, open it and synchronise the repository with the server to ensure it is up-to-date. This step is necessary, as the import process imports the contents of the local cache file, not the repository stored on the server.
  2. If you only want to import a subset of the requirements in your source repository, filter the requirements and export them to a standalone repository (see below).
  3. Close the source repository if necessary.
  4. Open the target repository, i.e. the repository you want to merge the two repositories into.
  5. Select Import other repository into repository from the menu.
  6. Select the source repository’s file. If you want to import the contents of a shared repository, you need to select the local cache of the shared repository. The local cache is created the first time you connect to a share repository.
  7. Click on Import. The repository is imported.
    Note: During the import, synchronisation is disabled automatically and re-enabled once the import process is complete. An asterisk (*) is displayed next to the ID of requirements that have not yet been synchronised with the server.
  8. The name of imported workspaces is preceded by the "Imported:" suffix. Rename your imported workspaces as desired.

Merging a Subset of Requirements

You can export a subset of requirements to a new repository, either for archiving purposes or so you can import only those requirements and workspaces you require into another repository.

To do so:

  1. Open the repository you want to export the subset of requirements from.
  2. Filter the requirements you want to export, either by placing them on the same [workspace]] or by entering a [query in the Requirement widget’s search field or in a search list.
  3. Select Export to standalone repository from the menu.
  4. Choose what to export from the dialog:
  • All requirements: Exports all requirements in the repository.
  • Search result: Exports the requirements listed in the Requirements widget. You can restrict the requirements listed here using a search query.
  • Active view: Exports the requirements on the current workspace or in the current search list.
  1. Enter a file name for the repository.
  2. Click on Export.
  3. The selected requirements are exported to the target file. If you have filtered requirements using search criteria in either the Requirements widget or a search list, matching requirements are exported on each workspace they are assigned to.

You can then import this repository into your target repository as described above.