[MERGE] add stop_rule to Branch.iter_merge_sorted_revisions()

John Arbash Meinel john at arbash-meinel.com
Wed Jan 28 01:28:41 GMT 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


...
> 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().
> 
> If *Branch* had a simple first_ancestor() method, then I'd probably be
> OK with dropping stop_rule and always making it 'exclude'. But even then,
> we'd cover the exclude and with-merges cases but not the include one so
> easily. (Martin Albisetti wants include for Loggerhead btw.)

I'm wondering if he actually wants that, or if what he wants is
'with-merges' because Loggerhead is trying to reproduce the same output
that 'bzr log' is generating.

I don't know the Loggerhead internals, but from what I've seen at least
the "changes" pages seems like an HTML beautification around 'bzr log'.

> 
>> 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.

> 
>> If you feel like this is still the best way to go, then we can certainly
>> do it. I'm mostly suggesting that the simplest api that can get the
>> information we need is probably better.
> 
> Sure. Thanks for the review & feedback.
> 
> Ian C.
> 
> 

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkl/tMkACgkQJdeBCYSNAAN3kwCfY+zOWZ95+1A/xJZXNu2v57ep
aboAoMQSj1HjYo2AFcHvRJUiA6DPZ0cf
=iT2t
-----END PGP SIGNATURE-----



More information about the bazaar mailing list