largefiles: don't cache largefiles for pulled heads by default

After discussion, we've agreed that largefiles for newly pulled heads should
not be cached by default.  The use case for this is using largefiles repos
with multiple remote servers (and therefore multiple remote largefiles caches),
where users will be pulling from non-default locations on a regular basis.  We
think this use case will be significantly less common than the use case where
all largefiles are stored on the same central server, so the default should be
no caching.

The old behavior can be obtained by passing the --cache-largefiles flag to
pull.

--HG--
extra : rebase_source : c74524754ee654491d63f586fac194a8405cee8e
mergetools: vimdiff issue a warning explaining how to abort

Adds a message displayed at each vimdiff invocation:

  merge conflict detected, type ":cq" to abort

Vimdiff is very confusing for non-vim user (not to speak about vim user confused
anyway. However it is very likely that vimdiff is picked as the mergetool of
choice when using the default config:
- vim is available on all UNIX system.
- Its one of the rare non graphical merge tools.

--HG--
branch : stable
extra : source : 6a012704c841db7d6c018b916465fab961610544
mergetools: refine vimdiff warning message

We explicitly redraw before echoing the message so that it simply
displays at the bottom of the window. Also simplifies the message
printing by using 'echomsg' (which uses 'echohl' internally) and adds
the names of the software involved for improved Googleability.

--HG--
branch : stable
extra : source : ec9b9968b7f84ac2de4722ed22a313868f84f6bc
merge with stable
bundle: treat branches created newly on the local correctly (issue3828)

Before this patch, "hg bundle --branch foo other" fails to create
bundle file, if specified "foo" branch is created newly on the local
repository.

"hg bundle" uses "hg.addbranchrevs(repo, other, ...)" to look branch
names up, even though other outgoing-like implementation uses
"hg.addbranchrevs(repo, repo, ...)". In the former invocation, "other"
repository recognizes such branches as unknown, so execution is
aborted.

This patch uses "hg.addbranchrevs(repo, repo, ..)" in "hg bundle" to
bundle revisions on such branches correctly.

--HG--
branch : stable
merge with crew
merge with stable
merge with main
merge with stable
worker: on error, exit similarly to the first failing worker

Previously, if a worker failed, we exited with status 1. We now exit
with the correct exit code (killing ourselves if necessary).
worker: fix a race in SIGINT handling

This is almost impossible to trigger due to the tiny time window involved.
worker: handle worker failures more aggressively

We now wait for worker processes in a separate thread, so that we can
spot failures in a timely way, wihout waiting for the progress pipe
to drain.

If a worker fails, we recover the pre-parallel-update behaviour of
failing early by killing its peers before propagating the failure.
cmdutil: use a small initial window with --limit

In a large repo, running a command like "log -l1 -p" was expensive because
it would always traverse 8 commits, as 8 was the initial window size.

We now choose the lesser of 8 or the limit, speeding up the "log -l1 -p"
case by a factor of 5.
commands: exit from the log loop at the right time

Previously, we'd run the iterator one more time than necessary,
potentially doing a lot of extra work in the process.
scmutil: fix NameError on windows

Forgot to import util in mercurial.scmwindows. Error was introduced in:

changeset:   18862:4c6f7f0dadab
user:        Kevin Bullock <kbullock@ringworld.org>
date:        Tue Feb 12 11:36:21 2013 -0600
summary:     scmutil: split platform-specific bits into their own modules
match: more accurately report when we're always going to match

This improves the performance of log --patch and --stat by about
20% for moderately large manifests (e.g. mozilla-central) for the
common case of no -I/-X patterns.
localrepo: iterate over manifest key/value pairs in status

This saves us a couple of dict lookups in the common case, and improves
the performance of the status method by 5% (measured with util.timed)
in a repo with a large manifest.
templater: properly handle file_copies with %
merge with crew