[PATCH 0 of 2] Added improved named branch support to heads, branch and fetch.
Matt Mackall
mpm at selenic.com
Tue Sep 9 13:48:45 CDT 2008
On Tue, 2008-08-26 at 12:45 +0200, Sune Foldager wrote:
> This patch set improves named branch support in a number of commands.
>
> The goal is to make working with named branches more smooth. In particular,
> the fetch command (from the fetch extension) is more or less useless as it
> stands now.
>
>
> I have a few questions regarding the implementation:
>
> 1. What is the prefered way to get to the changectx of the 'last commit'
> (first parent). Going by workingctx or dirstate?:
> a. repo[repo.dirstate.parents()[0]]
> b. repo[None].parents()[0]
repo['.']
> 2. Is it ok to filter a head list for reachability by using
> repo.changelog.nodesbetween([base], heads)[2]
> This is what repo.branchheads() does, but perhaps it would be better if
> there were a call like repo.reachables() or similar.
What are you trying to do?
> 3. In general, is it best to get the current named branch name from the
> dirstate or from the 'last commit' (first parent, say)? I do the former
> in my patch to the heads command, but the latter in the fetch command.
Dirstate. ie:
repo[None].branch()
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial-devel
mailing list