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
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
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
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
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
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
Summary: It's too common of a name.
Test Plan: compiles && unit tests pass.
Reviewed By: lcharignon
Differential Revision: https://phabricator.fb.com/D3192722
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Summary: Support for removing a path from the tree. Prunes directory nodes so we don't leave empty ones around.
Test Plan: pass unit tests.
Reviewers: #sourcecontrol, rmcelroy
Reviewed By: rmcelroy
Subscribers: rmcelroy, lcharignon, mitrandir, mjpieters
Differential Revision: https://phabricator.fb.com/D3130263
Tasks: 10589043
Signature: t1:3130263:1460140241:8d3f1824990270d693265fa8389dd5a4893c4552
Summary:
It was too easy to check in code that was not passing check-code. I
got tired of fixing it so let's add a linter :)
Test Plan:
Test that the linter works as expected and asks the user to provide
the location of run-tests.py if not set.
Reviewers: #sourcecontrol, ttung
Subscribers: mjpieters
Differential Revision: https://phabricator.fb.com/D3153365
Summary:
Before this patch the test output wasn't great looking, with this patch
one can easily see if our caching strategy worked
Test Plan: This is only a test change
Reviewers: #sourcecontrol, ttung
Subscribers: mjpieters
Differential Revision: https://phabricator.fb.com/D3129319
Tasks: 10604335
Summary: This adds the CPythong interface layer for fastmanifest
Test Plan: Compiles
Reviewers: ttung, durham
Differential Revision: https://phabricator.fb.com/D3157095
Summary:
This patch adds a wrapper that allows us to instantiate either flat
or fast manifest when a manifest is read.
This needs a change in core to work. In manifest.manifest in core we are
currently using two abstractions to create manifests: calling manifestdict()
or _newmanifest(). This was a hack added for the developement of treemanifest
and needs to be changed to make things saner.
Test Plan:
I added a new test. I also ran the whole test suite in core with
the extension, all the tests passed except test-treemanifest.t, failing on the
assert in _flatmanifest as expected.
python run-tests.py -j32 -l
--extra-config-opt=extensions.fastmanifest=/Users/lcharignon/facebook-hg-rpms/fb-hgext/fastmanifest.py
Reviewers: rmcelroy, ttung, durham
Subscribers: mjpieters
Differential Revision: https://phabricator.fb.com/D3115446
Tasks: 10589064
Summary:
Even if there is an exception in the subprocess call, make sure the fork
doesn't propagate that exception back up to mercurial.
Test Plan: Run $HG/tests/run-tests.py test-logtoprocess.t -i
Reviewers: quark, #sourcecontrol, ttung, durham
Reviewed By: ttung, durham
Subscribers: mjpieters
Differential Revision: https://phabricator.fb.com/D3139242
Signature: t1:3139242:1459880540:02ca2d80425d8d948059513990f8f2966ff74c6a
Summary:
The test requires remotenames and hg-new-workdir. Check them before running
the test.
Test Plan:
Run the test and make sure it is skipped if either of the dependencies is
missing
Reviewers: #sourcecontrol, ttung, rmcelroy
Reviewed By: rmcelroy
Subscribers: mjpieters
Differential Revision: https://phabricator.fb.com/D3153904
Tasks: 10749152
Signature: t1:3153904:1460072643:b79eb2d161330ef7a6270711590f24b57b1e768f
Summary:
After the graphmod change happened in core, `:` is used in edges. Change `.`
to `:` to make smartlog look consistent with the graphmod change.
Test Plan:
Make sure these look consistent with the latest hg:
hg sl
hg sl --config experimental.graphstyle.grandparent=X
Also run unittest:
~/hg/tests/run-tests.py -l test-smartlog.t --extra-config-opt=experimental.graphstyle.grandparent="|" --extra-config-opt=experimental.graphstyle.missing="|"
Reviewers: #sourcecontrol, ttung, rmcelroy
Reviewed By: rmcelroy
Subscribers: rmcelroy, mjpieters
Differential Revision: https://phabricator.fb.com/D3153133
Tasks: 10749152
Signature: t1:3153133:1460072873:ea28eb909b8cb069a031b8a27c844869b02b22b5
Summary:
Fix errors reported by test-check-code-hg.t
```
+ logtoprocess.py:45:
+ > # https://msdn.microsoft.com/en-us/library/windows/desktop/ms684863(v=vs.85).aspx
+ line too long
Skipping statprof.py it has no-che?k-code (glob)
+ tests/test-logtoprocess.t:38:
+ > Use head to ensure we wait for all lines to be produced, and sort to avoid
+ trailing whitespace on non-output
+ tests/test-tweakdefaults-blame.t:41:
+ > $ hg blame -p a
+ trailing whitespace on non-output
+ [1]
```
Test Plan: Run `test-check-code-hg.t` and make sure it pass
Reviewers: #sourcecontrol, rmcelroy, ttung
Reviewed By: rmcelroy
Subscribers: rmcelroy, mjpieters
Differential Revision: https://phabricator.fb.com/D3153195
Tasks: 10749152
Signature: t1:3153195:1460068592:eae6aa682c1f935f7812b72534dd761d898b62a7
Summary:
Don't blindly swallow all exceptions in getdiffstatus(). Previously this was
masking bugs in the code. Instead, only catch exceptions thrown by the initial
Popen() call. Also check the the process return code, and report an error if
it exits unsuccessfully. Fix a return statement that was incorrectly returning
an erorr message instead of replacement strings.
Also fix the code to use subprocess.communicate() instead of only reading from
proc.stdout. The old behavior could result in a hang if arc tried to print
data on stderr but we weren't reading it.
Test Plan:
Manually tested the error code paths by forcing arc to fail locally on my dev
server.
Reviewers: #sourcecontrol, ttung, lcharignon
Reviewed By: lcharignon
Subscribers: net-systems-diffs@, yogeshwer, mjpieters
Differential Revision: https://phabricator.fb.com/D3146077
Signature: t1:3146077:1459971594:ebab6a0ccb7bea66da1e23dcb88633c48b3e952b
Summary: 0 is actually a legit index, so if someone checks that instead of the node pointer, then we might find the wrong thing.
Test Plan: pass unit tests.
Reviewers: #sourcecontrol, mitrandir
Reviewed By: mitrandir
Subscribers: mitrandir, mjpieters
Differential Revision: https://phabricator.fb.com/D3130262
Signature: t1:3130262:1459557188:661eae1363bf603a77e1d17960db0a5f8f33834b