Summary:
`hg version`, as of the last path, currently prints:
```
Mercurial Distributed SCM (version 20180123_174746_5cb750b72031)
Facebook Mercurial release: UNKNOWN-RELEASE
```
There's no need for us to print the second line now that the first represents the internal version ID.
(Note: this ignores all push blocking failures!)
Reviewed By: quark-zju
Differential Revision: D6794821
fbshipit-source-id: 499828832a0acb066adc260f852c3a743e41a563
Summary:
When used with hggit, simplecache would treat all hggit overlayctxs as having the `nullid` node. This is used in the cache key for the result of `status()`; this caused the return value of all hggit's changectxs' `status()` to be intermingled.
There are arguably two issues here:
- hggit's `overlaychangectx` simply implemented `node()` and didn't set a `_node` like changectx does. Changectx refers to this property internally (and other external callers might do so too) so we should probably set it.
- simplecache was reading the `changectx._node` property instead of the more public `changectx.node()`. This returned `nullid` because of the above.
Either change would fix it but I sent both to be safe. I look forward to tightening the context class interfaces in the future.
(Note: this ignores all push blocking failures!)
Reviewed By: quark-zju
Differential Revision: D6788335
fbshipit-source-id: eb4b3cebc1b6ee6011405cdb7d702cdf5cac0904
Summary:
Same fix as D6788335, though not blocking anything. Use the public `node()` function
on contexts and exclude None, nullid, and wdirid from caching.
Reviewed By: DurhamG
Differential Revision: D6790845
fbshipit-source-id: 4ccdc6889c993bb1a8379d50ecc92cb2aa03513d
Summary:
This fixes an obvious mistake. It wasn't noticed because it's part of the last
"cleanup" before landing the change. And it runs on a big repo which hides
the problem.
On smaller repos, changelog is inlined and clindex won't be used because the
Rust index does not support inlined revlogs. `repo.updatecaches()` will raise
`AttributeError` since the original `self.changelog.index` object does not have
`updatecaches()`. In that case, it's obvious that we should not skip the
original `repo.updatecaches()` call. The same applies to `repo.destorying()`.
Since after the fix, tests are passing. Let's enable clindex by default. As
explained above, clindex is not actually well exercised because of inlined
revlog. We should probably special case changelog to be always non-inlined.
That's probably a separate diff.
Reviewed By: phillco
Differential Revision: D6767200
fbshipit-source-id: c8432eec6c02c06c4d49c13df150e1b25bbaa1aa
Summary:
This extension can be a bit noisy when defaulted-on. Let's disable its debug output in
tests (except fot its own tests).
Differential Revision: D6777765
fbshipit-source-id: e2a6c6b7527336a1fac24078d2b49eb1e75ecabf
Summary:
The keyword extension is rarely used. And it breaks sshaskpass because
Python standard library `collections` (which does not use absolute import)
will import the wrong `keyword` module:
$ hg pull ssh://localhost/foo --debug
pulling from ssh://localhost/foo
running SSH_ASKPASS=/tmp/tmpj_6pDJttysrv/2991364.sh DISPLAY=localhost:10.0 TTYSOCK=/tmp/tmpj_6pDJttysrv/2991364 ssh -oControlMaster=no localhost 'hg -R foo serve --stdio'
sending hello command
sending between command
remote: Traceback (most recent call last):
remote: File "/usr/lib64/python2.7/site-packages/hgext/sshaskpass.py", line 43, in <module>
remote: import collections
remote: File "/usr/lib64/python2.7/collections.py", line 10, in <module>
remote: from keyword import iskeyword as _iskeyword
remote: File "/usr/lib64/python2.7/site-packages/hgext/keyword.py", line 93, in <module>
remote: from mercurial.i18n import _
remote: File "/usr/lib64/python2.7/site-packages/mercurial/i18n.py", line 15, in <module>
remote: from . import (
remote: File "/usr/lib64/python2.7/site-packages/mercurial/encoding.py", line 15, in <module>
remote: from . import (
remote: File "/usr/lib64/python2.7/site-packages/mercurial/error.py", line 17, in <module>
remote: from . import pycompat
remote: File "/usr/lib64/python2.7/site-packages/mercurial/pycompat.py", line 22, in <module>
remote: import cookielib
remote: File "/usr/lib64/python2.7/cookielib.py", line 32, in <module>
remote: import re, urlparse, copy, time, urllib
remote: File "/usr/lib64/python2.7/urlparse.py", line 123, in <module>
remote: from collections import namedtuple
remote: ImportError: cannot import name namedtuple
Reviewed By: singhsrb
Differential Revision: D6766686
fbshipit-source-id: af67a4d8c736158951c737b790904ba11419d432
Summary:
Added options supported by diff:
```
-w --ignore-all-space ignore white space when comparing lines
-b --ignore-space-change ignore changes in the amount of white space
-B --ignore-blank-lines ignore changes whose lines are all blank
-Z --ignore-space-at-eol ignore changes in whitespace at EOL
```
Differential Revision: D6738122
fbshipit-source-id: bd4236ce7cb9d5f803f932cfec267de71b0067c2
Summary:
Some consumers still rely on enabling 'sparse=' so let's add a module
that just redirects to the real fbsparse.py.
Also updates configerator to use the newer name.
Reviewed By: markbt, quark-zju
Differential Revision: D6755971
fbshipit-source-id: 3a67f029045dacf927742a616a714fe632b97fea
Summary:
The isgooddelta tweak was introduced in D2693043 (perftweaks: change revlog
delta heuristic, 2015-11-24). Comparing with the existing version, the only
change is that we removed `dist > maxdist` check.
Note that the upstream commit 895ecec31 (revlog: add an experimental option
to mitigated delta issues (issue5480), 2017-06-23) also introduces a config
option to override `maxdist` to make the condition fail, which basically does
a same thing.
Instead of introducing new config options or adding more "if"s to the
codebase to make it more obscure, let's just simplify it by disabling the
check entirely, and removing the `dist` concept, removing two config
options: `experimental.maxdeltachainspan` and `perftweaks.preferdeltas`.
The `chainlen > self._maxchainlen` check should be enough for keeping
delta chain length bounded.
Reviewed By: DurhamG
Differential Revision: D6752529
fbshipit-source-id: e8fd8ec39240191db5fb274190fc661e97087a78
Summary:
This enables clindex for its nodemap. Verification is turned off by default
for the performance win since we have been running verification in
production for a while.
Reviewed By: phillco
Differential Revision: D6751412
fbshipit-source-id: bc3e87df86e86a758392bdd4aef3e282f397fe04
Summary: Also change the internal API so it no longer accepts the "heads" argument.
Reviewed By: ryanmce
Differential Revision: D6745865
fbshipit-source-id: 368742be49b192f7630421003552d0a10eb0b76d
Summary: This removes the effectflag logic from both core and perftweaks.
Reviewed By: ryanmce
Differential Revision: D6745769
fbshipit-source-id: 55ed1676e7117bca358471c256805ded7bc83f3c
Summary:
It's pretty handy. The implementation is simple and clean. So move it from
contrib and enable it by default. "import"s are adjusted to make the module
checker happy.
Security and UX wise, since we have `--debugger` already, adding another
REPL seems fine.
Test Plan: Ran all tests
Reviewers: phillco, #mercurial
Reviewed By: phillco
Differential Revision: https://phabricator.intern.facebook.com/D6741283
Signature: 6741283:1516225662:ddc19a663e7ecef2a1fdaa5041f308dc838a8471
Summary:
`lfs` is the better large file solution. `largefiles` is rarely used, and
its implementation is less clean. So let's remove it.
Test Plan:
Ran all tests. A subrepo test was removed instead of cleaned up since the
longer term plan is to also drop subrepo support.
Reviewers: phillco, #mercurial
Reviewed By: phillco
Differential Revision: https://phabricator.intern.facebook.com/D6740361
Signature: 6740361:1516225594:555e3803571ad05e0434021897a2823ac99347ae
There's no need to do this and not doing so speeds up IMM tremendously when the sparse profile had to be adjusted.
(This is the grafted version from the fb-hgext repo)
Test Plan:
I ran an IMM before and after this change. Both succeeded but the later version was
much faster.
Differential Revision: https://phab.mercurial-scm.org/D1805
Summary: This is a quick way to ensure that if IMM goes wrong in a way that isn't conflict related (e.g. an uncaught exception) we restart and log to scuba.
Test Plan: ./run-tests.py
Reviewers: durham, quark, #mercurial
Reviewed By: durham, quark
Differential Revision: https://phabricator.intern.facebook.com/D6734117
Signature: 6734117:1516152432:5620b12579d41dca2ea8f15b08a8007e2f6467fc
Summary:
This gives us an easy way to ensure IMM is disabled automatically if the user configures a
mergedriver script.
Test Plan: run-tests.py
Reviewers: durham, #sourcecontrol
Reviewed By: durham
Subscribers: durham
Differential Revision: https://phabricator.intern.facebook.com/D6668421
Signature: 6668421:1515185587:a190311f1d57a9a604cb609a63ebc296dad11db3
Summary:
The initial value of lastdestnode should be the commit onto which the rebase is
happening.
It should be updated whenever a new commit is added for which the p1 parent is
the old last dest node.
Test Plan: Run the new test, and show it now works.
Reviewers: durham, rmcelroy, #mercurial
Reviewed By: rmcelroy
Subscribers: mitrandir
Differential Revision: https://phabricator.intern.facebook.com/D6709108
Signature: 6709108:1515760332:32bef9892792c7c94117b8fe14364937d98ebbac
Summary: Based on feedback to D6687860.
Test Plan: n/a
Reviewers: durham, #mercurial
Reviewed By: durham
Differential Revision: https://phabricator.intern.facebook.com/D6714211
Signature: 6714211:1515788399:386b8f7330f343349234d1f317e5ac0a594142cf
Summary: The text was wrong.
Test Plan: Make sure the new text match the function signature.
Reviewers: mitrandir, #mercurial
Reviewed By: mitrandir
Differential Revision: https://phabricator.intern.facebook.com/D6710509
Signature: 6710509:1515758961:65184b83ddda417c9125c675986093ef52660fbb
Summary:
These import statements are actually broken -- I don't know how they were working before. (Perhaps because `demandimport` tries a few different paths.)
But this makes them work without demandimport.
Test Plan: HGDEMANDIMPORT=disable ./hg st
Reviewers: quark, singhsrb, #mercurial
Reviewed By: singhsrb
Subscribers: quark
Differential Revision: https://phabricator.intern.facebook.com/D6713858
Signature: 6713858:1515787418:23a78b8a439e7d114ead81dc9a136478f98f7e50
Summary: When running hg ssl, if the .arcrc file is not proper JSON
(e.g., has a trailing comma), json.loads raises an exception that
was not being caught and lead to a stacktrace.
Test Plan: Locally run hg ssl with a bag .arcrc and the stack trace was gone.
Also write a test in test-fb-hgext-phabstatus.t
Reviewers: simonfar
Subscribers: luizmramos
Tasks: T24993088
Tags:
Summary:
This allows the lfs module to be enabled via path like `lfs=.../hgext/lfs`.
It's used by the next patch.
In the future, we will likely just delete largefiles extension so the duplication
is temporary.
Test Plan: Ran all tests.
Reviewers: mbthomas, #mercurial
Reviewed By: mbthomas
Differential Revision: https://phabricator.intern.facebook.com/D6700815
Signature: 6700815:1515722229:a3a331ca8a73491070ffe6c6af1f9919e2cdbaab
Summary:
In three places hgsubversion was assigning a mutable object as a default parameter, a risky construct that was causing test-check-pylint.t to
fail. The pylint test is useful, so let's just fix these call sites.
Test Plan:
Run `test-check-pylint.t` before and after, see the following block disappear:
```
+ ************* Module hgext.hgsubversion.util
+ W:225, 0: Dangerous default value [] as argument (dangerous-default-value)
+ ************* Module hgext.hgsubversion.wrappers
+ W:405, 0: Dangerous default value [] as argument (dangerous-default-value)
+ ************* Module hgext.hgsubversion.svnrepo
+ W:115,12: Dangerous default value [] as argument (dangerous-default-value)
+ [4]
```
Reviewers: durham, quark, #sourcecontrol
Reviewed By: durham, quark
Differential Revision: https://phabricator.intern.facebook.com/D6701282
Signature: 6701282:1515649087:4edc2442bc3efea5d402d7a5ab6c552c7e43e61d
Summary: Some files had missing imports; fix them.
Test Plan: Test suite now has fewer failures.
Reviewers: singhsrb, #sourcecontrol
Reviewed By: singhsrb
Subscribers: singhsrb
Differential Revision: https://phabricator.intern.facebook.com/D6701257
Signature: 6701257:1515648742:cf402234bbe67b08138f942ead8240a596298b7e
Summary:
We'd like to have a lightweight, portable tool to upload and download certain
binaries without checking them in.
This diff makes LFS do that. It's intended to be used for Rust vendored assets,
Cython and other dependencies' tarballs, and a prebuilt Python using MSVC on
Windows.
Comparing with dewey, this would unblock our Windows build.
Test Plan: Added a test.
Reviewers: durham, #mercurial
Reviewed By: durham
Subscribers: durham
Differential Revision: https://phabricator.intern.facebook.com/D6699099
Signature: 6699099:1515633647:2fb90c8ecb4395b0b12e8e8baf1c5ee7fa4d84b0
Summary:
A remote blobstore should have nothing to do with a local repo. It only
cares about certain configs. Let's make it so.
This makes the next change cleaner.
Test Plan: Ran all tests.
Reviewers: phillco, #mercurial
Reviewed By: phillco
Differential Revision: https://phabricator.intern.facebook.com/D6698999
Signature: 6698999:1515630172:e759b5dabfe21f141e58e29c8b7cece576105be7
Summary:
This makes the upcoming change easier. `file:` URL is only used by test code
so it should not affect end-user experience. Currently tests using it use
absolute path so they are unaffected.
Test Plan: LFS tests are passing.
Reviewers: durham, #mercurial
Reviewed By: durham
Differential Revision: https://phabricator.intern.facebook.com/D6698286
Signature: 6698286:1515633318:c8f911172380596ffd934ac569316ab881d0ad58
Summary: They are no longer used.
Test Plan: LFS tests are passing. Also check the config being used today.
Reviewers: durham, #mercurial
Reviewed By: durham
Differential Revision: https://phabricator.intern.facebook.com/D6698242
Signature: 6698242:1515633277:0b8ab80c1c182c0c28066f85be56934c30fe0457
Summary:
D5617283 requires test-lfs-test-server.t to be able to resolve an internal
domain and also requires some certain implementation detail at the endpoint
(ex. set error.code).
That will not work outside internal network. Let's change the test to just
use `lfs-test-server`. Note the logic also needs to be changed sicne
lfs-test-server does not set error.code to 404 but just removes "download"
from "actions".
Test Plan: Ran all tests.
Reviewers: durham, davidsp, #mercurial
Reviewed By: durham
Differential Revision: https://phabricator.intern.facebook.com/D6698170
Signature: 6698170:1515633241:2496a4c02de6916a8f74ac67c4628e6e3a049b1b
Summary:
hgsubversion now exists in hgext.hgsubversion, so the imports need to
be updated everywhere.
Test Plan: Ran the tests
Reviewers: singhsrb, #mercurial
Reviewed By: singhsrb
Differential Revision: https://phabricator.intern.facebook.com/D6698653
Signature: 6698653:1515628610:daad45a0e7566c784a4f5c8d7e6e5fed8976b92b
Summary: Move's the extension code into hgext/
Test Plan: Tests are fixed in a later commit.
Reviewers: quark, #mercurial
Reviewed By: quark
Differential Revision: https://phabricator.intern.facebook.com/D6698506
Signature: 6698506:1515628404:0006a07cef299eb3cd719f2fc0d5d381fdc2a3d5
Summary:
Moves the moreversion extension to hgext/ and updates the core setup.py
to process it. Eventually we should get rid of this and store the version number
as the normal Mercurial number, but that can happen later.
Test Plan:
make local && ./hg version
Mercurial Distributed SCM (version 4.4.2+8922-aa235b4cbeac+20180110)
Facebook Mercurial release: UNKNOWN-RELEASE
Reviewers: phillco, #mercurial
Reviewed By: phillco
Differential Revision: https://phabricator.intern.facebook.com/D6696199
Signature: 6696199:1515621476:7835f9110ec143737c488faf49cf547eee8f918e
Summary: Update import statements and code to match core linters.
Test Plan:
`run-tests.py -j8`
Source these versions of phabdiff.py, arcdiff.py, and phabstatus.py in my hgrc. Run hg st, diff, ssl and observe no crashes.
Reviewers: durham, rmcelroy, phillco, #mercurial
Reviewed By: rmcelroy
Subscribers: rmcelroy, quark, awestern
Differential Revision: https://phabricator.intern.facebook.com/D6680961
Signature: 6680961:1515578477:ea5f1591e390f6ca8a94f652daeb1db9de819fea
Summary:
Now that we moved infinitepush to hgext in D6691670, we can also move
the tests. The sql related tests need special attention because of the db
connection and mysql connector.
Test Plan:
Ran all the tests. Removed the mysql connector and checked that the
test is skipped. Also checked that the test is skipped if the db connection
details are not specified.
Reviewers: ikostia, singhsrb, #mercurial, #sourcecontrol
Reviewed By: ikostia
Subscribers: rmcelroy
Differential Revision: https://phabricator.intern.facebook.com/D6691821
Signature: 6691821:1515600428:279dc4796c9be721c5fa81ac2dcd6e065ac30f18
Summary:
We changed the location of infinitepush which exposed it to the
additional test that failed. This commit fixes infinitepush to address that
test.
Test Plan: Ran all the tests.
Reviewers: rmcelroy, #mercurial, #sourcecontrol
Reviewed By: rmcelroy
Subscribers: rmcelroy
Differential Revision: https://phabricator.intern.facebook.com/D6691723
Signature: 6691723:1515578651:230bafc88354ecf10a31487967b43ab46a5a1279
Summary:
We changed the location of infinitepush which exposed it to the
additional test that failed. This commit fixes infinitepush to address that
test.
Test Plan: Ran all the tests.
Reviewers: rmcelroy, #mercurial, #sourcecontrol
Reviewed By: rmcelroy
Differential Revision: https://phabricator.intern.facebook.com/D6691691
Signature: 6691691:1515578616:1ab451468835cc67a35f1d4d6e56a71f48db47e1
Summary:
This is part of the overall plan to move extensions from fb-hgext to
hgext. Follow up commits will address some of the test issues and move the
infinitepush related tests out of fb-hgext to hgext.
Test Plan: Ran all the tests.
Reviewers: rmcelroy, #mercurial, #sourcecontrol
Reviewed By: rmcelroy
Differential Revision: https://phabricator.intern.facebook.com/D6691670
Signature: 6691670:1515578586:8d7836aebb474856559c6dbe6fe2f572c8bdf7f1
Summary:
pushrebase extension adds the --to option to push command if the
remotenames extension is not loaded. This is not a robust enough check as other
extensions like infinitepush can also add the --to option leading to duplicate
options. This commit addresses the same.
Test Plan: Ran all the tests.
Reviewers: rmcelroy, #mercurial, #sourcecontrol
Reviewed By: rmcelroy
Differential Revision: https://phabricator.intern.facebook.com/D6691642
Signature: 6691642:1515578521:9f783df23df9fa8d3291a6f050cc1d5b6e5dd2fa
Summary:
Rust dependencies are vendored in by downloading a package containing all Rust
dependencies.
The package can be updated using the new `vendorcrates.py` script.
Test Plan: Build using the vendored packages.
Reviewers: quark, #mercurial
Reviewed By: quark
Differential Revision: https://phabricator.intern.facebook.com/D6689642
Tasks: T24908724
Signature: 6689642:1515548647:8051ec3dadd98873f0312bb67978846ba029b558
Summary:
Reorder the imports to make the module checker happy.
The module checker should be aware of Cython module paths. Do it manually.
Test Plan: Run `test-check-module-imports.t`
Reviewers: durham, #mercurial
Reviewed By: durham
Differential Revision: https://phabricator.intern.facebook.com/D6688384
Signature: 6688384:1515540420:bec02696b24c12cb4fa2595fd235fc8f3246b2a2