tags: defer tag validation until repo.tags() is called
Before, we were validating all tags for any tag operation, which meant
building a (nearly) full node->tag lookup tree for most operations.
parsers: fix a memleak, and add a clearcaches method to the index
This change also fixes a nasty memory leak: previously, self->caches
was not being freed.
The new clearcaches method lets us benchmark with finer granularity,
as it lets us separate the cost of loading a revlog index from those
of populating and accessing the cache data structures.
hghave: remove symlink test made useless by
ac0da5caebec
tests: disable progress estimate in test-debugbuilddag.t
If the command takes long enough, including 'estimate' in the format
will add some more data to the progress bar output, and make the test
fail. See e.g.
https://buildd.debian.org/status/fetch.php?pkg=mercurial&arch=kfreebsd-amd64&ver=2.1.2-2&stamp=
1333493711
ui: swallow EBADF on stderr
ui.write_err already swallows EPIPE and EIO if a write to stderr fails.
On Mac OS X at least, a write to a closed file descriptor results in
EBADF. Before this patch, hg would exit with status 1 if a write to
stderr failed during startup (e.g. while trying to print a warning about
not finding an extension):
$ ./hg --config extensions.foo= version 2>&-; echo $?
1
With this patch, it correctly swallows stderr and continues to run the
command:
$ ./hg --config extensions.foo= version 2>&-
Mercurial Distributed SCM (version 2.1)
...
mq: use list of already known target files instead of matching object for diff
'hg qnew' passes matching object to 'patch.diff()' to specify target
filenames, and it causes 'dirstate.walk()' via 'repo.status()' in
'patch.diff()'.
but target files are already known before 'patch.diff()' invocation.
to avoid useless 'dirstate.walk()' invocation, this patch uses
'changes' argument to pass already known target files to
'patch.diff()' instead of 'match' argument.
'changes' argument of 'patch.diff()' should have lists for modified,
added and removed files separately, so this patch saves status of
'.hgsubstate' before commit, and put it into appropriate list in
'changes'.