[PATCH] Improved named branch support when pushing changesets

Matt Mackall mpm at selenic.com
Thu Mar 26 16:25:36 CDT 2009


On Thu, 2009-03-26 at 22:13 +0100, Sune Foldager wrote:
> On 26/03/2009, at 20.15, Matt Mackall wrote:
> 
> > Very interesting.
> 
> Thanks :-)
> 
> > Did you consider using lookup to lookup individual heads?
> 
> Yes, we did consider using the already available information, as well  
> as already available wire-commands to get the desired information  
> across. The problem is that a branch head isn't necessarily a head in  
> the graph, so remote.heads() won't always return it. Even if it could  
> work with lookup, we would get quite a few roundtrips for complex  
> repositories. Extending with a 'branchmap' command, we get all the  
> information (all heads on all branches) in a single chunk :-).

The idea would be to lookup the remote revisions for local new branch
heads. ie I push stable which is inactive in the remote repo, so I
detect push would add one new head, namely my 'stable' head. I look up
remote 'stable' and discover that it's an ancestor of my local 'stable'
head, so everything's copacetic.

Not terribly expensive and works with servers going back quite some
time. Not sure it's sufficient to do everything right though.

-- 
http://selenic.com : development and support for Mercurial and Linux




More information about the Mercurial-devel mailing list