Commit Graph

815 Commits

Author SHA1 Message Date
Kostia Balytskyi
b58d665964 tweakdefaults: make amend/rebase write their names to metadata
Differential Revision: https://phabricator.fb.com/D3212505
2016-04-25 08:12:10 -07:00
Martijn Pieters
df50b9a50e smartlog: style cleanups to prep for more changes.
Summary: This brings the code closer in compliance with Mercurial core.

Test Plan:
Run the tests:

   $HGSRC/tests/run-tests.py -l test-smartlog*.t

Reviewers: #sourcecontrol, ttung

Subscribers: mjpieters

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

Tasks: 10804976
2016-04-22 22:40:20 +01:00
Tony Tung
c3ea6021e1 [manifestdiskcache] set up manifestdiskcache without subclassing repo
Summary: It seems subclassing repo can cause problems when a repo is created before the extension is loaded.  This circumvents the issue by directly modifying the data structures in the repo object as needed.

Test Plan: passed test-manifestdiskcache.t

Reviewers: #sourcecontrol, mjpieters

Reviewed By: mjpieters

Subscribers: mitrandir, mjpieters

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

Tasks: 10836392

Signature: t1:3208899:1461336232:617f8b9258f23ba0b34627785dc2cb4bddcee313
2016-04-22 09:51:07 -07:00
Tony Tung
731145a0be [fbamend] catch the specific exception for failure to load extension
Summary: check-code prohibits catch-alls.

Test Plan: pass test-fbamend.t

Reviewers: #sourcecontrol, ikostia

Reviewed By: ikostia

Subscribers: ikostia, mitrandir, mjpieters

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

Signature: t1:3208934:1461273513:c7881f6f374d9db22a3062c9330cc659dab3d92a
2016-04-21 14:37:14 -07:00
Tony Tung
d8830b241e add .testtimes to .hgignore
Summary: arc diff adds this

Test Plan: meh

Reviewers: #sourcecontrol, ikostia

Reviewed By: ikostia

Subscribers: mitrandir, mjpieters

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

Signature: t1:3207936:1461258994:ae945f903b51271dd3d0d460ccf1185cd993f387
2016-04-21 10:22:48 -07:00
Tony Tung
437f10dbef [fastmanifest] utility functions for tests
Summary:
1) First one is a way to build a checksum from an integer.  It's easier to specify this than to come up with a 20B hash.

2) Second one is a quick method to add a bunch of paths to a tree.  The checksum is seeded from the checksum mechanism described above.

Test Plan: none

Reviewers: #sourcecontrol, lcharignon

Reviewed By: lcharignon

Subscribers: mitrandir, mjpieters

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

Signature: t1:3204617:1461255135:557bcadd2b7a65797d24d82b0e4335889cb09c15
2016-04-21 09:59:44 -07:00
Tony Tung
843efc38a2 [fastmanifest] clean up cmakefile
Summary: Add tree.h, which was previously missing.  Move terminal paren to next line.

Test Plan: meh

Reviewers: #sourcecontrol, lcharignon

Reviewed By: lcharignon

Subscribers: mitrandir, mjpieters

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

Signature: t1:3206730:1461254842:a2f167687705f3232fce11ec802b7e52ef9dd78d
2016-04-21 09:57:27 -07:00
Tony Tung
68c55b84d6 [fastmanifest] move hexlify and unhexlify to a separate .h file so it can be reused
Summary: I need it for a round-trip manifest iteration test.

Test Plan: used in later diff.

Reviewers: #sourcecontrol, lcharignon

Reviewed By: lcharignon

Subscribers: mitrandir, mjpieters

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

Signature: t1:3206726:1461254828:81ce23f6615ffc007c82aafad79899285c63f219
2016-04-21 09:56:45 -07:00
Tony Tung
d8feb56f44 [fastmanifest] remove old iterator stub
Summary: not using this.

Test Plan: whatever

Reviewers: #sourcecontrol, lcharignon

Reviewed By: lcharignon

Subscribers: mitrandir, mjpieters

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

Signature: t1:3204578:1461254862:cd3887c10d098b09cdd01c045b47869c6eb8a27c
2016-04-21 09:55:39 -07:00
Tony Tung
6c752ece6c [fastmanifest] remove some copypasta
Summary: This check was done a few lines up.

Test Plan: meh.

Reviewers: #sourcecontrol, lcharignon

Reviewed By: lcharignon

Subscribers: mitrandir, mjpieters

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

