[MERGE] Graph.find_distance_to_null

Aaron Bentley aaron at aaronbentley.com
Fri May 23 06:19:34 BST 2008


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

John Arbash Meinel wrote:
> Aaron Bentley wrote:
> | John Arbash Meinel wrote:
> |> 2) Branch.push() and Branch.pull() pass a Graph object into
> |> update_revisions,
> |> with the bias that 'self' is considered the closest repository.
> |
> | I wonder whether remote_repository.get_graph(other) should be equivalent
> | to other.get_graph(remote_repository)?
> |
> | Aaron
> 
> Well, somehow you need to know what is local and what is remote.

And what you've done so far seems fine, and perfectly mergeable.  I was
just thinking about the future.

The thing is that both push and pull can be forced to work in the
opposite direction:

pull -d remote local
push -d remote local

So hardcoding push to expect its argument to be remote, and hardcoding
pull to expect is argument to be local is a 98% solution.

It's certainly possible to craft a situation where a
LocalTransport-backed repo is slower than a RemoteRepository.  Just
seems pretty hypothetical.

> I've also considered that you could place a request and actually just
> time the
> latency. And sort the next request based on who returned the previous
> one the
> fastest.

Interesting thought.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFINlPm0F+nu1YWqI0RAoTrAJ9AlUTyeFtvkaAnJO4cqmOcpExQjgCeNSxg
P2pKjU8FWiHBhHW0s7Flt9c=
=Q3vh
-----END PGP SIGNATURE-----



More information about the bazaar mailing list