how I can find revision that merges some dotted revno?

John Arbash Meinel john at arbash-meinel.com
Thu Nov 1 19:43:42 GMT 2007


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

Alexander Belchenko wrote:
> Use case:
> I run annotate to see who and when introduce some changes to sources.
> And annotate says me some dotted revno, e.g. 2568.1.1 (in bzr.dev).
> 
> I'd like to find in what mainline revision it was merged, to track down
> what else changes was merged as well. Does we have any way to obtain
> this information? May be some plugin already know how to do this?
> 
> Alexander

I wrote a big long email about how this could be done. And then I tried writing
a plugin to show it. And then the answer came....

bzrlib.tsort.merge_sort returns a topological sorting.
It starts at the tip revision, and works backwards in time.

It makes the guarantee that all nodes that are merged into a mainline entry
come after it, but before the previous mainline node. (And I think this is true
for all depths.)

So if you just iterate over merge_sort() and track what the last found mainline
revision was, then you'll know what merged that revision.

Attached is the simple plugin I wrote demonstrating this.

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

iD8DBQFHKixtJdeBCYSNAAMRAo7TAJ4usJkh1n7fOl81tIFQuXyrHbPwegCfftzf
e8YJlwvizq/VNuT26w7BcRE=
=5c54
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: __init__.py
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20071101/2731f41a/attachment.diff 


More information about the bazaar mailing list