merge default into stable for 2.8 freeze

--HG--
branch : stable
Added tag 2.8-rc for changeset 1596f2d8f242

--HG--
branch : stable
Added signature for changeset 1596f2d8f242

--HG--
branch : stable
pager: honour internal aliases

If paging is configured for a command all it's internal defined aliases
will be paged as well. This will make attend=log cause 'hg history'
to run the pager. However custom aliases will not be paged by default.

--HG--
branch : stable
bdiff: avoid a memory error on malloc failure

--HG--
branch : stable
shelve: disallow commit while unshelve is in progress

Before this patch, commit is allowed even while unshelve is in
progress.

In the other hand, "hg unshelve --abort" and "hg unshelve --continue"
check whether parent revisions of the working directory have changed
or not since last "hg unshelve", and abort without clearing state for
unshelve in progress if they have.

This causes that accidental commit makes clearing state for unshelve
difficult in ordinary ways.

This patch disallows commit while unshelve is in progress for
consistency.

--HG--
branch : stable
extra : rebase_source : 5cbd059b04e23c6abb2d2f5254658bf7adf2f131
shelve: remove useless and incorrect code paths for file access

This patch removes code paths in "shelvedfile.opener()", because:

    - explicit "vfs.mkdir()" invocation is useless

      "vfs.__call__()" for modes other than "read" creates parent
      directory of target file automatically by "util.ensuredirs()".

    - mode checking in "except IOError" code path is useless

      ENOENT occurs only for "read" mode, because target file is
      created forcibly for other modes.

    - there is no explicit "return" statement in the code path for
      "except IOError" if "mode[0] in 'wa'"

      this is incorrect, because None may be returnd unexpectedly,
      even though it seems the EEXIST case in the directory creation
      race for ".hg/shelved" and is very rare.

      this directory creation race is also treated in
      "util.ensuredirs()".

--HG--
branch : stable
extra : rebase_source : 0d0cec904aa3575e27215e0ab67f30713fe62c0f
check-code: fix no-check-code skip message - obfuscation was too obscure

--HG--
branch : stable
extra : rebase_source : b69c1d8393c5ea10cda1cb40abe39768b31ae042
largefiles: systematic testing of merges to/from largefiles

427ce5633c1c fixed one problem with update and added a test case for it. The
test coverage was thus insufficient before that.

To make sure we have good test coverage in this area we add systematic testing
of all cases of merges that may or may not change normal files to largefiles or
vice versa.

The tests shows some annoying extra merge prompts in some cases, but these
prompts are hard to avoid and they are now "safe" - they do not leave the
system in a confused inconsistent state.

--HG--
branch : stable
largefiles: use 'remote'/'local' in merge prompts like in other merge prompts

Prompts like
  foo has been turned into a largefile
  use (l)argefile or keep as (n)ormal file?
was not as clear as the usual prompts that use 'remote' or 'local' to explain
what happened on which side ... especially not when used to the normal prompts.

"as" could also indicate that it would be possible to take the content of the
largefile and somehow put it into the normal file. It could make it more clear
that it was a choice between one side or the other.

For consistency we will now phrase it like:
  remote turned local normal file f into a largefile
  use (l)argefile or keep (n)ormal file?

--HG--
branch : stable
doc: fix internal date sample (issue4072)

--HG--
branch : stable
rebase: fix selection of base used when rebasing merge (issue4041)

Prior this changeset, rebasing a merge whose first parent was not in
the rebase lead to wrong and highly conflicting merge. See the in-line
comment for details.

Test have been updated with the data provided by the reported.

--HG--
branch : stable
shelve: remove unused variable assignment

Fix test-check-pyflakes.t error after 1d7a36ff2615.

This patch replaces "readshelvedfiles()" invocation by
"shelvedfile().exists()" check and aborting, because it is required
only to ensure that shelved changes corresponded to specified name
exist after invocation.

This patch also remove definition of "readshelvedfiles()" itself,
because it is invoked only from the line removed by this patch.

--HG--
branch : stable
rebase: add description about exit code when there are unresolved conflicts

--HG--
branch : stable
histedit: add description about exit code

--HG--
branch : stable
patch: ensure valid git diffs if source/destination file is missing (issue4046)

This is arguably a workaround, a better fix may be in the repo to
ensure that it won't list a file 'modified' unless there is a file
context for the previous version.

--HG--
branch : stable
help: minor tweak to push help

--HG--
branch : stable
tests: move generaldelta test to inline python (issue4064)

--HG--
branch : stable
shelve: make unshelve work even if it don't run in repository root

revertfiles are relative to the repository root. not paths relative to the cwd.

--HG--
branch : stable
cmdutil: fix makefileobj not to clobber default modemap dict

Problem occurs if "hg cat -o" is invoked more than once in the same process.
The output of "hg cat" will be appended because of modemap[fn] = 'ab'.

--HG--
branch : stable