Commit Graph

8 Commits

Author SHA1 Message Date
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
Tony Tung
56aaa74bc9 collapse all the build files into one
Summary: One giant CMake file.  Only I use CLion, so i don't think this affects anyone else.

Test Plan: make in clion. run cfastmanifest unit tests.

Reviewers: #fastmanifest, durham

Reviewed By: durham

Subscribers: durham, mitrandir, mjpieters

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

Signature: t1:3780573:1472250750:ece55fb66a656624335c8432ab3c8334699ea36e
2016-08-26 15:41:33 -07:00
Tony Tung
a7555791cd [fastmanifest] fix unhexlify
Summary:
Strictly speaking, it doesn't care if it's the length is SHA1_BYTES * 2.  It just has to be even.

Also, size_t comes from stddef.h.

Test Plan: make local

Reviewers: durham, lcharignon

Subscribers: mitrandir, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3626828
2016-08-02 15:35:49 -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
Tony Tung
3cb14683b0 [fastmanifest] enforce strict prototypes
Summary: Newer versions of gcc (5.x) turn on `-Wstrict-prototype` by default.  Turn this on in our setup.py file for older compilers, and fix the errors that crop up from this.

Test Plan: make local

Reviewers: tnardone, wez, lcharignon

Reviewed By: lcharignon

Subscribers: mitrandir, mjpieters

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

Signature: t1:3414620:1465514102:d91026062582e2a3ab3fc773bbf17686fa38609f
2016-06-09 22:45:05 -07:00
Tony Tung
ca3c7733aa [fastmanifest] fix buffer expansion in tree conversion code
Summary:
# We need to track the enlarged buffer capacity.  If not, we will never enlarge the buffer again.
# The realloc was undersizing the buffer.

Test Plan:
successfully convert the opsfiles manifest using valgrind + test_convert_rt.

run `hg --config=extensions.fastmanifest= debugcache --all` on opsfiles-hg

Reviewers: wez, durham, lcharignon

Reviewed By: lcharignon

Subscribers: mitrandir, mjpieters

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

Signature: t1:3369621:1464792791:4bc83c39c0355644a0933b2ea3f544fd99894698
2016-06-01 09:27:17 -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