revset: ensure we are reversing a list (issue3530)
mq: defer command wrapping to extsetup (API)

mq wraps all commands that are not in commands.norepo, which is now performed in
this second phase of the extensions setup process.  This goes against the
current best practices on the wiki [1] as far as where command wrapping is
performed, but follows it regarding where global options are injected.

mq needs to be the first layer called when command dispatching in order to
consistently retarget to the patch repo, regardless of the load order of the
extensions.  This means being the last to wrap the command table.  Previously,
'hg <extdiff> --mq' would diff the main repo unless mq was enabled after
extdiff.

[1] http://mercurial.selenic.com/wiki/WritingExtensions

--HG--
extra : rebase_source : ad669308b4977fc1cfd7c8d6b415317666ffa549
revset: add "diff" field to "matching" keyword

The new "diff" field lets you use the matching revset keyword to find revisions
that apply the same change as the selected revisions.

The match must be exact (i.e. same additions, same deletions, same modified
lines and same change context, same file renames and copies).

Two revisions matching their diff must also match their files. Thus, to match
the diff much faster we will always check that the 'files' match first, and only
then check that the 'diff' matches as well.

--HG--
extra : rebase_source : b7fe7614ab1347633faeb42da93a44c98ab6cbca
convert: keep branch switching merges with ancestors (issue3340)

When running convert with a filemap, merge parents which are ancestors
of other parents are ignored. This is hardly a problem when parents
belong to the same branch, but the result could be confusing when named
branches are involved. With:

  -o-a1-a2-a3...     <- A
    \           \
     b1-b2-b3...-m-  <- B

If all b* revisions are discarded, it is useful to preserve 'm' even if
it is empty after filtering to record the branch switch.

This patch makes filemap preserve "ancestor parents" if there is no
"non-ancestor parent" on the same branch than the merge revision.

Remarks:
- I am not completely convinced by the reasons given above and those
  detailed by Matt in this thread:

http://selenic.com/pipermail/mercurial-devel/2012-May/040627.html

  The properties we try to preserve are not clearly defined. That said,
  I know this patch already helped someone on IRC and the tests output
  look reasonable.

- This is a new version of the original "convert: filemap must preserve
  fast-forward merges" patch. It has exactly the same output for 2
  parents merges, the additional complexity is here to handle more than
  two parents.

--HG--
extra : rebase_source : 9bf8773088cbbc3cbc00fc5be4d016cbbc077845
help: improve hgweb help

The existing help only walked through an example.

Now we first explain the basic rules and then show an example.

The 'collections' example and description only cause confusion and is removed.

Bikeshedded by Patrick Mezard <patrick@mezard.eu>

--HG--
extra : rebase_source : 0d9b3a645e301f838848b462cee0276b0d57eb2f
largefiles: fix a traceback when archiving a subrepo in a subrepo

This regression was introduced in 43fb170a23bd.

--HG--
extra : rebase_source : bd02862c376c5b793d194edb9e1c7b9323fa4d8b
largefiles: fix the directory structure when archiving a subrepo in a subrepo

Previously, a repo consisting of main/sub/subsub archived sub and subsub as
siblings under main.

--HG--
extra : rebase_source : a547d650ecea1c07698f915693b57bb990fb8cae
largefiles: remove a standin check that could never be true

--HG--
extra : rebase_source : 68266811e06de1f8869bbc6ac636a5650451041f
subrepo: propagate matcher to subrepos when archiving

Add a match object to subrepo.archive(). This will allow the -X and -I
options to be honored inside subrepos when archiving. They formerly
only affect the top level repo.

--HG--
extra : rebase_source : fc6776ae78474dcd3ac1200f94f5a9fa49ea4a58