For example, say there is a forward translator from project space "internal" to "public" with two steps, renamer then scrubber. We have repositories internal(x) == public(y) (where x and y are revision numbers). To inverse-translate a change public(y+1) from "public" to "internal", first build a stack of each step in forward translation:
Then onto each element at the top of the stack, merge 1) the next element in the stack (to undo that forward-translation step), and 2) the input codebase. In our example, the first merge, inverse scrubbing, looks like this:
internal(x)|renamer|scrubber == public(y) / \ internal(x)|renamer public(y+1) \ / internal(x+1)|renamer
The output of this merge should be the combined changes of un-scrubbing and revision y+1. Note it is the inverse scrubber's job to "merge" correctly (a conceptual, not necessarily literal merge).
The next and last step is inverse renaming:
internal(x)|renamer / \ internal(x) internal(x+1)|renamer \ / internal(x+1)
We call the codebase being merged onto the "reference from-codebase". The codebase beside the input being merged in is called the "reference to-codebase". In these diamonds, the ref. from-codebase is the top, and the ref. to-codebase is the left.
|
|