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

Jelmer Vernooij wrote:
...

>>>>
>>>> How could we do it?
>>> The simplest thing to check would just be to see if the first revision
>>> of the upstream branch is part of the ancestry of the packaging
>>> branches' tip.
>>>
>>> Are you going to use the database for this or are you fine with calling
>>> out to Bazaar and using the branches on disk / remote servers?
>> I'd like to use the database, since I think the other option would be
>> grindingly slow.
> 
> So checking whether a revision is part of another branches' ancestry is
> not really possible then, if I understand the current database scheme
> correctly. You should be able to detect the common ancestry in most of
> the cases by just checking that the first revision of the upstream
> branch and first revision of the packaging branch have the same revid.
> 
> This won't allow you to detect the situation where the packaging branch
> was created first and the upstream merged into it later, but as far as I
> can tell that's quite rare.
> 
> Something related to this that has an open bug in lp-code - it is
> impossible to have common ancestry between upstream and debian packaging
> branches at the moment because it is impossible to register mirrors /
> imports for packaging branches.
> 

Where is this script going to be running? I wrote a trivial command that
lets you run:

  bzr in-ancestry branch1 branch2

And reports back if the ancestry of branch1 is in branch2.
  lp:~jameinel/+junk/bzr-in-ancestry

Running locally on bzr.dev trees, it takes less than 3 seconds to return
true/false. Note also that the answer isn't symmetric. We've merged
plugins into bzr.dev, but those plugins have not merged bzr.dev into them.

Similarly for packaging branches. I would imagine that the packaging
branch might merge upstream, but not the other way around.

Comparing a mysql branch with a bzr.dev one seems to take 4s, which
still isn't particularly long. I don't know what time scale you were
hoping for (but my experience with launchpad apis doesn't make it
particularly faster than this ...)

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

iEYEARECAAYFAktyxs0ACgkQJdeBCYSNAAPs5QCgiOKbGgMR6IV5IO812IYHqLnf
18AAoKEpcdLLpBQZxjGimzWAP0YQrf3v
=vK9x
-----END PGP SIGNATURE-----

-- 
ubuntu-distributed-devel mailing list
ubuntu-distributed-devel@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-distributed-devel

Reply via email to