Deep-copies a RevTree.
()
| 480 | |
| 481 | // Deep-copies a RevTree. |
| 482 | func (tree RevTree) copy() RevTree { |
| 483 | result := RevTree{} |
| 484 | for rev, info := range tree { |
| 485 | copiedInfo := *info |
| 486 | result[rev] = &copiedInfo |
| 487 | } |
| 488 | return result |
| 489 | } |
| 490 | |
| 491 | // Prune all branches so that they have a maximum depth of maxdepth. |
| 492 | // There is one exception to that, which is tombstoned (deleted) branches that have been deemed "too old" |
no outgoing calls