Commit Graph

3 Commits

Author SHA1 Message Date
Jun Wu
c41d432bb1 fastannotate: move to hgext3rd
Summary: Extensions should belong there.

Test Plan: Updated existing tests

Reviewers: #mercurial, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D5113146

Signature: t1:5113146:1495562344:47bae69e6b22c14b32a8a9511878e88e89759d8f
2017-05-23 11:47:22 -07:00
Jun Wu
5a5a7662cd tests.t: clean up the shell code a bit
Summary:
Simplifies some shell code, namely `$extpath` is duplicated with `$TESTDIR/..`
so remove one of them.

Change `library.sh` (used by remotefilelog tests) to reuse `$HGRCPATH` instead
of overriding the environment variable, because it never gets restored and the
current code would assume `$HGRCPATH` to have `.hgrc` as its basename, which is
not always true.

Test Plan: `arc unit`

Reviewers: #sourcecontrol, stash

Reviewed By: stash

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4256506

Signature: t1:4256506:1480612191:73832c427b6562b9000a6df006226653157a7156
2016-12-01 02:06:57 +00:00
Jun Wu
b4efcc56cf fastannotate: deal with corrupted files gracefully
Summary:
Previously, fastannotate's annotatecontext would delete individual cache
files (linelog and revmap) if it meets Exception. While the "fastannotate"
command has some retry logic, "debugbuildannotatecache" doesn't, which means
users have to run "debugbuildannotatecache" O(number-of-corrupted-files)
times to unblock. And "fastannotate" does not handle AssertionError which
could be seen as "linelog is corrupted" nicely - it crashes without retry.

Addressing all the above issues by replacing the "assert" to
"CorruptedFileError", catching them and retry properly.

Test Plan: Added a new test.

Reviewers: #sourcecontrol, rmcelroy

Reviewed By: rmcelroy

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4233433

Signature: t1:4233433:1480330548:618e80762af2209784ad72ad0658f649b050a080
2016-11-25 19:49:13 +00:00