[PATCH V3] destutil: choose non-closed branch head at first (BC)
FUJIWARA Katsunori
foozy at lares.dti.ne.jp
Thu Mar 24 03:44:07 EDT 2016
At Tue, 22 Mar 2016 13:54:32 -0700,
Matt Mackall wrote:
>
> On Tue, 2016-03-08 at 19:59 +0900, FUJIWARA Katsunori wrote:
> > # HG changeset patch
> > # User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
> > # Date 1457288059 -32400
> > # Mon Mar 07 03:14:19 2016 +0900
> > # Node ID 4c53d1402e9d641f9b9f99ac6114e1f13e51fc45
> > # Parent ffd3ac07b1d79dda7f57bd826208fdaf92a76717
> > destutil: choose non-closed branch head at first (BC)
> >
> > Before this patch, destupdate() returns the tipmost (descendant)
> > branch head regardless of closed or not. But updating to closed branch
> > head isn't reasonable for ordinary workflow, because:
> >
> > - "hg heads" doesn't show closed heads (= updated parent itself) by
> > default
> >
> > - subsequent committing on it re-opens closed branch
> >
> > even if inactivation of closed head is needed, update destination
> > isn't it, because it should be merged into to another branch in
> > such case.
> >
> > This patch chooses non-closed descendant branch head as default update
> > destination at first. If all descendant branch heads are closed,
> > destupdate() returns the tipmost closed branch head.
> >
> > For simplicity, this patch chooses adding _destupdatebranchfallback()
> > instead largely changing _destupdatebranch().
> >
> > This patch changes not only normal lookup code path, but also "no
> > default branch" code path, for consistency.
>
> A couple notes here:
>
> - test-convert-mtn.t needs updating
Oh, I overlooked it, sorry. I'll send patch for it.
> > + updated to a closed branch head, because all descendant heads are closed.
> > + beware of re-opening closed head by subsequent commit here.
> > + 1 other heads for branch "default"
>
> This is a really long message and not really in our normal format. We should be
> aiming for:
>
> one line description of the problem with no period
> (a suggestion about how to move forward or get more info)
>
> Something like:
>
> no open branch heads, updating to a closed head
> (committing will reopen the branch)
>
> We also might consider making it a warning.
I see. I'll send the series, which will revise message and make it a
warning.
> --
> Mathematics is the supreme nostalgia of our time.
>
>
----------------------------------------------------------------------
[FUJIWARA Katsunori] foozy at lares.dti.ne.jp
More information about the Mercurial-devel
mailing list