[PATCH 2 of 2] pull: new output message suggests better update action when a new branch head is added

Kevin Berridge kevin.w.berridge at gmail.com
Tue Mar 15 20:17:20 CDT 2011


Sorry, I'm making up wording as I go...

On Tue, Mar 15, 2011 at 8:49 PM, Greg Ward <greg at gerg.ca> wrote:

> On 15 March 2011, Kevin Berridge said:
> > There are three different scenarios involving new branches:
> >
> > 1. no changes on your branch, new branch head added
> > 2. changes on your branch but no new head, new branch head added
> > 3. changes on your branch and new head, plus a new branch head added
>
> Hangonasec.  I thought we were talking about new heads on some (named)
> branch, not about new named branches.  (Just in case there is
> terminological confusion here, I am going to explicitly say "named
> branch" when I mean "named branch".)
>

You're right, we haven't (yet) been talking about new branches, just new
branch heads.  And that's probably all we care about.


>
> > If we want the message to favor information about your current branch
> maybe
> > there should be three messages like:
> >
> > 1: (No changes on this branch, but new branch heads added. Run 'hg
> branches'
> > to see branches)
>
> Disagree.  IMHO the only time it's appropriate to recommend "hg
> branches" is if a new named branch has appeared.  If I'm working on
> branch 1.1 and someone just added changesets (or increased the head
> count) on default, I don't really care.  It doesn't affect me right
> now.  Just tell me "new heads on another branch".  Bonus points for
> "new heads on branch 'default'", but that is strictly optional.
>

I like "new heads on other branches."  I struggled w/ this case because as
you say, we don't really care about the other branches.


>
> > 2: (Changes on this branch, and new branch heads added. Run 'hg update'
> to
> > get latest working copy, 'hg branches' to see branches)
>
> "hg branches" is even less relevant here.  What I want to know is,
> what are the heads on the current branch?  The answer can be had by
> running "hg heads .".
>

In this case there is only one head on the current branch, but there are new
heads on other branches.  The most likely next action is hg update, to get
to the latest version on the current branch.  This message could simply be
"Changes on this branch, run 'hg update' to get latest working copy"?


>
> > 3: (New heads on this branch, and new branch heads added. Run 'hg heads'
> to
> > see heads, 'hg merge' to merge, 'hg branches' to see branches)
>
> That's redundant, or I'm confused.  What is the difference between
> "new heads on this branch" and "new branch heads added"?  Is the
> second one referring to *other* named branches?
>

In this case there are new heads on the current branch, and you probably
want to merge.  This message could be shortened to "New heads on this
branch, run 'hg merge' to merge".

Thanks,
Kevin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20110315/824f629c/attachment.htm>


More information about the Mercurial-devel mailing list