graft: don't drop the second parent on unsuccessful merge (issue3498)

This replicates the strategy of rebase, which postpones setparents and
duplicatecopies after checking the merge stats.

Without the second parent, resolve cannot redo merge.

--HG--
branch : stable
fix push of moved bookmark when creating new branch heads

The problem occured when pushing a changeset that at the same time creates a
new named branch head and moves a bookmark. The code invoked methods that only
exist on localrepo instances, so it failed for any other type of remote. The
test suite only tested against local remotes.
tests: add missing path globbing for Windows in svn tests
win32: specify _CREATE_NO_WINDOW on spawndetached()

Before this change, a console window briefly popped up on "hg serve -d" and
disappeared again, stealing the focus window (which was very annyoing when
running tests).

Specifying _CREATE_NO_WINDOW instead of _DETACHED_PROCESS fixes this (as tested
on Windows 7 x64).
win32: remove uneeded usage of _STARTF_USESHOWWINDOW

spawndetached() was the only user of _STARTF_USESHOWWINDOW and it creates the
process with _CREATE_NO_WINDOW anyway. If the process has no window, then
there is nothing to hide.
convert: accept Subversion 'file:///c%3A/svnrepo' syntax on Windows

Subversion can handle ':' quoted as '%3A' but urllib.url2pathname can't and
Mercurial thus rejected some valid subversions URLs.

This particular case will now be handled by some preprocessing before handing
it over to urllib.url2pathname.

This is tested by 0413f68da85c when test-convert-svn-source.t and
test-convert-svn-move.t can be run on Windows.
convert: check for failed svn import in debugsvnlog and abort cleanly

'hg debugsvnlog' failed with a crash when using the uninitialized transport in
get_log_child if the import of the svn libraries had failed.

'convert' should never get as far as launching 'hg debugsvnlog' if the svn
libraries are missing, but by launching a subprocess there is risk that the
environment is mangled so the second import fails.

It is in principle also possible to launch the command manually.
store: sort filenames in place
copies: re-include root directory in directory rename detection (issue3511)
discovery: simplify branchmap construction against legacy server

All necessary data to fire a simple revset query are already known. No call to
ancestors are needed. Such ancestors calculation was already done to compute
outgoing.missing.
bookmarks: correctly update current bookmarks on rebase (issue2277)

When you rebased with a currently active bookmark, that bookmark would
always point at the new tip, regardless of what revision it pointed at
before the rebase.

All bookmarks will now point at the equivalent post-rebase commit.
However, the currently active bookmark will cease to be active unless
it points at the new tip post-rebase.  Rebase will always leave the
new tip as the working copy parent, which is incompatible with having
an active bookmark that points at some other revision.  The common
case should be that the active bookmark will point at the new tip
post-rebase.

--HG--
branch : stable
strip: update help to state than you can strip public changeset

Multiple people have been confused by it.

--HG--
branch : stable
ui: add a variable to control whether hooks should be called

So hooks can be temporarily disabled.

--HG--
branch : stable
amend: disable hooks when creating intermediate commit (issue3501)

--HG--
branch : stable
keyword: use ui.formatter for kwfiles output
exewrapper: adding new exewrapper.c
merge with stable