bookmark: simplify mutability check in `validdest`

There is no need to check phase by hand. We already have a ctx method for that.
bookmark: issue a single call to `allsuccessors` per loop

Update to this code was minimalist when `allsuccessors` argument were changed
from a list to a set. As this code is getting my attention again I realised we
can drastically simplify this part of the code by issue a single call to
`allsuccessors`.
bookmark: remove useless line in `validdest`

This case is already covered by the `if old == new:` conditional at the start of
the function.
run-tests: use pickle to send results from children to parent

JSON would probably be preferable, but it isn't available for Python 2.4 or 2.5.
run-tests: remove resultslock since it serves no useful purpose

Each child process has its own copy of the results dict, so all access to the results dict is serial.
run-tests: add --time option to log times for each test

--time also prints out the wall-clock time each test takes in descending order.
bookmarks: introduce a bmstore to manage bookmark persistence

Bookmarks persistence still showed a fair amount of its legacy as a
monkeypatching extension. This encapsulates all bookmarks
serialization and parsing in a single class, and offers a single
location where other bookmarks storage engines can be substituted
in. As a result, many files no longer import the bookmarks module,
which strikes me as an encapsulation win.

This doesn't do anything to the current bookmark state yet, but I'm
hoping put that in the bmstore class as well.

--HG--
extra : rebase_source : ce872c320b22da42c5b3f560b63c8248a8d4c15e
grep: don't search past the end of the searched string

'*' causes the resulting RE to match 0 or more repetitions of the preceding RE:

>>> bool(re.search('.*', ''))
>>> True

This causes an infinite loop because currently we're only checking if there was
a match without looking at where we are in the searched string.

--HG--
extra : transplant_source : %3F%9C%3C%1B%A0%90Ic%2Ch%8FS%0Ce%F6%8C%9C5%D6V
run-tests: open child-parent pipes in binary mode

Python's pickle is a binary format.
setup: print subprocess stderr if there is any

I just spent 1.5 days trying to debug a failing buildbot because
setup.py was silently dropping the errors that were being printed
by in-place hg.
makefile: don't use system hgrc when running hg in-place

This suppresses the printing of spurious error messages if a global
hgrc refers to extensions that the in-place hg can't access.
run-tests.py: remove runqueue's results parameter since it is now a global
convert: add support for converting git submodule (issue3528)

Previously, convert aborted upon encountering a git submodule. This patch
changes it so that it now succeeds. It modifies convert_git to manually generate
'.hgsub' and '.hgsubstate' files for each git revision, so as to convert git sub
modules to non-mercurial subrepositories.
amend: force editor only if old message is reused (issue3698)

This regression was added by 9732473aa24b. It triggered the editor even if
--message or --logfile were provided.

--HG--
branch : stable
grep: don't search past the end of the searched string

'*' causes the resulting RE to match 0 or more repetitions of the preceding RE:

>>> bool(re.search('.*', ''))
>>> True

This causes an infinite loop because currently we're only checking if there was
a match without looking at where we are in the searched string.

--HG--
branch : stable
convert: fix a too-long line nag
Merge with crew-stable.
webcommands: allow hgweb's archive to recurse into subrepos

Currently when obtaining an archive snapshot of a repository via the
web interface, subrepositories are not taken in the snapshot. I
introduce an option, archivesubrepos, which allows this.
tests: add a randomized test for pathencode

This is a probabilistic test - it generates different test cases on every
run, unless invoked from the command line with a specific seed.

The default number of tests run should make the tests take about a
second to complete on a semi-modern laptop.
test-pathencode: make a 2.4-safe import of collections