[MERGE] add stop_rule to Branch.iter_merge_sorted_revisions()
Ian Clatworthy
ian.clatworthy at internode.on.net
Wed Jan 28 12:13:52 GMT 2009
John Arbash Meinel wrote:
>
> ...
>> Right. But keep in mind that the API hides the whole get_parent_map()
>> stuff from the caller. So forcing them to have to grab one seems more
>> complex to me than adding a parameter to iter_merge_sorted_revisions().
>>> In fact, I would even consider that we may want to allow multiple stop
>>> revisions So that you would pass both parents of the revision.
>> I'd like to know more about this. It sounds a good idea, although it will
>> certainly make the implementation slightly more complex. Can you give
>> an example of when this would be useful to a client of the Branch API?
>
> Not as a branch api specifically, but consider a:
>
> show me the revisions in this branch, that aren't in this branch or in
> this branch
>
> In this specific case I was thinking:
>
> parents = get_parent_map([revision])[revision]
>
> Where the length of parents can certainly be > 1.
Thinking out loud, I wonder if stopping at any parent ought to be explicitly
supported, i.e. instead of having "with-merges" we had "include-until-parent"?
That way we'd be matching against revision-ids instead of relying on any
nuances of the depth calculation algorithm. I'm pretty sure
include-until-parent makes with-merges redundant doesn't it?
Ian C.
More information about the bazaar
mailing list