# # # patch "tracvc/mtn/automate.py" # from [cbe842914acc9803f65e5ba2417682ae4a89b49e] # to [f18c2a31d3b5403dde30549534de8708194d1a4d] # # patch "tracvc/mtn/backend.py" # from [60bc26b833eea09b00c2397deebe75dbb7acf676] # to [a1f437359571759a080b8bebacb2fd672baef901] # ============================================================ --- tracvc/mtn/automate.py cbe842914acc9803f65e5ba2417682ae4a89b49e +++ tracvc/mtn/automate.py f18c2a31d3b5403dde30549534de8708194d1a4d @@ -336,6 +336,7 @@ class MTN: branches = self.certs(leave)['branch'] for branch in branches: leaves.append((branch, leave)) + leaves.sort(lambda x, y: cmp(x[0], y[0])) return leaves def tags(self): @@ -347,6 +348,7 @@ class MTN: entry = basic_io.get_hash_from_stanza(stanza) if 'tag' in entry: tags.append((entry['tag'], entry['revision'])) + tags.sort(lambda x, y: cmp(x[0], y[0])) return tags @memoize(get_cachespec) ============================================================ --- tracvc/mtn/backend.py 60bc26b833eea09b00c2397deebe75dbb7acf676 +++ tracvc/mtn/backend.py a1f437359571759a080b8bebacb2fd672baef901 @@ -257,7 +257,24 @@ class MonotoneRepository(Repository): """ return self.mtn.non_merged_branches() + def get_special_locations(self, from_rev): + """Generate a list of interesting places in the repositoy. + + `rev` might be used to restrict the list of available location, + but in general I think it's best to produce all known locations. + + The generated results must be of the form (category, name, path, rev). + """ + result = [] + + for name, rev in self.get_branches(from_rev): + result.append(('branches', name, '/', rev)) + for name, rev in self.get_tags(from_rev): + result.append(('tags', name, '/', rev)) + + return result + class MonotoneNode(Node): def __init__(self, mtn, rev, path, manifest = None):