/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/graph.py

  • Committer: Marius Kruger
  • Date: 2009-01-01 21:46:06 UTC
  • mto: (3969.1.1 ianc-integration)
  • mto: This revision was merged to the branch mainline in revision 3970.
  • Revision ID: amanic@gmail.com-20090101214606-lak9wejufcjehpm6
extract graph.is_between from builtins.cmd_tags.run, and test it

Show diffs side-by-side

added added

removed removed

Lines of Context:
920
920
        return set([candidate_descendant]) == self.heads(
921
921
            [candidate_ancestor, candidate_descendant])
922
922
 
 
923
    def is_between(self, revid, lower_bound_revid, upper_bound_revid):
 
924
        """Determine whether a revision is between two others.
 
925
 
 
926
        returns true if and only if:
 
927
        lower_bound_revid <= revid <= upper_bound_revid
 
928
        """
 
929
        return ((upper_bound_revid is None or
 
930
                    self.is_ancestor(revid, upper_bound_revid)) and
 
931
               (lower_bound_revid is None or
 
932
                    self.is_ancestor(lower_bound_revid, revid)))
 
933
 
923
934
    def _search_for_extra_common(self, common, searchers):
924
935
        """Make sure that unique nodes are genuinely unique.
925
936