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
Summary: Move the real work to `alloc_tree_helper()`. This allows us to have the jump to cleanup without the goto.
Test Plan: pass unit tests.
Reviewers: #sourcecontrol, lcharignon
Reviewed By: lcharignon
Subscribers: lcharignon, mitrandir, mjpieters
Differential Revision: https://phabricator.fb.com/D3128539
Tasks: 10670537
Signature: t1:3128539:1459962010:d58e7ea89802416128dd312e76d619de6d29dc42
Summary:
D3022145 caused phabstatus to always fail, since it ended up passing the
timeout as to subprocess.Popen() as an integer instead of a string.
Test Plan:
Ran "hg log -r. -T'{phabstatus}\n'" and confirmed it displayed diff status
correctly, and no longer complained about not being able to run arc.
It looks like there currently aren't any existing unit tests for this
extension.
Reviewers: #sourcecontrol, andersonmat, lcharignon, ttung
Reviewed By: ttung
Subscribers: gkeramidas, net-systems-diffs@, yogeshwer, mjpieters
Differential Revision: https://phabricator.fb.com/D3145902
Signature: t1:3145902:1459968939:b0348cd20f216f7e7a2929812b24eae18e5d17c3
Summary:
This was bitrotting. We have it in source control if we want to revive
the project.
Test Plan: run-tests.py
Reviewers: #sourcecontrol, ttung
Subscribers: mjpieters
Differential Revision: https://phabricator.fb.com/D3126182
Summary: On remove_path, we need to remove the implicit nodes that are empty after we remove the leaf node. Actually typing the nodes differently makes this easier.
Test Plan: pass unit tests.
Reviewers: #sourcecontrol, lcharignon
Reviewed By: lcharignon
Subscribers: mitrandir, mjpieters
Differential Revision: https://phabricator.fb.com/D3128497
Signature: t1:3128497:1459811588:d3132edc7044061263457c7d0b5ee072b67204c9
Summary:
Create a Popen() object, and each time ui.log() is called poll these to clear
out any that are done. When dispatch ends, kill any that remain.
Test Plan: Run $HG/tests/run-tests.py test-logtoprocess.t
Reviewers: durham, #sourcecontrol, ttung, quark
Reviewed By: quark
Subscribers: ikostia, simonfar, mjpieters
Differential Revision: https://phabricator.fb.com/D3091363
Signature: t1:3091363:1459781710:4f04e37db3fb1f81abadfe168c5dbc00c376cda7
Summary:
Previously, we were calling open directly. Let's go via the vfs to
avoid nasty surprises in the future.
Test Plan:
Exisitng tests.
Also added a test, but that just verifies that the repo.vfs stuff doesn't
mess up the permissions when the umask is correct.
Reviewers: #sourcecontrol, ttung, durham
Reviewed By: durham
Subscribers: durham, mjpieters
Differential Revision: https://phabricator.fb.com/D3126492
Tasks: 10661429
Signature: t1:3126492:1459531801:0931f9b02c544f98651c7630e74283feef426175
Summary:
Still missing:
== Code and tests: ==
* remove path
* contains path (but this is essentially the same as get path)
* read/write from file
== Tests: ==
* checksumming directories
Test Plan: well, it kind of builds.
Reviewers: durham, simpkins, lcharignon
Reviewed By: lcharignon
Subscribers: net-systems-diffs@, mitrandir, mjpieters, akushner, rmcelroy
Differential Revision: https://phabricator.fb.com/D3120166
Signature: t1:3120166:1459464981:60f19dd1e36d62776a69fa88c018122a4be27d87
Summary:
We remove this test because it frequently failed in the past and
we never really fixed it. Since we don't want to ship the feature in the near
future we might as well remove it.
Test Plan: Since we don't ship it it is okay
Reviewers: #sourcecontrol, ttung, durham
Reviewed By: durham
Subscribers: quark, rmcelroy, mjpieters
Differential Revision: https://phabricator.fb.com/D3082539
Signature: t1:3082539:1458670710:1b5be4f47d5a38e8dc08f72206523afa121d31a4
Summary:
For the moment the revset is just the draft revisions, it will evolve
to include likely rebase destination, branching points etc ...
Test Plan:
We add the result of querying the revset to the test to evaluate how
well the prediction match what is actually being accessed
Reviewers: durham, rmcelroy, ttung
Reviewed By: ttung
Subscribers: mjpieters
Differential Revision: https://phabricator.fb.com/D3115578
Tasks: 10604335
Signature: t1:3115578:1459374926:f9df976aae07db05a44f1fb69a4c83c2a11969dc
Summary: Add test for rebase to see how it accesses manifests
Test Plan: This just adds a test
Reviewers: durham, ttung, rmcelroy
Differential Revision: https://phabricator.fb.com/D3109912
Summary:
It's no longer possible to amend during histedit without evolve,
also we need to make sure amending works with inhibit
Test Plan: tests
Reviewers: #sourcecontrol, lcharignon, ttung, durham
Reviewed By: durham
Subscribers: durham, lcharignon, rmcelroy, mjpieters
Differential Revision: https://phabricator.fb.com/D3120059
Signature: t1:3120059:1459455056:d178733b1b98cd269eae9f68b3b2ec6d8a140cb4
Summary:
This replaces the dirty hack preventing the smartlog from crashing on repo with
multiple roots with proper logic finding common ancestors one per group of
commits with the same root.
Test Plan: unit tests
Reviewers: #sourcecontrol, mjpieters, durham, ttung
Subscribers: mjpieters
Differential Revision: https://phabricator.fb.com/D3119913
Summary:
graphmod API has changed and now we need to provide the parents together with
the type of the parent relationship (parent, grandparent etc).
Test Plan: unit tests are passing
Reviewers: mjpieters
Differential Revision: https://phabricator.fb.com/D3119910
Summary: Someone checked in this code that does not pass check code
Test Plan: fix check code
Reviewers: #sourcecontrol, ttung
Subscribers: mjpieters
Differential Revision: https://phabricator.fb.com/D3108018
Summary:
This extension will contain the logic for the fastmanifest. For the moment it
contains very simple logic to log manifest access and see if our assumptions are
correct about what manifest are accessed during typical workflow. This will
help build the code to figure out what manifests are worth caching.
Test Plan: add a new test
Reviewers: durham, rmcelroy, ttung
Subscribers: mjpieters
Differential Revision: https://phabricator.fb.com/D3107990
Tasks: 10604335
Summary:
When a command fails, the commandfailure signal is logged. Use the information
provided by this log call to suppress the warning and all traceback
information.
In combination with the logtoprocessui extension, this should replace the less
generic errorredirect extension.
Depends on D3082490
Test Plan: run $HG/tests/runtest.py test-suppresscommandfailure.t
Reviewers: #sourcecontrol, quark, ttung, durham
Reviewed By: durham
Subscribers: mjpieters, #sourcecontrol
Differential Revision: https://phabricator.fb.com/D3084144
Signature: t1:3084144:1458755837:39fea58ed89d03a611bfcfffa88af68a2d55fddc
Summary: This would allow us to trace various events in Mercurial via external commands.
Test Plan: run $HG/tests/runtest.py test-logtoprocess.t
Reviewers: #sourcecontrol, ttung, durham
Reviewed By: durham
Subscribers: quark, mjpieters
Differential Revision: https://phabricator.fb.com/D3082490
Signature: t1:3082490:1458686100:c727b033d97d0b15b294f8b2826cf20614caf269
Summary:
_preloadrevs() and _savepreloadrevs() weren't properly catching OSErrors.
Previously the code caught IOError, but these functions are more likely to
trigger OSError if they didn't have permission to create files.
Also eliminate some unnecessary os.path.exists() checks. These checks just
perform extra system calls hitting the file system, and don't guarantee the
paths in questions actually exist by the time we get around to using them.
Test Plan: Ran the unit tests.
Reviewers: #sourcecontrol, ttung, lcharignon, durham
Reviewed By: lcharignon, durham
Subscribers: net-systems-diffs@, yogeshwer, mjpieters
Differential Revision: https://phabricator.fb.com/D3080441
Signature: t1:3080441:1458667355:c3e81a19425b949a4c67fe620c37ea2e091d7eea
Summary: The test-check-code-hg.t test was failing due to this trailing semicolon.
Test Plan: Ran the test-check-code-hg.t, confirmed it no longer complains about the code.
Reviewers: #sourcecontrol, lcharignon, ttung, andersonmat
Reviewed By: andersonmat
Subscribers: net-systems-diffs@, yogeshwer, mjpieters
Differential Revision: https://phabricator.fb.com/D3080440
Signature: t1:3080440:1458622832:f327c89378d3c8aadee9e69e391ed6a5b08af915
Summary:
If pushrebase was enabled on the client, it became impossible to push
to a non-pushrebase repo using --to, like remotenames allows. The fix is to
detect if remotenames is enabled and allow the default --to behavior.
Test Plan: Added a test
Reviewers: #sourcecontrol, ttung
Subscribers: mjpieters
Differential Revision: https://phabricator.fb.com/D3057066
Tasks: 9455435
Summary:
This adds `arcdiff.py` to wrap the mercurial diff command.
Once this is landed, the extension will need to be added to `facebook.rc`.
Test Plan: tested locally on www and fb-hgext
Reviewers: rmcelroy, durham, lcharignon
Reviewed By: lcharignon
Subscribers: jpasqualini, pyd, mjpieters, rmcelroy, lcharignon
Differential Revision: https://phabricator.fb.com/D3048888
Tasks: 10380812
Signature: t1:3048888:1458666821:78b5fde9f5523e40ffa6ae95fed1b773091e1be8
Summary:
When a pull causes commits on the tip of a branch to be obsoleted due to
landing, make sure that parent commits that were landed in previous pulls also
get hidden. The parent commits would already have obsolete markers, but they
would have been inhibited because there were non-obsolete children. Once their
children are landed their obsolete markers can now be deinhibited.
Test Plan: Added a new test case.
Reviewers: #sourcecontrol, durham, lcharignon, ikostia, pyd, ttung
Subscribers: net-systems-diffs@, yogeshwer, mjpieters
Differential Revision: https://phabricator.fb.com/D3028597
Test Plan: tested timeout on local repo to ensure it aborted the request correctly
Reviewers: lcharignon
Reviewed By: lcharignon
Subscribers: ssl-diffs@, mjpieters, jpasqualini
Differential Revision: https://phabricator.fb.com/D3022145
Tasks: 10112339
Signature: t1:3022145:1458227284:8aa17f8e4f64e4b8cb2b04a55c3939f7bf2e011f
Summary: Changes made to the githelp.py file so that the command 'hg git am' produces the correct output. Citation for corresponding git command: https://www.wikivs.com/wiki/Git_vs_Mercurial
Test Plan: Tested on my dev server using the command "hg git --config 'extensions.githelp=githelp.py' am" which produces the correct output: "hg mimport -m (Requires the MboxExtension and the MqExtension. Imports patches to mq.)". Screenshots are attached.
Reviewers: menglu, cdelahousse, rmcelroy
Reviewed By: rmcelroy
Subscribers: mjpieters
Differential Revision: https://phabricator.fb.com/D3034942
Signature: t1:3034942:1457641019:5307d255ee581fd05716222c087626d880ecc931
Summary:
fbamend was not passing a rebase destination if you did not have an active
bookmark (it would just rebase onto the named branch tip). This broke when
upstream Mercurial started requiring you specify a rebase destination when it
was ambiguous.
The fix is to rebase onto the current commit (which is always the correct
behavior, since amend --rebase will have left you on that commit after the
amend, and amend --fixup discovers what needs rebasing by looking at your
current commit).
Test Plan: Added a test
Reviewers: #sourcecontrol, ttung
Subscribers: mjpieters
Differential Revision: https://phabricator.fb.com/D3033728
Tasks: 10366715
Summary:
The singlepublicsuccessor docstring was missing the option name, causing it its
help text to show up by itself in the "hg help templates" output, without
mentioning what option it corresponded to.
Also add a "String." note at the beginning, to match the formatting of all the
other template help docs.
Test Plan: Ran "hg help templates" and confirmed the help formatting was fixed.
Reviewers: #sourcecontrol, durham, ikostia, ttung, rmcelroy
Reviewed By: rmcelroy
Subscribers: net-systems-diffs@, yogeshwer, mjpieters
Differential Revision: https://phabricator.fb.com/D3027413
Signature: t1:3027413:1457483486:8a44af970ddb3ebbc7f3fe8ff61b15a6a5339030
Summary:
I found that there's a 100ms delay in every Mercurial command from the
branchmap checking if every branch head is actually in the repository. This is
because checking an old head requires scanning and caching all the node-rev
mappings for hundreds of thousands of commits.
The fix is to keep a set of files that contain rev numbers of interest, then at
the beginning of the command we load look up the nodes for those revs (cheap
because rev's have a fixed offset in the changelog.i file), and store the
node-rev mapping in the cache. This takes about 6ms, vs the 100ms before.
Test Plan: Ran the mercurial test suite with this option enabled
Reviewers: mateusz, #sourcecontrol, ttung
Subscribers: mjpieters
Differential Revision: https://phabricator.fb.com/D3009456