Summary:
The former is no longer maintained and throws warnings with recent rust
versions.
Reviewed By: singhsrb
Differential Revision: D15109706
fbshipit-source-id: 94479cdedf42c4dd99e35fa8e337d2fc73f74eb5
Summary:
a "local changes" was visible in the smartlog even instantly after "jf submit"
because hg was comparing the has in the repo with the latest draft version.
https://fb.workplace.com/groups/scm/permalink/2115574591825483/
Reviewed By: katherinez
Differential Revision: D15098057
fbshipit-source-id: 5ad8e87a802a21ccbb1534c189d4e9de78e29fe7
Summary:
Clean up some of the calls to `ui.log` and how they appear in blackbox logging.
* Make the names of the events consistently use `snake_case`.
* For watchman, only log once for each watchman command. Include whether or not it failed.
* Unify `fsmonitor` logging under the `fsmonitor` event.
* Omit the second argument when it is empty - it is optional and does nothing when empty.
* Increase the number of blackbox lines included in rage to 100.
Reviewed By: quark-zju
Differential Revision: D14949868
fbshipit-source-id: a9aa8251e71ae7ca556c08116f8f7c61ff472218
Summary:
I want to give Store a more specific name so that it doesn't get
confused with other Store abstractions that we will add in the
future.
Reviewed By: singhsrb
Differential Revision: D15007383
fbshipit-source-id: 499bcda4aecd5389e3bc1eba5206ba72a69c4c3d
Summary: Removing this function in favor of using Key.path
Reviewed By: quark-zju
Differential Revision: D14945331
fbshipit-source-id: 6b6bb70375629edf37b2b04a86545f18e15b33b4
Summary: The super-smartlog shows "local changes" even when you have some unattached draft changes associated with the diff. This diff changes that.
Reviewed By: quark-zju
Differential Revision: D14936057
fbshipit-source-id: 32204ef9c5fa862923a165624913ecb344ed4a73
Summary:
We should update the builder for Key to take a repo path. We could build
the key directly using the default struct constructor but representing
the two constructors as functions is more clear.
Reviewed By: quark-zju
Differential Revision: D14877543
fbshipit-source-id: 328906521cdbad535e28df22fea82f21e8b5410a
Summary:
This function is difficult to justify in the context of the Rust borrow checker.
The primary concern for this pattern is preventing mutation when the object is
passed around.
We can always add the function back if it has to more than just return the
underlying value.
Reviewed By: quark-zju
Differential Revision: D14877545
fbshipit-source-id: acdd796e1bee5445c1bce5ce0ceb41a7334e4966
Summary:
While the Rust code can read/write content out of an indexedlog, the Python
code cannot. For now, all the writes will be done in Rust, and the Python code
will only be able to read from it.
Reviewed By: quark-zju
Differential Revision: D14894330
fbshipit-source-id: 5c1698d31412bc93e93dabb93be106a2ef17d184
Summary:
Most of the extern crate are now removed. The cpython one is kept around as it
heavily depends on internal macros that would need to be manually imported.
Reviewed By: quark-zju
Differential Revision: D14864995
fbshipit-source-id: 05405ac7310e4dca65daf230cc8f574da32ed4c9
Summary:
Mercurial recently started to generate empty pack files (`0x01`). This will cause this check to fail:
diffusion/FBS/browse/master/fbcode/scm/hg/lib/cdatapack/cdatapack.c;2c4197d003ed906dd8eaf70fbb04aa53440ce681$314-319
This will subsequently result as a double-free error between these two:
**In `error_cleanup`**
diffusion/FBS/browse/master/fbcode/scm/hg/lib/cdatapack/cdatapack.c;2c4197d003ed906dd8eaf70fbb04aa53440ce681$387-389
**In `close_datapack`**
diffusion/FBS/browse/master/fbcode/scm/hg/lib/cdatapack/cdatapack.c;2c4197d003ed906dd8eaf70fbb04aa53440ce681$401
This diff will fix this bug.
Differential Revision: D14759374
fbshipit-source-id: 06f192513a935740c2142b5a2baac87a28903496
Summary:
The phabricator team is trying to eliminate `DifferentialRevision` in favor of `PhabricatorDiff`
See context here
https://our.intern.facebook.com/intern/wiki/Dev_Tools/Phabricator/GraphQLObjectRename/
I'm using aliases to reduce the number of changes needed (the object from the graphql query will have the same keys)
Reviewed By: quark-zju
Differential Revision: D14703867
fbshipit-source-id: 32204315dc154db7cbff68ee286579c0200f57b2
Summary:
Now that repacks runs more often, it's easier to trigger a race between repack
deleting packfiles, and another mercurial process listing the packfiles and
trying to open them. If the packfiles are deleted after the directory listing,
all the packfiles will fail to be opened and were mis-reported as corrupted.
Reviewed By: quark-zju
Differential Revision: D14648308
fbshipit-source-id: c3b852f669e28db6f622bde217f339533e094223
Summary:
The upstream has removed it in https://phab.mercurial-scm.org/D2393. Do the
same.
The deleted C++ code seems to leak `Py_False` if `usemanifestv2` is not set.
Reviewed By: singhsrb
Differential Revision: D14611525
fbshipit-source-id: d828526c31aaa861d100a846bba79d1f5898e245
Summary:
```
building 'indexes' library extension
warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
package: /data/users/sfilip/fbsource/fbcode/scm/hg/edenscm/hgext/extlib/indexes/Cargo.toml
workspace: /data/users/sfilip/fbsource/fbcode/scm/hg/edenscm/hgext/extlib/Cargo.toml
warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
package: /data/users/sfilip/fbsource/fbcode/scm/hg/edenscm/hgext/extlib/pyrevisionstore/Cargo.toml
workspace: /data/users/sfilip/fbsource/fbcode/scm/hg/edenscm/hgext/extlib/Cargo.toml
```
`profile` settings are ignored for non root packages. I introduced this issue
when I added a workspace for extlib: D14543989.
Reviewed By: kulshrax
Differential Revision: D14606019
fbshipit-source-id: 7ec4743d0913e443c378ae83f392817f6e6d3aab
Summary: This simplifies testing setup for all crates in CI.
Reviewed By: quark-zju
Differential Revision: D14543989
fbshipit-source-id: 83693fada6e64b7c21fd89a880d6452d811ea90d
Summary:
These was probably introduced by moving to black.
The changes in the diff were generated by script.
Reviewed By: mitrandir77, singhsrb
Differential Revision: D14439667
fbshipit-source-id: 54f6e0bdcc59c1c6deb4eea46dc6f865bcd48cf8
Summary:
A lot of code is duplicated between data stores, and history stores, and one
reason for it is the absence of common trait between these 2. By adding a new
Store trait it will make it easier to write generic code that works accross
data and history store.
Reviewed By: quark-zju
Differential Revision: D14091899
fbshipit-source-id: deef1d43a7d300cb3607c67554ad54f20c870e23
Summary:
In order to move the types in `edenapi-types` (containing types shared between Mercurial and Mononoke) to the `types` crate, we need to move a few types from the `revisionstore` crate into this crate first, because `revisionstore` depends on `types`, which would create a circular dependency since `edenapi-types` uses types from `revisionstore`.
In particular, this diff moves the `Key` and `NodeInfo` types into their own modules in the `types` crate.
Reviewed By: quark-zju
Differential Revision: D14114166
fbshipit-source-id: 8f9e78d610425faec9dc89ecc9e450651d24177a
Summary:
If the repository was mounted into a different directory than the
source of truth, our watchman integration would not work. To fix this, Mercurial
now applies the same canonicalization logic to the path before passing it to
watchman. This logic is stolen verbatim from watchmans integration test path
utility.
This also requires updating our copy of pywatchman to match the upstream
pywatchman.
Reviewed By: quark-zju
Differential Revision: D13886207
fbshipit-source-id: ea72166edf2eb30f2bee992d9aa936e2e9729e63
Summary:
D13853115 adds `edenscm/` to `sys.path` and code still uses `import mercurial`.
That has nasty problems if both `import mercurial` and
`import edenscm.mercurial` are used, because Python would think `mercurial.foo`
and `edenscm.mercurial.foo` are different modules so code like
`try: ... except mercurial.error.Foo: ...`, or `isinstance(x, mercurial.foo.Bar)`
would fail to handle the `edenscm.mercurial` version. There are also some
module-level states (ex. `extensions._extensions`) that would cause trouble if
they have multiple versions in a single process.
Change imports to use the `edenscm` so ideally the `mercurial` is no longer
imported at all. Add checks in extensions.py to catch unexpected extensions
importing modules from the old (wrong) locations when running tests.
Reviewed By: phillco
Differential Revision: D13868981
fbshipit-source-id: f4e2513766957fd81d85407994f7521a08e4de48
Summary:
A while back, as a startup optimization, we started to hard code
the path to the watchman socket in the mercurial config. This meant
that we could avoid running a subprocess for every command.
Today, a chef configuration change was rolled out that caused watchman
to be stopped on all of the corpnet macs with the result being that
all mercurial commands are slow because it never uses and never restarts
watchman.
This diff adds some fallback logic to allow spawning the server in
the case that we have a connection error.
Reviewed By: DurhamG
Differential Revision: D13855696
fbshipit-source-id: 44c0ad36b6e80520912e42bcea9e04f4f165b588
Summary:
Move top-level Python packages `mercurial`, `hgext` and `hgdemandimport` to
a new top-level package `edenscm`. This allows the Python packages provided by
the upstream Mercurial to be installed side-by-side.
To maintain compatibility, `edenscm/` gets added to `sys.path` in
`mercurial/__init__.py`.
Reviewed By: phillco, ikostia
Differential Revision: D13853115
fbshipit-source-id: b296b0673dc54c61ef6a591ebc687057ff53b22e