Commit Graph

10 Commits

Author SHA1 Message Date
timeless
ecdcbad06b blackbox: store the blackbox ui object instead of the log file
Without this, the last logged entry didn't have access to
the repository, and thus couldn't report its version
(and especially that an add or similar dirtied it).

A side-effect is that one repo leaks until process exit...
2016-02-03 17:05:04 +00:00
timeless
1cee322d64 blackbox: log working directory version
Without this, while you could see the list of commands run,
it wasn't possible to identify what they were doing, because commads
could rely on revsets (including remote input which varies over time).
2016-02-09 19:16:06 +00:00
timeless
45335881a6 tests: mock getpid to reduce glob usage
Updating tests based on 369f4a4a2536.
2016-02-24 20:04:32 +00:00
timeless
6eaedecd28 blackbox: flush output file descriptor
Without this, when there are multiple ui views, each blackbox
will have its own file handle, and the logging will be in
a really bad order.

Also, because of the way blackbox works, it never closes its
file handles, which means the last output before exit is
often lost.
2016-02-03 15:18:29 +00:00
Durham Goode
bdd9abd3d3 blackbox: add pid to output
This adds the process id to the line header for the blackbox output. This is
useful for distinguishing processes when using the blackbox on a server and many
processes are writing to the blackbox at once.
2015-09-07 11:31:44 -07:00
Gregory Szorc
7af3081f5e tags: explicitly log which tags cache file is being written
We now have multiple tags cache files. Record exactly which file is
being written. This should help aid debugging into performance issues
with any single filter.
2015-04-16 11:59:36 -04:00
Gregory Szorc
7d23ec157b tags: write a separate tags cache file for unfiltered repos
Since we changed the format of the tags cache, we should bump the
filename. Before this patch, "tags" was being used for unfiltered
repositories. Change the naming scheme to be consistent and ensure
that a new cache file is used.

While I was here, I updated the docs to describe the existence of
multiple caches. I also added explicit test coverage for the creation of
the unfiltered tags cache.
2015-04-16 11:54:13 -04:00
Gregory Szorc
0f9537f76f tags: change format of tags cache files
.hgtags fnodes are now written to a shared cache file. They don't need
to exist in the per-filter tags cache files. Stop writing them.

The format of the tags cache file has changed in a backwards
incompatible way. This should be acceptable, as we just established
per-filter tags cache files and no client should have per-filter tags
cache files that will need to be read. So no backwards compatbility
concern is present.

The new format has a single header line followed by resolved tags
entries.

The header line is similar to the old first line with a major
difference: we now compute and store a hash of the filtered revisions.
Before, if the set of filtered revs changed, we may return incorrect
results. We now detect that.

A test for verifying filtered rev change is handled properly has been
added.
2015-04-16 12:01:00 -04:00
Pierre-Yves David
99746dff73 tags: have a different cache file per filter level
Currently whichever filter level asks for tags last will write the data on disk.
This create massive issues when tags are read for "visible" and "unfiltered"
on large and multi headed repository (like Mozilla central). See issue4550 for
details

Each filter level recomputes its own cache without direct collaboration but they
all share the same 'hgtagsfnodes' cache. And that is where most of the time is
spent.
2015-04-15 18:34:34 -04:00
Gregory Szorc
bcba93c7f5 tests: add test showing tags cache drops filtered heads (issue4550)
The tags cache can lose .hgtags filenode entries for filtered heads. Add
a test demonstrating this (bad) behavior.
2015-02-24 00:08:04 -08:00