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

Laurens Holst laurens.nospam at grauw.nl
Fri Mar 18 04:04:25 CDT 2011


Op 16-03-11 23:55, Kevin Bullock schreef:
> On Mar 15, 2011, at 10:42 PM, Matt Mackall wrote:
> 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]
>
> then what the patch gives us as it stands is:
>
> 0: nothing (modheads == 0), or "run 'hg update' to get a working copy"
> 1: "run 'hg heads' to see heads, 'hg merge' to merge"
> 2: "new branch heads added, run 'hg update [new branch]' to get a working copy"
> 3: same as [1]
> 4: same as [2]
> 5: same as [1]
>
> 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"

Remember to cover the case when there are new heads on several branches:

if updated_branches.length == 1
     'new heads added on OTHERBRANCH'
else
     'new heads added on other branches'

> 3: "run 'hg heads .' or 'hg heads BRANCH' to see branch heads, 'hg merge' to merge"

Same here.

> 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.

~Laurens


More information about the Mercurial-devel mailing list