Signature: t1:3206733:1461254852:6bedc951d50670188981ac337dff3dbe52fda008
2016-04-21 09:54:39 -07:00
ikostia@fb.com
2d8c5ce689 fbamend: add the unamend command
Differential Revision: https://phabricator.fb.com/D3202478
2016-04-21 17:17:07 +01:00
Wez Furlong
e71ecbab09 fb-hgext: improve check code linter integration
Summary:
if you run `arc lint --output json` and don't have your environment correctly set up, the failure to run the linter was silently ignored.

I wanted to fix that, but then realized that we could integrate this better without too much effort, hence this diff.

This is a small python script that processes the output from the check code test and captures the appropriate context so that `arc lint` can show you where in the code the problem(s) lie.

Test Plan:
This is the output when the environment is not set up correctly:

```
 $ arc lint


>>> Lint for lint.py:

   Error  (S&RX) ENVIRON
    Please either set MERCURIALRUNTEST env var to the full path to
    run-tests.py, or add the containing directory to your $PATH

    >>>        1

   Error  (S&RX) ENVIRON
    Please either set MERCURIALRUNTEST env var to the full path to
    run-tests.py, or add the containing directory to your $PATH

    >>>        1
```

This is the same thing but in json output mode:

```
$ arc lint --output json
{".arcconfig":[]}
{"scripts\/lint.py":[]}
{"lint.py":[{"line":"1","char":null,"code":"S&RX","severity":"error","name":"ENVIRON","description":"Please either set MERCURIALRUNTEST env var to the full path to run-tests.py, or add the containing directory to your $PATH","original":null,"replacement":null,"granularity":1,"locations":[],"bypassChangedLineFiltering":null,"context":""},{"line":"1","char":null,"code":"S&RX","severity":"error","name":"ENVIRON","description":"Please either set MERCURIALRUNTEST env var to the full path to run-tests.py, or add the containing directory to your $PATH","original":null,"replacement":null,"granularity":1,"locations":[],"bypassChangedLineFiltering":null,"context":""}]}
```

This shows the lint errors from my `hg publish` stack:

```
>>> Lint for phabricator/arcconfig.py:

   Error  (S&RX) CheckCode
    don't raise generic exceptions

              18 def load_for_path(path):
              19     homedir = os.getenv('HOME')
              20     if not homedir:
    >>>       21         raise Exception('$HOME environment variable not found')
              22
              23     # Use their own file as a basis
              24     userconfig = _load_file(os.path.join(homedir, '.arcrc')) or {}
```

Reviewers: #sourcecontrol, ttung, lcharignon

Reviewed By: lcharignon

Subscribers: mjpieters

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

Signature: t1:3203666:1461185075:e9b03c8251d7e3b8e965b81146d17cdeac75d837
2016-04-21 08:54:54 -07:00
Tony Tung
28e952c957 [fastmanifest] remove tree_convert_rt.c from build
Summary: We don't actually need the round-trip conversion tool included in the build.

Test Plan: python setup.py build

Reviewers: #sourcecontrol, rmcelroy

Reviewed By: rmcelroy

Subscribers: mitrandir, mjpieters

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

Signature: t1:3194060:1461230493:df13d543be765ba907048836da2ebb4a0ea25259
2016-04-21 08:12:05 -07:00
Tony Tung
b560327cb9 [fastmanifest] replace %lld with PRIu64
Summary: It's the standards-compliant way of formatting integers!

Test Plan: compiles.

Reviewers: #sourcecontrol

Subscribers: mitrandir, mjpieters

Differential Revision: https://phabricator.fb.com/D3205016
2016-04-20 21:14:33 -07:00
Tony Tung
cc458c4b07 [fastmanifest] sort the list of files in the library
Summary: because i'm OCD.

Test Plan: whatever

Reviewers: #sourcecontrol, akushner

Reviewed By: akushner

Subscribers: mitrandir, mjpieters

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

