Commit Graph

7 Commits

Author SHA1 Message Date
Laurent Charignon
cfe353bb20 cleanup: fix naked exception clauses
Summary: This diff is part of a series to cleanup fb-hgext and make it pass check-code.

Test Plan: all tests pass

Reviewers: #sourcecontrol, ttung

Differential Revision: https://phabricator.fb.com/D2812062
2016-01-07 18:30:24 -08:00
Laurent Charignon
a42808982c cleanup: fix the "line too long" warnings
Summary: This diff is part of a series to cleanup fb-hgext and make it pass check-code.

Test Plan: all tests pass

Reviewers: #sourcecontrol, ttung

Differential Revision: https://phabricator.fb.com/D2811926
2016-01-07 18:30:24 -08:00
Laurent Charignon
53a55a42c1 cleanup: fix legacy exception syntax
Summary: This diff is part of a series to cleanup fb-hgext and make it pass check-code.

Test Plan: all tests pass

Reviewers: #sourcecontrol, ttung

Differential Revision: https://phabricator.fb.com/D2811871
2016-01-07 18:30:24 -08:00
Durham Goode
1b3926c13d simplecache: move memcache prefix to mcget/set
Summary:
1) moves the memcache prefix part of the key into mcget and mcset, so callers
don't have to care about it.
2) added a stringserializer for storing simple strings
3) removes _ from _memoize so it can be used by other extensions
4) moves key version into memoize function

Test Plan: Ran the tests

Reviewers: rmcelroy, #sourcecontrol

Differential Revision: https://phabricator.fb.com/D2158102
2015-06-15 17:19:08 -07:00
Durham Goode
8dbd058742 simplecache: add local caching
Summary:
Having a simple on disk cache is useful in some cases, like when it can prevent
us from having to read a full manifest. Let's add local caching support to
simplecache.

Test Plan:
Added a test

Perf numbers for a basic export
no cache=0.7s
local only=0.46s
memcache only=0.48s
memcache+local=0.48s
local+memcache=0.46s

Reviewers: ericsumner, lcharignon, sid0, rmcelroy

Reviewed By: rmcelroy

Differential Revision: https://phabricator.fb.com/D2149605

Signature: t1:2149605:1434139712:c8a524ece9bdd91dca122e1305e81aa02912a8d9
2015-06-11 15:29:43 -07:00
Durham Goode
72c2c0ee05 simplecache: update pathcopies wrapper signature
Summary:
Upstream has changed the pathcopies signature to include a matcher, so we need
to do the same.

Test Plan: Ran tests with new hg

Reviewers: rmcelroy, sid0, lcharignon

Differential Revision: https://phabricator.fb.com/D2001829
2015-04-17 10:00:47 -07:00
Ryan McElroy
76ff0ca413 Create simple cache for export and log
Test Plan:
 * New test
 * Ran all mercurial tests with this extension enabled. Most tests passed, and the ones that failed were due to additional output thansk to the enabled extension (eg, help screens mentioning the extenstion, and config dumps listing the extension as enabled).

Reviewers: sid0, davidsp, pyd, durham

Reviewed By: durham

Subscribers: ps

Differential Revision: https://phabricator.fb.com/D1691116

Tasks: 5503905

Signature: t1:1691116:1418066154:9d0950b7395038a7fa95b4ec26f9360ea2db9fc6
2014-11-19 10:10:03 -08:00