Summary: The time column was missing in the bookmark test table
Reviewed By: StanislavGlebik
Differential Revision: D6819122
fbshipit-source-id: c0b4ede651ba5c598f0384580942cfb727b5fe61
Summary:
py2exe allows us to reduce startup time by 0.4s to 1s in some cases.
Depends on D6798345
Reviewed By: DurhamG
Differential Revision: D6798433
fbshipit-source-id: 566cd01f33c7bce32f577bd7b662642a4316c92b
Summary:
I got tired of my prompt taking a long time to return to me sometimes after a command ended, and started to investigate, and found this:
```
aregner 4069767 0.0 0.0 115052 5076 pts/17 Ss+ 12:32 0:00 \_ -bash
aregner 298922 0.0 0.0 115052 3540 pts/17 S+ 14:40 0:00 | \_ -bash
aregner 298923 0.0 0.0 115052 3668 pts/17 S+ 14:40 0:00 | \_ -bash
aregner 273995 0.0 0.0 115052 4824 pts/9 Ss+ 14:32 0:00 \_ -bash
aregner 274061 0.0 0.0 115052 3820 pts/9 S+ 14:32 0:00 \_ -bash
[devbig308 (77bac96|remote/fbcode/warm):~/2nd-fbcode] strace -p 298923
strace: Process 298923 attached
stat("/home/.hg",
```
Sometimes it will hang ong this for 5+ minutes. I'm assuming this has something to do with autofs and NFS home dirs or something or another, but it doesn't matter because when it gets to this point it should just stop looking for a source control directory.
Reviewed By: ryanmce
Differential Revision: D6790747
fbshipit-source-id: d32c74476046aa6b62bc26725eea6b60a4eaa9f7
Summary:
`build_rpm.py` has a /usr/bin/env shbang so it shouldn't be a failure here.
Although, it's had that shebang since 1/23/18.
Reviewed By: quark-zju
Differential Revision: D6825992
fbshipit-source-id: bf7ff3d61338384d8c6e26a93c71f4361687f1f2
Summary:
If `rebase.experimental.inmemory` was enabled, but you ended up merging on-disk (e.g. you rebased the working copy parent), and you got merge conflicts, and didn't immediately solve them, hg would discard any work you did and restart the rebase unnecessarily.
The bug here is basically that `rbsrt.inmemory` field can be set to False later, because we make further calculations once we define the `rebaseset`. In that case `InterventionRequired` will get raised if the user didn't solve conflicts, but we'll catch it, thinking something went wrong "in-memory", and abort/rerun the rebase. I was too hasty in adding the "catch all exceptions and retry" block.
I solved this two ways -- first, move the rbsrt definition here and explicitly check the state in the Exception catch. Second, add an explicit catch for InterventionRequired and explain why with a comment.
Further refactoring of the rebase code will help here, I think, so we can consolidate all of this logic.
Reviewed By: DurhamG
Differential Revision: D6817683
fbshipit-source-id: eb8baba86ec0deb59a1e0b1cf9ffb02f056ecd92
Summary: Remove the unused `os` import that I somehow missed in D6818952.
Reviewed By: ryanmce
Differential Revision: D6819544
fbshipit-source-id: 072be0a956a6ac2bbe96f72c6fc3c79907d22c9a
Summary:
smartlog, among other places, would benefit from being able to
strictly limit the size of text output to the terminal. Provide two functions:
one truncates long lines in a filled block, the other limits the number of
lines of output. Both can optionally add a truncation marker.
Reviewed By: markbt
Differential Revision: D6819153
fbshipit-source-id: d95b654f4a6fef49ad4840f26ef74a18c370bdd8
Summary:
Add a new `-d` option to `hg absorb`, which includes in the `-p` output the first 50
characters of the first line of the commit description for any commit that will
be absorbed into.
The width is configurable through `absorb.maxdescwidth`.
Reviewed By: ryanmce
Differential Revision: D6819341
fbshipit-source-id: 1a007aa5c15c047563b602559b338e5548bf1989
Summary:
There are a couple of ways that dirstate and fsmonitor interact with
treedirstate that are sub-optimal.
When iterating over all files in the dirstate map, use the iterator of keys
(`__iter__` rather than `iteritems`) to hit the treedirstate fastpath that
doesn't build the dirstate tuples.
Use `__getitem__` and catch the `KeyError` rather than `__contains__` followed
by `__getitem__`, as the latter involves two look-ups in the tree.
Skip the indirect call to `hastrackedfile` and `hasremovedfile` as these add
noticable overhead when called many times.
Also fix up the `test-check-code` failure for treedirstate.
Reviewed By: ryanmce
Differential Revision: D6818952
fbshipit-source-id: d49907c282a1b97c66a3d24257bdf54800d7da70
Summary:
Adds some basic building blocks to build hg using buck.
Header files are cleaned up, so they are relative to the project root.
Some minor changes to C code are made to remove clang build
warnings.
Rust dependencies, fb-hgext C/Python dependencies (ex. cstore,
mysql-connector), and 3rd-party dependencies like python-lz4
are not built yet. But the built hg binary should be able to run
most tests just fine.
Reviewed By: wez
Differential Revision: D6814686
fbshipit-source-id: 59eefd5a3ad86db2ad1c821ed824c9f1878c93e4
Summary:
This fixes lfs upload by avoiding use of workers. The perfect fix
would be to make handler work with the workers and multithreading, but that
is much more complex. The downlaoding has been working fine for 1.5 months now
without any reported issues so leaving that to use workers.
Reviewed By: quark-zju
Differential Revision: D6804951
fbshipit-source-id: d5ce92b35c5cbcd64174e47df7a19507c98ed64a
Summary:
pull in the following revisions from the copy of this code
we had under fbsource/scm/hgext:
2f7e4f11e002cf33e4878df77d6a0472adf31245 D6099388
e2a5a711e36c7392129b8753bea37c89a5d73a9c D6099754
77b975dcde28cd7c3d4ae2302bddb625682d1994 D6099753
Reviewed By: simpkins
Differential Revision: D6792967
fbshipit-source-id: e91a74329cddaf322172d3c7d9e1a05b3b6cba02
Summary:
D6698242 removes legacy lfs config options. This diff migrates it to the new
`lfs.url` config.
Reviewed By: singhsrb
Differential Revision: D6812621
fbshipit-source-id: 0a3196a8f08e11ca49fa053d57c3621b022657a2
Summary:
Many processes may be reading and writing from this cache at once, so
let's be sure to use atomic temp.
Reviewed By: quark-zju
Differential Revision: D6811428
fbshipit-source-id: 5c6c157a60e294ab77cc5cb735c5705b7cddff87
Summary:
unbundle should use raw revisions and keep flags as-is,
instead of using high-level `filelog.add` API.
Reviewed By: ryanmce
Differential Revision: D6806031
fbshipit-source-id: 3e1819a91ee869ac8023eefb3f3aa7542f770539
Summary:
We're seeing high load on the server when many clients are fetching treemanifest
entries. A lot of this stems from the cost of opening revlogs. Let's introduce a
simple on-disk cache that let's us avoid opening revlogs as much as possible.
Reviewed By: quark-zju
Differential Revision: D6797698
fbshipit-source-id: c131aa57be333dcb2e4453c6a1f9f4e24532a7ee
Summary:
The import was using the old format here. Let's use the requireext
check instead to be more robust.
Reviewed By: quark-zju
Differential Revision: D6803848
fbshipit-source-id: cb8474245414c946a1ab6cc6c3cec18cd831de0d
Summary:
The require-ext script tried to test the common extension module names
but failed to use the loop variable. This fixes that.
Reviewed By: quark-zju
Differential Revision: D6803708
fbshipit-source-id: 91a32bc2b63ea9ec0652342424f33c87b0898b70
Summary:
This was also using O(repo) file queries. Let's scope them down.
Performance here depends on us shipping a new rpm to users, so let's disable
this test until we do that.
Reviewed By: quark-zju
Differential Revision: D6803495
fbshipit-source-id: e49f00d1a606f0c0ceae6c1e8556f0137186da0a
Summary:
Suggesting disabled extensions uses extensions.loadpath, which is no
longer supported for core extensions. Since this test is just testing that the
extension can be disabled, let's not worry about the exact output.
Reviewed By: phillco
Differential Revision: D6802719
fbshipit-source-id: 2a602e086f4809676ef8dd36ffc30f021b3186fc
Summary:
This test tried to verify that the perf code could still handle
Mercurial version 1.2. Since we don't have tags in our repository, and since I
didn't want to hard code a hash since it wouldn't work in opensource land, let's
just drop the historical compatibility checking.
Reviewed By: quark-zju
Differential Revision: D6802362
fbshipit-source-id: 76f8d2b112784ce641457ff651832cb1b6c93540
Summary:
check-execute was failing because the filesets are too slow (about 45+s
each). This fixes the performance by optimizing some internal fileset logic, and
by fixing a fileset to be scoped to the current working directory instead of the
whole repo.
Unfortunately the fileset implementation optimization needs to be deployed
before the test can benefit from it (since the test runs the system hg), so we
need to leave the test disabled until the fix rolls out.
Reviewed By: quark-zju
Differential Revision: D6802078
fbshipit-source-id: 26767c989e15b6d0ae5f5d9560309dafa5c380ff
Summary:
Just drops the hg10 requirement since version numbers work differently
in our repo. These still don't run unless you have the appropriate jshint and
pylint programs installed (which I don't).
Reviewed By: quark-zju
Differential Revision: D6802387
fbshipit-source-id: bdfda8257c358b3a6db839aa130b555124c8ef04
Summary:
This was timing out when run in a large repo. This patch fixes it to be
faster.
Reviewed By: singhsrb
Differential Revision: D6800750
fbshipit-source-id: 7021ab17b30727cafa4fc0654a7409c43793b3e9
Summary: It's still too noisy. Let's disable it for now before London wakes up. We can add rules back in one-by-one as we fixup existing code.
Reviewed By: DurhamG
Differential Revision: D6794987
fbshipit-source-id: f7c95d660c5af4373b6c10545eb85cb5c63f282e
Summary: Pyflakes complains it's not used, but it's actually a reference to the native class. Make that obvious.
Reviewed By: quark-zju
Differential Revision: D6799935
fbshipit-source-id: 16060839385ab52d53e43b9b4b202b5771d01dc2
Summary: These files were removed and one was added, so add to the expected test output.
Reviewed By: quark-zju
Differential Revision: D6799790
fbshipit-source-id: 514cb095cb727f465aa82b06465a49f17f0e0eb2
Summary:
Port of D6798134 to fbsource. It eliminates module-import failures as well as errors like this:
```
mercurial.error.ForeignImportError: hgext.extlib.treedirstate: /home/phillco/.local/lib/python2.7/site-packages/hgext/extlib/treedirstate.so lives outside /..../hg
```
....that block other tests, like test-help.t
(Note: this ignores all push blocking failures!)
Reviewed By: quark-zju
Differential Revision: D6799259
fbshipit-source-id: b77d1b565dbf52165e0847002be498648658e064
Summary:
This test wasn't running because it had a hg10 check. Let's drop that
and fix the one failure.
Differential Revision: D6798754
fbshipit-source-id: 9d1f1f8b58ff14cba8228f9dc4c83ce21cab6c48
Summary:
This needs to scope down the hg locate to just files in the current
main hg directory.
Differential Revision: D6798373
fbshipit-source-id: a31d66b05ba40439657afa4465667a72b5728123
Summary:
The last diff lost most of its content after v2 was submitted. Resend.
(Note: this ignores all push blocking failures!)
Reviewed By: quark-zju
Differential Revision: D6795055
fbshipit-source-id: ed5f6d5eba9f8cfd505ed4ba1724110414b685f8
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:
./setup.py's logic to pick a version no longer works in fbsource because it only works if `.hg` is in the current
directory. (It set it to 'unknown'.)
We already moved the build logic to a streamlined system of (YYMMDD_HHmmSS_hash), so let's do the same with the actual version that
gets shipped with the release.
(Note: this ignores all push blocking failures!)
Reviewed By: quark-zju
Differential Revision: D6794773
fbshipit-source-id: 5de44b9a3541babddeff06e096b5b1faa8733e47
Summary:
Enables running `check-*` tests from fbsource. This used to check for the existence of a `.hg` folder to detect a repo (so
it can run `hg files`). Internally, we'll always have a repo, and externally we'll likely use git to publish so we'll need another
solution there anyway.
(Note: this ignores all push blocking failures!)
Reviewed By: DurhamG
Differential Revision: D6792787
fbshipit-source-id: 342e29d3a99e82ccd24effb8df02ac6309e80909
Summary:
- Like D6791251, test-fb-hgext-fastmanifest-access.t is a pure fastmanifest test, and I'd like to keep it that way given the rigidity
of the existing output. And plenty of fastmanifest tests remain to test both.
- test-fb-hgext-sparse-extensions.t enables simplecache later on in the test already; I just enabled it earlier, which causes the cache to be warm a bit earlier than before, but I think the difference hardly matters.
This should be the last barrier to default-enabling simplecache.
(Note: this ignores all push blocking failures!)
Reviewed By: DurhamG, quark-zju
Differential Revision: D6792256
fbshipit-source-id: dce775903d312f54f67b4eb05d88779b648359a3
Summary:
simplecache prevents parts of this test from being exercised, since it sits in front. To be sure let's disable it to make sure everything hits fastmanifest.
(Alternatively, we could accept this particular change.)
(Note: this ignores all push blocking failures!)
Reviewed By: DurhamG
Differential Revision: D6791251
fbshipit-source-id: 7eec2931c38b55585a83e4f935f434adbd5dd911
Summary:
flake8 looks very useful, though not all of its default rules apply to the Mercurial codebase.
I've added the start of a config files so we can keep it but start to disable or tweak rules that don't fit the existing code
style. I added a few to get started.
Reviewed By: DurhamG
Differential Revision: D6791079
fbshipit-source-id: c98662f57d21ed8e4f5def465b3c92765dd69f92
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