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

Greg Ward greg at gerg.ca
Thu Mar 17 08:23:40 CDT 2011


On 16 March 2011, Kevin Bullock said:
> If I might suggest a slightly more useful table (which might be what you meant anyway, but this clarifies at least case [3]):
> 
>                         current named branch
>                      no new heads     new heads
> other named branches
> no new heads            [0]           [1]
> new heads               [2]           [3]
> new branches            [4]           [5]
> 
[...]
> 
> Here are my suggestions:
> 
> 0: keep as is
> 1: "run 'hg heads .' to see heads, 'hg merge' to merge" (per Greg's suggestion)
> 2: "new heads added on OTHERBRANCH" or just "new heads added on another branch"
> 3: "run 'hg heads .' or 'hg heads BRANCH' to see branch heads, 'hg merge' to merge"
> 4: "run 'hg branches' to see branches", and list e.g. "(+1 heads, +1 branches)"
> 5: same as [1]
> 
> though I'm not settled on [2] or [3]. We risk getting too verbose if we try to suggest what to do with the _other_ branch, but giving no guidance seems wrong.

This is definitely making progress.  Just having the if/elif structure
to enumerate these six cases will make life easier.  And the messages
you proposed are an improvement.  At the risk of bikeshedding, let me
suggest some refinements:

0: "run 'hg update' to update your working copy" (rather than "get a
   working copy", which only makes sense if dirstate.parents()[0] ==
   nullrev)
1: "run 'hg heads .' to see heads or 'hg merge' to merge" (slight tweak)
2: as above: "on OTHERBRANCH" would be nice, but if it's hard, "on
   another branch" is just fine
3: same as 1: new heads on current branch should override other
   concerns; in this case, I don't care about new heads on
   other branches
4: as above
5: same as 1: again, new heads on current branch trumps arrival of new
   branch

So the only place where I really disagree with you is case 3.  Pretty
minor.  Kevin Berridge, I hope you're still following, because the
amount of feedback you're getting means *we like your patch*.  ;-)

        Greg
-- 
Greg Ward                                http://www.gerg.ca/
Budget's in the red?  Let's tax religion!
    -- Dead Kennedys


More information about the Mercurial-devel mailing list