Comment 5 for bug 237901

Revision history for this message
Alexey Borzenkov (snaury) wrote :

No, no, no. Branching schemes are (almost) not related to NoSuchRevision. And my patch fixes the NoSuchRevision only.

As an explanation why it was happening in the first place: you see, when I checkout /tcl/df-tcl/trunk at some point history goes into /tcl/tools/trunk. Because of the way branching is handled it is (wrongly?) detected as a branch of /tcl/df-tcl/trunk (call to mapping.is_branch in SvnRepository.iter_changes returns True), so it goes on. Because CachingLogWalker.iter_changes can return revisions that are on a different path (parents in call to changes.changes_path is True). Later we get into SvnRepository.lhs_revision_parent, where call to changes.changes_path has parents=False (the default). Now *here* we have a problem, because the change is for the current path, but the change happened for a parent, i.e.:

    We have path: 'tcl/df-tcl/trunk'
    We have changes: {'tcl/tools': (u'D', None, -1), 'tcl/df-tcl': (u'A', 'tcl/tools', 96)}

tcl/df-tcl is not a child of tcl/df-tcl/trunk, so the call fails and you get NoSuchRevision. And my patch fixes this exact issue.

Branching schemes were related to a different issue. A part of history is cut off because branching schemes don't handle unrelated paths well, and I was reorganizing my repository in the past, so the part before that reorganizing is cut off for at least my df-python project. I'm glad to hear that branching schemes are going away (and hope to see it soon), their design is very flawed in regards to unrelated paths, since there's no way you can implement BranchingScheme.unprefix for them, and even in other cases it assumes /tcl/tools/trunk and /tcl/df-tcl/trunk are branches of one another, which they might not be.