convert: use git diff-tree -Cn% instead of --find-copies=n% for older git

The option --find-copies was added in a later git version than the one included
in Debian squeeze-lts (1.7.2.5), probably around 1.7.4.

--HG--
branch : stable
mail: actually use the verifycert config value

The mail module only verifies the smtp ssl certificate if 'verifycert' is enabled
(the default). The 'verifycert' can take three possible values:

- 'strict'
- 'loose'
- any "False" value, eg: 'false' or '0'

We tested the validity of the third value, but never converted it to actual
falseness, making 'False' an equivalent for 'loose'.

This changeset fixes it.

--HG--
branch : stable
changegroup: don't define lookupmf() until it is needed

lookupmf() is currently defined earlier than when it is needed. Future
patches further refactoring this code will be easier to read when
lookupmf() is in its new home.

--HG--
branch : stable
extra : rebase_source : e969aa8e38189811a0fe2b2491e3322ed2dce2fd
changegroup: don't store unused value on fnodes (issue4443)

The contents of fnodes are only accessed once per key. It is wasteful to
cache the value since nobody will use it.

Before this patch, the caching of unused data in fnodes was effectively
causing a memory leak during the file streaming part of bundle creation.

On mozilla-central (which has ~190,000 entries in fnodes), this patch
has a significant impact on RSS at the end of generate():

before:  516,124 KB
after:   364,356 KB
delta:  -151,768 KB

The origin of this code can be traced back to 627cd7842e5d and has been
with us since the 2.7 release.

--HG--
branch : stable
extra : rebase_source : 19989de60d7755d6708c90e793dc7e7922b4f165
changegroup: sparsely populate fnodes

Previously, fnodes had a key and empty dict value for every element in
changedfiles. This is somewhat wasteful. Empty dicts in CPython consume
a lot more memory than you would expect - 280 bytes.

On mozilla-central, which has ~190,000 files/fnodes keys, the previous
loop populating fnodes allocated 91,924 KB of memory, most of that for
the empty dicts.

With this patch in place, our peak RSS during mozilla-central clone
drops:

before:  364,356 KB
after:   326,008 KB
delta:   -38,348 KB

When combined with the previous patch, total peak RSS decrease is now
190,116 KB.

--HG--
branch : stable
extra : amend_source : 1900521c72c70cd20154d04ef6fa0d0d1231aafb
tests: introduce a subrepository to test-archive.t

This will be used in an upcoming patch to add coverage for web.archivesubrepos.

--HG--
branch : stable
extra : rebase_source : 45188713ae1aacdf8736680d29b512dc6fc4f529
hgweb: fix a crash when using web.archivesubrepos

A matcher is required when enabling the subrepo option on archival.archive(),
because that calls match.narrowmatcher(), which accesses fields on the object.
It's therefore probably a bad idea to default the matcher to None on archive(),
but that's a fix for default.

--HG--
branch : stable
extra : rebase_source : e4c945d4499481926b1b87fd77f522dfee525ccf