# # # patch "viewmtn.py" # from [f795413ad19745dfaa9b80661c08e17bc179fa0b] # to [7098c2756bcaabf1996aac87d0239fd977e434ee] # ============================================================ --- viewmtn.py f795413ad19745dfaa9b80661c08e17bc179fa0b +++ viewmtn.py 7098c2756bcaabf1996aac87d0239fd977e434ee @@ -253,10 +253,22 @@ class BranchChanges: raise Exception("get_last_changes() unable to find somewhere to start - probably a non-existent branch?") to_parent = revs+[] # copy count = to_change + + def on_our_branch(r): + rv = False + for cert in ops.certs(r): + if cert[4] == 'name' and cert[5] == 'branch': + if cert[7] == branch.name: + rv = True + return rv + while len(revs) < count: new_to_parent = [] for rev in to_parent: - new_to_parent += ops.parents(rev) + # we must be cautious; we only want to look at parents on our branch! + parents = map(None, ops.parents(rev)) + parents = filter(on_our_branch, parents) + new_to_parent += parents if len(new_to_parent) == 0: # out of revisions... break