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:
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:
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:
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:
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:
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: 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:
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:
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
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: 1e42206a9778 in core hg broke this.
Test Plan: run the test and it doesn't fail
Reviewers: #sourcecontrol, ttung, durham
Reviewed By: durham
Subscribers: durham, mjpieters
Differential Revision: https://phabricator.fb.com/D3012325
Tasks: 10299400
Signature: t1:3012325:1457118454:6b551be9d826d17ecff18f271b31d9dc0218f461
Summary:
Use a transaction, to make sure commits get hidden properly. Currently it
fails to hide all commits if multiple commits on the same branch are all
obsoleted in the same pull. When creating obsolescence markers for some of the
earlier commits, it thinks they still have non-hidden successors, and doesn't
know that these successors are also going to be hidden by the same pull
operation.
Also avoid walking all draft commits if nothing new was landed in this pull.
Test Plan:
Updated the tests to exercise the case where a pull obsoletes multiple commits
all at the tip of a branch.
Reviewers: #sourcecontrol, lcharignon, ikostia, durham, ttung
Reviewed By: durham
Subscribers: durham, net-systems-diffs@, yogeshwer, mjpieters
Differential Revision: https://phabricator.fb.com/D3013783
Signature: t1:3013783:1457136740:cbcd0220e82d044d25a34692793e70f5be61d63e
Summary: When someone specifies a repository with --repository/-R, the working directory could be anything. Therefore, the worker process to prune the cache needs to know which directory to switch to.
Test Plan: wrote a test case with this scenario. fails without patch, succeeds with it.
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: mitrandir, mjpieters
Differential Revision: https://phabricator.fb.com/D2991853
Tasks: 10230869
Signature: t1:2991853:1456799093:dd03ac1d003f2efd0de0bad740d4792ae81b172e
Summary:
If a mirror of a file is missing, dirsync now behaves better:
- When deleting the source, it allows the commit and does no mirroring since the two paths are already in sync (previously, it raised an exception when trying to delete the mirror)
- When updating the source, it creates a file in the mirrored location to match
- When updating (creating) the mirrored file, the source (which already exists) is updated too
Fixes https://www.facebook.com/groups/sourcecontrol/permalink/929877003728587/.
Test Plan: `../../hg/tests/run-tests.py test-dirsync.t`
Reviewers: #sourcecontrol, durham, lcharignon, ttung
Reviewed By: durham
Subscribers: poshannessy, mjpieters, durham
Differential Revision: https://phabricator.fb.com/D2794928
Signature: t1:2794928:1456446576:c18d06a42eb89b5168c25d048ba4fa1fa3f0c6d3
Summary: This allows us to differentiate between remote output and local output.
Test Plan: pass unit test
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: mitrandir, mjpieters
Differential Revision: https://phabricator.fb.com/D2955753
Signature: t1:2955753:1455918979:235a4d8ca317a0568e5d3a72d1cd1e2baf09a910
Summary: On the server, we explicitly disable remotenames. We should test that identical config here.
Test Plan: pass unit test
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: mitrandir, mjpieters
Differential Revision: https://phabricator.fb.com/D2955740
Signature: t1:2955740:1455918916:0b1d50d3855dddc579b451f036b46ea0275f2507
Summary:
The pushvars extension ensures that it precedes the hooks.
Unfortunately, that means pushrebase does not have access to the hook
variables unless it obtains the transaction. If it does that, then the
prepushrebase step will have the lock, defeating the purpose of the hook.
By storing the pushvars in the operation, we can retrieve it without
starting the transaction.
Test Plan: passes the BYPASS_REVIEW test when it is moved to prepushrebase
Reviewers: #sourcecontrol, durham, lcharignon
Reviewed By: durham
Subscribers: durham, mitrandir
Differential Revision: https://phabricator.fb.com/D2890191
Tasks: 9872386
Signature: t1:2890191:1454526611:503a30015494eef467ad545b92077bf42cdd30d5
Summary: githelp had desynced from show. Update githelp and its test case to match modern show.
Test Plan: Run the upadted test case
Reviewers: rmcelroy, lcharignon, quark
Reviewed By: quark
Subscribers: quark, mjpieters, #sourcecontrol
Differential Revision: https://phabricator.fb.com/D2937517
Signature: t1:2937517:1455570702:8414a3f6f05736b9c728950f7019c602234f48fb
Summary:
rage is a basic tool to collect diagnostic information that should not break.
To ensure it works all the time, this patch:
- unbreaks hg rage from upstream change dad6404ccd
- wraps every non-trivial functions with `try`, `catch`
- adds a naive test about `hg rage --preview`
Test Plan:
Run `test-rage.t`. Comment out `import blackbox` and check:
```
hg blackbox -l20:
---------------------------
(Failed. See footnote [1])
[1]: global name 'blackbox' is not defined
Traceback (most recent call last):
File "/home/quark/fb-hgext/rage.py", line 22, in _failsafe
return func()
File "/home/quark/fb-hgext/rage.py", line 97, in <lambda>
_failsafe(lambda: hgcmd(blackbox.blackbox, limit=20))),
NameError: global name 'blackbox' is not defined
```
Reviewers: #sourcecontrol, wez, ttung, durham
Reviewed By: durham
Subscribers: durham, wez, mjpieters
Differential Revision: https://phabricator.fb.com/D2928778
Tasks: 10028490
Signature: t1:2928778:1455240651:d39ceed5d045e279160690e0a93a4e326d307db3
Summary:
Make hg show closer in behaviour to git show - it's useful to restrict the files it examines, not just the revision
Also update githelp.py to match.
Test Plan: Run the updated testcases.
Reviewers: lcharignon, pyd, rmcelroy, durham
Reviewed By: durham
Subscribers: #sourcecontrol
Differential Revision: https://phabricator.fb.com/D2917091
Tasks: 9323445
Signature: t1:2917091:1455240831:305be81ada4b832a9685f5bf38f3c3232c47fdfb
Summary:
Quick fix for smartlog to make it work when having to separate repositories in the repo.
It's not perfect (it shows the second history before master) but it's better than nothing.
Test Plan: All tests are passing . One test added.
Reviewers: #sourcecontrol, durham, ttung, ericsumner
Reviewed By: durham
Subscribers: mjpieters, durham
Differential Revision: https://phabricator.fb.com/D2904476
Tasks: 9812246
Signature: t1:2904476:1455239810:9f88d87b15646bfd107f0b1dc888804d392c35da
Summary: We've had a query about getting more context on hg show. While upstream is unlikely to respond well to requests for a new toplevel option, it is actually possible to use --config to get more context. Tell people about this with githelp.
Test Plan: Run the newly updated tests.
Reviewers: pyd, rmcelroy, durham
Reviewed By: durham
Subscribers: #sourcecontrol
Differential Revision: https://phabricator.fb.com/D2916982
Tasks: 9907950
Signature: t1:2916982:1455077490:8b804e09ad656a2b5a7aca8f2e4e81da6e541806