Commit Graph

22 Commits

Author SHA1 Message Date
Durham Goode
50d6b599f4 Move ctreemanifest and cdatapack out of remotefilelog
These don't really have any dependencies on remotefilelog, so let's move them
out.
2016-09-21 13:55:12 -07:00
Tony Tung
e73e3e82b2 [check-code] remove reference to file that has since been removed
Test Plan: pass check code

Reviewers: #mercurial, durham

Reviewed By: durham

Subscribers: mitrandir, mjpieters

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

Signature: t1:3789049:1472521405:db4d224b1bbaab74ee5440403f59e7ed23cf65d6
2016-08-29 21:53:51 -07:00
Tony Tung
2b3e7ac198 port upgrades of buffer.h into clib
Summary:
buffer.h gained the ability to deal with non-char-sized buffers when I built cdatapack.  We need to update the callers in ctreemanifest to be aware of this.  Most of this is done with macro magic.

Some functionality was dropped from cdatapack's buffer.h (macro definitions to deal with paths).  Those are moved to path_buffer.h

Test Plan:
make local && clion build.
pass cfastmanifest unit tests.

Reviewers: #fastmanifest, durham

Reviewed By: durham

Subscribers: mitrandir, mjpieters

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

Signature: t1:3780767:1472255278:40a19edfd171df5804e9cdfa4444d5c6386f00e8
2016-08-26 17:14:52 -07:00
Tony Tung
2f5e85ccb8 move common code to clib
Test Plan: make local && build in clion

Reviewers: #fastmanifest, durham

Reviewed By: durham

Subscribers: mitrandir, mjpieters

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

Signature: t1:3780622:1472250774:fa702d78dab39eb74c8de58c0d589ae36a2c42b3
2016-08-26 15:45:43 -07:00
Ryan McElroy
9e5fa17451 Fix check code test
Test Plan: run the test

Reviewers: #mercurial, ttung, simonfar

Reviewed By: simonfar

Subscribers: mjpieters

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

Tasks: 12855049

Signature: t1:3777411:1472217139:9fe3be9ded664f3bbcd373b93be2bcfac2be593b
2016-08-26 06:27:59 -07:00
Durham Goode
ff15a890ad tests: undo lint fix for conduithttp and replace with a suppression 2016-08-01 11:56:48 -07:00
Tony Tung
b0604f946a [fastmanifest] utility to dump some specs about a tree to disk
Test Plan: run tree_dump on a fastmanifest file.  did some spot checks against the text manifest with the same sha (`hg debugdata -m`)

Reviewers: lcharignon, durham

Reviewed By: durham

Subscribers: mitrandir, mjpieters

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

Tasks: 12119301

Signature: t1:3585843:1469050470:70729d5601f935f2de80f89a7ad83590bcb8dd00
2016-07-26 23:35:53 -07:00
Ryan McElroy
8a7269b592 tests: fix check-code test after statprof move 2016-07-22 16:31:25 -07:00
Jun Wu
3884602d28 check-code: enfore checking before using common foreign extensions
Summary:
It's a common mistake that our tests require foreign extensions (namely evolve
and remotenames) without checking them first.

This diff adds checks to catch these mistakes, adds missing checks, and unifies
our checking logic using `require-ext.sh`, which is aware of `hgext3rd` and
prints skip message.

This affects `arc lint` so hopefully our new testing code would be free of this
kind of mistakes.

Test Plan: `arc lint` would catch errors

Reviewers: #mercurial, ttung, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, mjpieters

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

Signature: t1:3550977:1468455857:e849dfd9e3cbc446cc6e6c662050ee88a3366e6c
2016-07-12 20:39:34 +01:00
Jun Wu
8a3a99ba21 hgext: move single file extensions to hgext3rd
Summary:
Be a better citizen under system python path.

Fix all tests issues and change setup.py to use glob pattern to include
all extensions.

Test Plan:
Run tests and `make local`.
Also build and install the package and run `hg sl` in major repos.

Reviewers: #mercurial, ttung, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, durham, mjpieters

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

Signature: t1:3534311:1468275426:fe122646c8bd6c541e1889e73e9df28f86747ff2
2016-07-08 13:15:42 +01:00
Tony Tung
e62d8fd12b [fastmanifes] rename fastmanifest_wrapper as cfastmanifest
Summary: Depends on D3351021

Test Plan: run unit tests.

Reviewers: lcharignon

Reviewed By: lcharignon

Subscribers: mitrandir, mjpieters

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

Signature: t1:3351039:1464284522:d63f5011c6ca1981408519f5f7378e9a33aaecfe
2016-05-26 11:34:56 -07:00
Tony Tung
fc8c0d61a1 [fastmanifest] rename fastmanifest c library directory to cfastmanifest
Summary: This allows us to use fastmanifest as a directory to drop in the python module.

