newtopython
newtopython

Reputation: 93

Is there a bzrlib function that will return all of the dotted revnos if given a start and end revision number?

I would like to somehow return every single revno and dotted revno between two revision numbers.

If I made the input 1010..1000 how could I get all of the revision numbers inbetween back?

If there was a branch off of rev number 1005 and each of those dotted revnos were

997.5.1 - 997.5.3

How could I return:

list = [1010, 1009, 1008, 1007, 1006, 1005, 997.5.3, 997.5.2, 997.5.1, 1004, 1003, 1002, 1001, 1000]

Upvotes: 0

Views: 31

Answers (1)

jelmer
jelmer

Reputation: 2450

You can use Branch.iter_merge_sorted_revisions to iterate through the revisions in a range. It takes a start and stop revision_id as arguments.

You can use Branch.dotted_revno_to_revision_id to convert dotted revnos to revision ids.

Upvotes: 1

Related Questions