Translate bug-links in text.

Bug #934724 reported by Eike
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bug-repo-syncer
Fix Released
Wishlist
Eike

Bug Description

Bugs are dependent on each other, (and also to Wiki pages and Blueprints which are not regarded here). Inserting text like `Bug #123` act as links between the bugs, and the web front ends really produce links. These links should be translated when the bug is transferred to an other repository.

The text of Trac bugs contains bug numbers and wiki links in the text.

Bugs on Launchpad have several fields for interdependencies: related bugs/blueprints, duplicates.

== Design Required ==

Translating bug-links in new bugs is problematic with the current data structures, because the IDs of new bugs become only known at the end of the algorithm.

The bug-link translation infrastructure probably needs two passes.

The following scenarios need to be handled flawlessly:
 * "Simple Scenario": All bug IDs are known.
 * "Complex Scenario 1": New bugs in one repository, that link each other.
 * "Complex Scenario 2": The internal bug database has been lost. The repositories contain perfectly synchronized bugs, that link each other. It must be possible to reconstruct the database by downloading all bugs.

More complicated scenarios don't need to work without errors.

==== Design ====

When links to unknown bugs are discovered, they are not really translated, but
wrapped in a so called ''discovery format''. This format contains the original
link, and the repository where it was discovered.

Links in this ''discovery format'' are written to all repositories. When the
bug IDs become known, these ''discovery links'' can be translated irrespective
of the repository where they are stored.

To avoid duplication of lines that contain links in "Complex Scenario 2", bug IDs (and preliminary `KnownBug` records) are created for all unknown bugs, prior to translation of bug-links.

== Problems ==

== Done ==

Launchpad and Trac controllers changed to use `str` as bug IDs.
These strings however are integer numbers that have been converted to strings.

Numerical bug IDs are now used for Launchpad too.

The architecture for translating bugs has been completely changed.
All translation algorithms can now be run multiple times (in principle).

Basic text replacement algorithm.

Experimental integration into `RepoControllerDummy`.

Revised link translation algorithm

Integrated revised algorithm into the whole program.

== Related ==

 * TranslateBugLinks
 * bug #931828 (Truly immutable bugs)
 * bug #960163 (Switch to numeric bug IDs on Launchpad)
 * bug #936878 (Internal ID should be permanent)

Eike (eike-welk)
Changed in bug-repo-syncer:
milestone: none → 0.2.0
importance: Undecided → Wishlist
Eike (eike-welk)
Changed in bug-repo-syncer:
assignee: nobody → Eike (eike-welk)
status: New → Confirmed
description: updated
Eike (eike-welk)
Changed in bug-repo-syncer:
milestone: 0.2.0 → 0.3.0
description: updated
Eike (eike-welk)
description: updated
Eike (eike-welk)
description: updated
Eike (eike-welk)
description: updated
Eike (eike-welk)
description: updated
Eike (eike-welk)
description: updated
Eike (eike-welk)
Changed in bug-repo-syncer:
status: Confirmed → In Progress
Eike (eike-welk)
description: updated
Eike (eike-welk)
summary: - Translate links and bug numbers in text.
+ Translate bug-links in text.
Eike (eike-welk)
description: updated
Eike (eike-welk)
description: updated
description: updated
Eike (eike-welk)
Changed in bug-repo-syncer:
status: In Progress → Fix Committed
status: Fix Committed → Fix Released
Eike (eike-welk)
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.