~treaves/trac-bzr/trac-bzr

« back to all changes in this revision

Viewing changes to tracbzr/backend.py

  • Committer: Martin von Gagern
  • Date: 2012-06-21 19:51:49 UTC
  • mfrom: (107.3.2 bug1015281)
  • Revision ID: martin.vgagern@gmx.net-20120621195149-7c4ep20cadh8r11k
Merge improved prev/next handling.

Show diffs side-by-side

added added

removed removed

Lines of Context:
660
660
    def previous_rev(self, rev, path=''):
661
661
        if path:
662
662
            prev = self.get_node(path, rev).get_previous()
663
 
            if prev is None:
 
663
            if prev is None or prev[0] != path:
664
664
                return None
665
665
            return prev[1]
666
666
        branch, revid = self._parse_rev(rev)
674
674
            return self.string_rev(branch, NULL_REVISION)
675
675
 
676
676
    def next_rev(self, rev, path=''):
677
 
        # TODO path is ignored.
 
677
        if path:
 
678
            # We don't have a path-specific reverse history (yet).
 
679
            return None
678
680
        branch, revid = self._parse_rev(rev)
679
681
        if revid == CURRENT_REVISION:
680
682
            return None