[PATCH] hgweb: changeset view: show parent branch name if different from current

Dirkjan Ochtman dirkjan at ochtman.nl
Mon Jan 19 05:56:23 CST 2009


On Mon, Jan 19, 2009 at 01:18, Stepan Koltsov <yozh at mx1.ru> wrote:
> We are hacking lighttpd, and we have a branch for each feature, so
> repository has lots of branches and lots of merges. In this case it is
> important to know names of branches of parent revisions for each merge
> revision. I've raised this problem some time ago for console hg
> utility, and the discussion had no result.

Maybe you can re-raise the discussion? Preferably by summarizing
points raised so far by different participants.

> Now I'm posting preliminary patch for hgweb here. In changeset view,
> in paper theme, parent branch name is printed if it is different from
> branch of current revision.

> ===
> -                parent=webutil.siblings(parents),
> -                child=webutil.siblings(ctx.children()),
> +                parent=webutil.siblings(parents, origbranch=ctx.branch()),
> +                child=webutil.siblings(ctx.children(),

Well, that looks rather ugly. Maybe we should have two separate
methods called webutil.parents() and webutil.children() that can call
an underlying siblings() helper function but can do some different
formatting. That would seem to me to be a little cleaner; we can then
pass in the original ctx, and do the parents/children locally (less
code!).

> +    commabefore = ""

This is the kind of thing that should really be done in the templater.
I hope that's possible, as it's currently rather limited. I think it
should be, though.

Cheers,

Dirkjan


More information about the Mercurial-devel mailing list