Test Plan: compiles, passes existing tests.

Reviewers: lcharignon

Reviewed By: lcharignon

Subscribers: mitrandir, mjpieters

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

Signature: t1:3351021:1464284417:6cbcde514ab1fd7b5caa6c83cb5577f3502dbc58
2016-05-26 11:33:07 -07:00
Tony Tung
ca29ec0954 [fastmanifest] fix ordering of check-code entries
Summary: I don't know how to alphabitize.

Test Plan: pass check code.

Reviewers: #mercurial, quark

Reviewed By: quark

Subscribers: mitrandir, mjpieters

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

Signature: t1:3299175:1463174462:3706c792e6283c6de5a869e4da98be98a476fe03
2016-05-16 16:13:44 -07:00
Tony Tung
b6202d48e1 [fastmanifest] persistence layer for trees
Summary:
API to write trees to disk and read trees from disk.

Some interesting things to keep in mind:
* To keep valgrind happy, we have to clear all the memory we allocate but never initialize. That can be padding between fields in structs, fields that don't make sense to initialize, the extra byte in checksums that doesn't get used normally, or portions of bitfields that are never used.  All this logic is kept compartmentalized in `initialize_unused_bytes(..)`.  Normal runtime does not invoke this code, though I suspect the cost is probably not significant.
* A significant chunk of the write path is made up of the `CHECKED_WRITE_XXX` macros.  They're calls to ensure that writes succeed.  If not, they jump to a fixed exit point.
* The write path is not very optimized.  We can use a bottom-up traversal, similar to tree_convert, to make the write less costly.  However, our design doesn't require a fast write, so tentatively, I'm going to reuse `tree_copy(..)` to compact a tree.

Depends on D3255048

Test Plan: pass unit tests!

Reviewers: lcharignon, wez

Reviewed By: wez

Subscribers: mitrandir, mjpieters

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

Tasks: 10589048

Signature: t1:3255656:1462342423:c28d32c610b2351614d7648c03f35f931370a770
2016-05-04 14:11:55 -07:00
Tony Tung
31ccb0f6a4 [fastmanifest] add tree_diff.c and tree_iterator.c to the build
Test Plan: make local

Reviewers: #sourcecontrol, rmcelroy

Reviewed By: rmcelroy

Subscribers: mitrandir, mjpieters

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

Signature: t1:3226569:1461768167:c5f6ba1b699a4b685dbc57c89f1dc40088ab3d2a
2016-04-27 11:44:49 -07:00
Tony Tung
10899ff617 fix check-code violations
Summary:
1) trailing ws.
2) D3204578 removed files

Test Plan: pass check-code

Reviewers: #sourcecontrol, durham

Reviewed By: durham

Subscribers: mitrandir, mjpieters

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

Signature: t1:3208944:1461366677:f1f312e17ab37d70fecfa43ce31261f3eb42814b
2016-04-25 12:01:35 -07:00
Tony Tung
4d4cb59574 [fastmanifest] rename copy to copy_tree
Summary: It's too common of a name.

Test Plan: compiles && unit tests pass.

Reviewed By: lcharignon

Differential Revision: https://phabricator.fb.com/D3192722
2016-04-18 13:23:42 -07:00
Tony Tung
b65983a069 [fastmanifest] exempt tree-path.[ch] from check-code
Test Plan: arc diff makes me run check code.

Reviewers: #sourcecontrol, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, mitrandir, mjpieters

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

Signature: t1:3160496:1460220444:7510cd4929d2fb7f5a42dd09dc890e036ad455bd
2016-04-10 00:18:56 -07:00
Laurent Charignon
71bef9dc56 remove flaky test + fix check code 2016-04-08 12:43:10 -07:00
Laurent Charignon
59bcb8e5c0 fastmanifest: add python to C layer
Summary: This adds the CPythong interface layer for fastmanifest

Test Plan: Compiles

Reviewers: ttung, durham

Differential Revision: https://phabricator.fb.com/D3157095
2016-04-08 11:48:31 -07:00
Tony Tung
91a9f27549 [fastmanifest] suppress check-code on fastmanifest
Summary: It's not going to pass.

Test Plan: run check-code

Reviewers: #sourcecontrol, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, mitrandir, mjpieters

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

Tasks: 10662043

Signature: t1:3126493:1459523935:54449c39abfef97b596e9c34743583afa8b983d5
2016-04-01 11:19:53 -07:00
Laurent Charignon
7830092e84 cleanup: add test-check-code-hg.t
Summary: Final diff of the series

Test Plan:
All tests pass with --extra-config=extensions.lz4revlog= needed
to run check-code

Reviewers: #sourcecontrol, ttung

Differential Revision: https://phabricator.fb.com/D2812684
2016-01-11 10:19:22 -08:00