Durham Goode <durham@fb.com> [Sat, 09 Feb 2013 13:35:30 -0800] rev 18674
blackbox: tests for the blackbox extension
A few tests to cover the blackbox extension. Covers commands, hooks, and
incoming changes.
Durham Goode <durham@fb.com> [Sat, 09 Feb 2013 09:09:46 -0800] rev 18673
blackbox: adds a 'blackbox' command for viewing recent logs
Adds a 'hg blackbox' command for viewing the latest entries in the blackbox log.
By default it shows the last 10 entries, but -l allows the user to specify.
Durham Goode <durham@fb.com> [Sat, 09 Feb 2013 09:04:48 -0800] rev 18672
blackbox: log incoming changes via ui.log()
Logs incoming changes to a repo to ui.log(). Includes the number of changes
and the hashes of the heads after the new changes.
Example log line:
2013/02/09 08:35:19 durham> 1 incoming changes - new heads:
cb9a9f314b8b
Currently the blackbox logs the unix user that is performing the push/pull.
It would be nice to log the http authorized user as well so it works with
hgweb, but that's outside the scope of this commit.
Durham Goode <durham@fb.com> [Sat, 09 Feb 2013 09:04:32 -0800] rev 18671
blackbox: logs python and extension hooks via ui.log()
Logs python and extension hooks to ui.log() for viewing in the blackbox.
Example log lines:
2013/02/09 08:35:19 durham> pythonhook-preupdate: hgext.eol.preupdate finished in 0.01 seconds
2013/02/09 08:35:19 durham> exthook-update: echo hooked finished in 0.02 seconds
Durham Goode <durham@fb.com> [Sat, 09 Feb 2013 09:04:14 -0800] rev 18670
blackbox: log the commands that are run
Uses ui.log to log which commands are run, their exit code, the time taken,
and any unhandled exceptions thrown.
Example log lines:
2013/02/09 08:35:19 durham> add foo
2013/02/09 08:35:19 durham> add exited 0 after 0.02 seconds
Updates the progress tests because they use a mocked time.time() which these
changes affect.
Durham Goode <durham@fb.com> [Tue, 12 Feb 2013 14:08:33 -0800] rev 18669
blackbox: adds a blackbox extension
Adds a blackbox extension that listens to ui.log() and writes the messages to
.hg/blackbox.log. Future commits will use ui.log() to log commands, unhandled
exceptions, incoming changes, and hooks. The extension defaults to logging
everything, but can be configured via blackbox.track to only log certain events.
Log lines are of the format: "date time user> message"
Example log line:
2013/02/09 08:35:19 durham> 1 incoming changes - new heads:
d84ced58aaa
Bryan O'Sullivan <bryano@fb.com> [Mon, 11 Feb 2013 16:15:12 -0800] rev 18668
scmutil: create directories in a race-safe way during update
With the new parallel update code, it is possible for multiple
workers to try to create a hierarchy of directories at the same
time. This is hard to trigger in general, but most likely during
initial checkout.
To deal with these races, we introduce a new ensuredirs function
whose contract is to ensure that a directory hierarchy exists - it
will ignore a failure that implies that the desired directory already
exists.
Bryan O'Sullivan <bryano@fb.com> [Mon, 11 Feb 2013 14:50:54 -0800] rev 18667
Merge
Idan Kamara <idankk86@gmail.com> [Sat, 09 Feb 2013 19:02:45 +0200] rev 18666
test-atomictempfile: convert to unit test
Idan Kamara <idankk86@gmail.com> [Sat, 09 Feb 2013 19:13:39 +0200] rev 18665
tests: add a test runner utility that prints nothing when all tests pass
This will be used to run tests through run-tests, which will expect no output
for a unit test that passes successfully.
The motivation for using unit tests instead of the current Python tests is that
they don't require an output file for comparison and that they're easier to write
because of the available tools from unittest (setup, asserts).