destutil: show message about other branch heads, even if on a closed head
Before this patch, bare "hg update" displays message below, if there
is at least one non-closed branch head other than current parent:
1. 'XX other heads for branch "BRANCH"' message, if current parent is
on a non-closed branch head
This suggests user to invoke "hg heads" or so for merging them.
2. no message, if current parent is on a closed branch head
At this patch, bare "hg update" might choose closed branch head
as update destination, and it causes this situation easily.
3. no message, otherwise (= current parent isn't on any branch head)
'XX other heads for branch "BRANCH"' should be displayed also in #2
case above, because user might overlook other non-closed branch heads.
This patch gets a list of all branch heads regardless of closed-ness
of it, and uses it (= 'allheads') to distinguish #1/#2 from #3 above.
$ hg init
$ $PYTHON -c 'file("a", "wb").write("confuse str.splitlines\nembedded\rnewline\n")'
$ hg ci -Ama -d '1 0'
adding a
$ echo clean diff >> a
$ hg ci -mb -d '2 0'
$ hg diff -r0 -r1
diff -r 107ba6f817b5 -r 310ce7989cdc a
--- a/a Thu Jan 01 00:00:01 1970 +0000
+++ b/a Thu Jan 01 00:00:02 1970 +0000
@@ -1,2 +1,3 @@
confuse str.splitlines
embedded\r (no-eol) (esc)
newline
+clean diff