Signature: t1:3204567:1461200263:a629d7310db0f5e36ed4e718cb365b21ff34fcd3
2016-04-20 21:14:05 -07:00
Jun Wu
3768f713e9 Add editorconfig
Summary:
Editorconfig (http://editorconfig.org/) is a file format helping define coding
styles like spaces, tabs etc. It supports a wide range of editors. The upstream
is using it already.

This patch adds a simple .editorconfig, making it clear we use 8-char tabs in
C code, 4-char spaces in Python and Shell scripts, and we don't keep trailing
spaces.

Besides, do a style fixes for `scripts/runcheckcode.sh`. But note that
`scripts/scm-prompt.sh` is left untouched since it was copied from other
repository and we may sync it later.

Test Plan:
Use `gg=G` in vim to format `scripts/runcheckcode.sh` and make sure it does
not showed up in Phabricator with space changes ignored.

Reviewers: #sourcecontrol, durham, ttung

Reviewed By: durham

Subscribers: durham, mjpieters

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

Signature: t1:3197242:1461129423:e24a898370f8e8eb9bea8be414fee8670f06c16d
2016-04-20 03:05:42 -07:00
Jun Wu
a6e4f96c01 Remove test-suppresscommandfailure
Summary:
It should have been done in D3191840, which removes the extension without
dealing with the test.

Test Plan: Code Review.

Reviewers: #sourcecontrol, ttung, durham

Reviewed By: durham

Subscribers: mjpieters

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

Tasks: 10906130

Signature: t1:3199159:1461128102:38e5c093fa8e36d842936f60bcde90f0846f8d82

Blame Revision: D3191840
2016-04-20 02:47:16 -07:00
Laurent Charignon
84c24b6984 test: match new quoting conventions in core
Summary:
Core changed the quoting convention in some of the warning messages,
this patch makes fb-hgext up to date with these new conventions.

Test Plan: the tests failing before are passing now

Reviewers: durham, quark, mitrandir

Subscribers: mjpieters

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

Tasks: 10906174
2016-04-19 15:33:58 -07:00
Tony Tung
1b1ca009aa [fastmanifest] compile with c99
Summary: Living dangerously with a C standard from only 17 years ago!!

Test Plan: make local

Reviewers: #sourcecontrol, akushner

Reviewed By: akushner

Subscribers: akushner, mitrandir, mjpieters

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

Tasks: 10906159

Signature: t1:3198536:1461103465:3415d87269f703c5cbab51ab3e54f05de6f5b963
2016-04-19 15:05:29 -07:00
Laurent Charignon
7c3180d675 fastmanifest: fix singleton pattern 2016-04-19 14:08:13 -07:00
Jun Wu
a57b447851 runcheckcode: make lz4revlog an optional requirement
Summary:
Before this patch, `runcheckcode.sh` sets an extra config option
`extensions.lz4revlog=`, which will break if lz4revlog is not installed
in the system. This patch drops the config option if the repo does not
require `lz4revlog`.

Test Plan: Run `runcheckcode.sh` in both lz4revlog and non-lz4revlog repos.

Reviewers: #sourcecontrol, ttung

Reviewed By: ttung

Subscribers: mjpieters

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

Signature: t1:3196200:1461088741:11cfc8f3236f471e060e768c01a772072543e6fc
2016-04-19 11:00:44 -07:00
Jun Wu
a6e1589c4f errorredirect: wrap handlecommandexception instead of sys.exit
Summary:
Since `handlecommandexception` is in core, wrap it to suppress original
crash text, instead of doing an ugly `sys.exit()`. It's much simpler and
cleaner than before. It also fixes an issue with current chg since chgserver
will print an traceback when it encounters SystemExit.

Although `logtoprocess` are doing very similar things with `errorredirect`,
it currently cannot replace `errorredirect` because we need synchronized
behavior to return the user to their shell prompt correctly. If we can get
the synchronized behavior and a way to disable builtin warning (may be tricky)
in `logtoprocess` upstream, the `errorredirect` extension could be just a thin
wrapper around `logtoprocess` using `setconfig`.

Besides, we no longer need `suppresscommandfailure` since the feature will
be either in `errorredirect` or `logtoprocess`.

Test Plan:
Run `hg crash` with `errorredirect.script` set to confirm it is compatible
with the old behavior.

Also run unittest `test-errorredirect.t`

Reviewers: #sourcecontrol, ttung, mjpieters

Reviewed By: mjpieters

Subscribers: rmcelroy, durham, lcharignon, mjpieters

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

Signature: t1:3191840:1461088280:77febd539c2f38a55778af3977738c045f63a0d8
2016-04-19 10:59:22 -07:00
Jun Wu
bcb27edfa9 Refactoring rage.py
Summary:
A couple of clean-ups for rage.py. They are small and easy to review so I'm doing it in one diff:

- Change the default behavior to print instructions asking for help in the support group.
  Since only about 20 hg rage (not counting test ones) tasks are created last year.
  The old behavior of creating tasks is still accessible by using the `--oncall` flag.
- Collect more information:
  - `hg sparse`
  - `hg version`
  - `obsstore size`
  - `rpm -q mercurial`
  - network information
  - short `hg config` only including local configs
- Adjust the order of detailed message, move hg config down since it's very long.
- Remove atexit error printer. Instead, put them in rage info directly.
- Fix code style: remove underscores in variable names, remove unnecessary indentation.
- Mark it FBONLY since it uses `tasks` and `oncalls` which are not available outside.

Test Plan:
Make sure these all work as expected:

  hg rage
  hg rage --preview
  hg rage --oncall

Reviewers: #sourcecontrol, ttung, rmcelroy

Reviewed By: rmcelroy

Subscribers: ikostia, ttung, rmcelroy, simonfar, mjpieters, sid0

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

Tasks: 10654995, 10332733

Signature: t1:3138673:1461070413:4547d8b7e438035d6af73a49094c10eab725af0d
2016-04-19 06:04:42 -07:00
Martijn Pieters
58d4cb362d Fix graphmod-related test failures
Summary:
This change fixes up tests to track graphmod changes.

The change for the smartlog test is a temporary stop-gap measure, as smartlog
itself will be updated soon to track the changes in better ways.

Test Plan:
Run the test-suite, ignore unrelated failures in test-morestatus.t, test-mergedriver.t
and test-fastmanifest.t

Reviewers: #sourcecontrol, ttung

Subscribers: mjpieters

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

Tasks: 10804976
2016-04-19 11:19:20 +01:00
Tony Tung
49272cddf4 [fastmanifest] integrate the c library with fastmanifest_wrapper
Test Plan: pass @lcharignon's simple manifest test (D2989398) with this

Reviewers: #sourcecontrol, lcharignon

Reviewed By: lcharignon

Subscribers: mitrandir, mjpieters, lcharignon

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

Tasks: 10589033

Signature: t1:3193368:1461015983:6122bf0565483830cd3bac00f838785f7ac346b7
2016-04-18 15:40:42 -07:00
Tony Tung
10bed408cb [fastmanifest] implement contains_path
Summary: It's like get_path, except with a simpler outcome.

Test Plan: passes @lcharignon's test

Reviewers: lcharignon

Reviewed By: lcharignon

Subscribers: mitrandir, mjpieters, lcharignon, #sourcecontrol

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

Signature: t1:3193277:1461015712:2eace81a2ac6b4a08ee84de0cf19b7471b740362
2016-04-18 15:40:15 -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
Laurent Charignon
39c9749c80 fastmanifest: add debug mode for testing fastmanifest for all operations
Summary:
This patchs adds a debug flag to test fasmanifest for all operations.
It also fixes the module declaration in the fastmanifest_wrapper

Test Plan: Test pass

Reviewers: ttung, durham, rmcelroy

Differential Revision: https://phabricator.fb.com/D3186826
2016-04-18 13:18:04 -07:00
Tony Tung
4294090e19 [fastmanifest] initialize flags to 0 for directory nodes
Summary: They are never read normally, except for checksum calculation.  However, we cannot let them be free-floating values because they'll affect the checksums and give us incorrect results.

Test Plan: passed a test (in a later diff) without triggering valgrind

Reviewers: #sourcecontrol, rmcelroy

Reviewed By: rmcelroy

Subscribers: mitrandir, mjpieters

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

Tasks: 10644245

Signature: t1:3155436:1460106747:9b6281490d8fe8cfeeeac8036ca7ca8e68f256d8
2016-04-18 11:40:46 -07:00
Tony Tung
305e73449d [fastmanifest] eliminate the alloc-realloc cycle from immediate node expansion
Summary: When we create new intermediate nodes as part of add_or_update_path, we add them with max_children=0.  However, the next action we do is to add a child, which immediately forces us to expand the node we just created.  This is wasteful.  We will now hint how many children the node is likely to have.  0 if it's a leaf node, or 1 if it's an intermediate node.

Test Plan: passed unit tests

Reviewers: lcharignon, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, mitrandir, mjpieters, #sourcecontrol

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

Signature: t1:3155429:1460120985:eb7ba4a3731c717fa6a9c61597a0fc980caa7589
2016-04-18 11:40:15 -07:00
Tony Tung
aaf816f8ea [fastmanifest] clone_node fails to copy all metadata
Summary: It doesn't copy the checksum_sz and flags fields over.  This is a serious problem as they are used in checksum calculation.

Test Plan: wrote unit test to verify the metadata is copied over.  failed.  updated code to copy the metadata over.  tests pass!

Reviewers: #sourcecontrol, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, mitrandir, mjpieters

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

Tasks: 10644245

Signature: t1:3155393:1460136520:10d75c5181eda88139df26d57a560af95f8ed69d
2016-04-18 11:37:14 -07:00
Tony Tung
7f08e8b0fa [fastmanifest] move tree state changes data structure to tree_path.h
Summary: It's only used internally, so it doesn't need to be in tree.h

Test Plan: passed unit tests.

Reviewers: #sourcecontrol, rmcelroy

Reviewed By: rmcelroy

Subscribers: mitrandir, mjpieters

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

Signature: t1:3151313:1460139292:ac5918f0d7249c81c31537396434f9b04c4a5a8f
2016-04-18 11:36:43 -07:00
Tony Tung
0713484f88 [fastmanifest] test that checksums for ancestor directory nodes are invalidated after updates
Summary: When we add or remove something to a path, we need to ensure that all the directory nodes leading to that path entry have their checksums invalidated.  This test verifies that behavior, and ensures that directory nodes that do *not* lead to the path entry are not invalidated.

Test Plan: pass unit test.  found the bug in D3143825

Reviewers: lcharignon

Reviewed By: lcharignon

Subscribers: mitrandir, mjpieters, #sourcecontrol

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

Tasks: 10697482

Signature: t1:3143832:1460587147:1948e6c01a2799d5010174ff8be22830f0cb9c53
2016-04-18 11:35:19 -07:00
Tony Tung
3b4e9b3313 [fastmanifest] invalidate checksums after a successful add_or_update_path
Summary: If the changes metadata structure is not updated, then we will not update the directory nodes as we walk up.

Test Plan: pass a unit test in a later diff.

Reviewers: lcharignon

Reviewed By: lcharignon

Subscribers: mitrandir, mjpieters, #sourcecontrol

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

Tasks: 10697482

Signature: t1:3143825:1459971608:9e5d91bf80020cf71cfc5aca6fb72c8cc67dce59
2016-04-18 11:34:49 -07:00
Tony Tung
f8cae10edb [fastmanifest] benchmark checksum calculation
Summary: Not sure it's functional, but once it is, it's benchmark-able!

Test Plan: compiles and runs.

Reviewers: #sourcecontrol, rmcelroy

Reviewed By: rmcelroy

Subscribers: mitrandir, mjpieters

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

Signature: t1:3141571:1460071270:5bbb1d32bd97406d2cfd88955fabe29763132c7b
2016-04-18 11:34:30 -07:00
Tony Tung
e231b3320d [fastmanifest] fix the checksum update mechanism
Summary: Incremented the wrong value.  Caught this when running a unit test to update the checksum of an empty tree.

Test Plan: passes unit test now.

Reviewers: lcharignon

Reviewed By: lcharignon

Subscribers: mitrandir, mjpieters, #sourcecontrol

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

Tasks: 10697482

Signature: t1:3140684:1459903366:be1b970281e0df91b2a62e7fac2c1d417a8be221
2016-04-18 11:34:01 -07:00
Tony Tung
495ee1e2c7 [fastmanifest] initialize_node doesn't need the max_children
Summary: It's unused.  Get rid of the parameter.

Test Plan: pass unit tests

Reviewers: #sourcecontrol, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, mitrandir, mjpieters

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

Signature: t1:3140664:1460070644:047933753763797fe40504bc1cf883e4f8f8adc7
2016-04-18 11:33:28 -07:00
Tony Tung
da7b2357da [fastmanifest] fix misnomer in cmake file
Summary: Since I'm adding a .c file, TEST_HEADER_FILES is not really an accurate description.

Test Plan: pass unit tests.

Reviewers: #sourcecontrol, rmcelroy

Reviewed By: rmcelroy

Subscribers: mitrandir, mjpieters

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

Signature: t1:3140374:1460071293:77e11a27249196564f2ee816cc50e67951325a75
2016-04-18 11:33:08 -07:00
Tony Tung
a40ffad87d [fastmanifest] add mechanism to peek at directories in tests
Summary: I need this to be able to access directory nodes for checksum testing.

Test Plan: passed unit tests

Reviewers: lcharignon

Reviewed By: lcharignon

Subscribers: mitrandir, mjpieters, #sourcecontrol

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

Tasks: 10697482

Signature: t1:3140368:1460584956:671cd08ca174795445a297ef75bee53d9f09a8ad
2016-04-18 11:32:31 -07:00
Martijn Pieters
508b666e12 logtoprocess: remove upstreamed extension
Summary: logtoprocess is now in core mercurial as an experimental extension.

Test Plan: -

Reviewers: #sourcecontrol, ttung

Subscribers: mjpieters

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

Tasks: 10805001
2016-04-18 16:08:58 +01:00
Martijn Pieters
567f9cd73e Prepare for hgwatchman being replaced by fsmonitor
Summary:
Support both fsmonitor and hgwatchman for now, until fully rolled over to
fsmonitor.

Test Plan:
Run $HG/tests/run-tests.py test-sparse-extensions.t (disable simplecache lines
if not installed to ensure the fsmonitor test at least runs).

Reviewers: #sourcecontrol, ttung

Subscribers: mjpieters

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

Tasks: 10804941
2016-04-14 10:59:05 +01:00
Laurent Charignon
351a2dad58 fastmanifest: End to end proof of concept
Summary: This adds end to end proof of concept of manifest caching supporting
different manifest type

Test Plan: Added a test

Reviewers: ttung, durham

Differential Revision: https://phabricator.fb.com/D3129530
2016-04-12 14:00:35 -07:00
Laurent Charignon
241ee64cb8 fastmanifest: remove flaky test
Summary:
We got the diagnosis information confirming our assumption but the
test is flaky and outputs different results every time. Let's remove the flaky
part of the test.

Test Plan: The test pass always

Reviewers: durham, rmcelroy, quark

Subscribers: mjpieters

Differential Revision: https://phabricator.fb.com/D3163545
2016-04-12 14:00:35 -07:00
Martijn Pieters
97461f85be Remove upstreamed automv extension
Summary:
The automv extension is now in mercurial core. Both dev servers and laptops
already use the upstream extension.

Test Plan:
run `hg debugextensions --config "extensions.automv=" --debug | grep automv` to
confirm that the extension is loaded from `hgext`.

Reviewers: #sourcecontrol, ttung, quark

Reviewed By: quark

Subscribers: mjpieters

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

Signature: t1:3162775:1460388914:20c5afff1dbf191fde476b6f8d2a210e83d33742
2016-04-12 10:11:01 +01:00
Laurent Charignon
f316c4b25d Add missing content from previous diff D3115446 2016-04-11 11:13:14 -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
Tony Tung
a23d34c3e4 [fastmanifest] extract tree path traversal code to tree_path.[ch]
Summary: I'm planning on building a find_path traversal that exposes directories, and make it available for tests.

Test Plan: pass unit tests.

Reviewers: #sourcecontrol, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, mitrandir, mjpieters

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

Signature: t1:3138945:1460071138:3eb43a1742c8b0d856f0b97421eb499d9e328310
2016-04-08 22:34:43 -07:00
Tony Tung
8db7c5eb12 [fastmanifest] rename tree_add_child() test to avoid possible conflict
Summary: It's also in tree.c.  Right now, it's a static function, but I'm planning on make it non-static.

Test Plan: pass unit tests

Reviewers: #sourcecontrol, rmcelroy

Reviewed By: rmcelroy

Subscribers: mitrandir, mjpieters

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

Signature: t1:3138923:1460071054:9105ffcbff2b4330faf22652755dc28d8313c5e2
2016-04-08 22:34:24 -07:00
Tony Tung
3525719552 [fastmanifest] get_path should not return directories
Summary: As far as the consumers of this library are concerned, directories are a non-entity.

Test Plan: wrote a unit test.  unit test fails.  made the change in `test.c`, all unit tests pass.

Reviewers: lcharignon

Reviewed By: lcharignon

Subscribers: mitrandir, mjpieters, #sourcecontrol

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

Signature: t1:3135694:1459809348:5b120e527427032857aa976278cca2ef8d3f1372
2016-04-08 22:34:03 -07:00
Tony Tung
cc38718558 [fastmanifest] get_path should not return a node_t
Summary: Callers of `get_path` do not need to know the internal representation of a node.  All they are interested in is the presence, the checksum, and the flags.

Test Plan: passed unit tests

Reviewers: lcharignon

Reviewed By: lcharignon

Subscribers: mitrandir, mjpieters, #sourcecontrol

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

Signature: t1:3135625:1459809298:4bd982091219fa94a1cfcc18238784c9c6e201b8
2016-04-08 22:33:34 -07:00