Summary:
Python 3.8 gives a warning when asking for line buffering on a binary file:
```
line buffering (buffering=1) isn't supported in binary mode,
the default buffer size will be used
```
Reviewed By: xavierd
Differential Revision: D22120968
fbshipit-source-id: 9b1f98f5bfa8ac9ed4f0b4e62389051f665f5d4f
Summary: Add a command to print out the current status of visibility tracking.
Reviewed By: quark-zju
Differential Revision: D22089413
fbshipit-source-id: 729e9f36fbc13ba90518dcd428a44c02ce358167
Summary: Commit cloud sync works best when visibleheads are enabled. Default to requiring it.
Reviewed By: quark-zju
Differential Revision: D22089414
fbshipit-source-id: b786103d5c5f65a7908eb97a973af9eca5990b22
Summary:
Somehow reading the file with `open("r")` will try to decode it as ascii, but
that file may contain utf-8 characters, so open it as bytes, and then decode
it.
Reviewed By: DurhamG
Differential Revision: D22105188
fbshipit-source-id: 0cfbd8c5417b637dd76391f86226e24ee663baf7
Summary:
Add logging of the repo root and repo shared root to the sampling extension.
Reduce the number of different strings that are logged by replacing any path
component that equals the user's username (e.g. their home directory) with
`$USER`.
Reviewed By: farnz
Differential Revision: D22066053
fbshipit-source-id: 39221e5182b3d4df51afa386497003e637a50b13
Summary:
From a simple `hg trace log -r .`, it appears that importing the module takes
16ms, which dominates the time it takes to load the treemanifest extension.
Since the module isn't necessary, don't import it.
Reviewed By: farnz
Differential Revision: D22048075
fbshipit-source-id: ccaf2d53eb006faa36d97df452b0db10f4983c23
Summary: Replaces usages of whitelist/blacklist with include/exclude/allow. These terms are more descriptive and less likely to contribute to racial stereotyping. More context: https://fb.workplace.com/groups/sourcecontrolteam/permalink/2926049127516414/
Reviewed By: farnz
Differential Revision: D22039299
fbshipit-source-id: d5b4cdeca681e1f4c992f7ef0b9f772b2ae1abd3
Summary:
Interactive smartlog history attempts to access `sltimestamp` as a field of
`slinfo`. The field is actually called `timestamp`.
Reviewed By: quark-zju
Differential Revision: D22042316
fbshipit-source-id: 7c1d53dfc1c8d661a248d8412f7d780c83723721
Summary: Replaces usages of whitelist/blacklist with include/exclude/allowed. These terms are more descriptive and less likely to contribute to racial stereotyping. More context: https://fb.workplace.com/groups/sourcecontrolteam/permalink/2926049127516414/
Reviewed By: kulshrax
Differential Revision: D22039297
fbshipit-source-id: ab6e55889e6cf42aed35c856475b2ff92f4cb802
Summary: Replaces usages of whitelist/blacklist with includelist/excludelist/incompatiblelist/. These terms are more descriptive and less likely to contribute to racial stereotyping. More context: https://fb.workplace.com/groups/sourcecontrolteam/permalink/2926049127516414/
Reviewed By: kulshrax
Differential Revision: D22039296
fbshipit-source-id: d4c1fd09e40d5ebeaab99515ed19aa5df6c2ecc4
Summary:
In the Mononoke integration tests (which are .t tests), we've started seeing
this waring show up.
We probably shouldn't have mutation enabled for most of those tests anyway
(save for the tests that actually exercise mutation), so I'm turning that off.
That said, we'd still see the warning. So, this diff refactors mutation a
little bit to only warn if we do have something to send to the server.
Reviewed By: ikostia
Differential Revision: D22016685
fbshipit-source-id: e9e8dbcc44a0fa048dca3ca7ce0961631058a2d6
Summary:
There is no need to migrate if the obsstore is a proxy to the mutation store.
This avoids a crash reading the attribute `_all`.
Reviewed By: DurhamG
Differential Revision: D21999245
fbshipit-source-id: bfa6439982834c6835412fc175132526525af548
Summary:
When kicking off the background process, we were depending on the
current working directory being inside the repo. This is not always true, like
when the current command was invoked like `hg -R xxx log -r .`. Let's invoke the
debugdynamicconfig command with the explicit path.
Reviewed By: quark-zju
Differential Revision: D21983297
fbshipit-source-id: 72981ea596e62dced3918f2fc6272953ab3d84cd
Summary:
Incompatible tests are blacklisted.
The affects non-tests environment: `proxy-obsstore` is turned on.
That is in theory not very different from having an empty obsstore.
If it becomes an issue we can easily turn it off.
Reviewed By: sfilipco
Differential Revision: D21899139
fbshipit-source-id: e4a87ecced0542e7852b48b1a807775e523b3cc9
Summary: We're getting rid of obsstore. The extension is no longer needed.
Reviewed By: sfilipco
Differential Revision: D21899142
fbshipit-source-id: 6e4dd2b2ddfa9325c19d6d1d9951099748260904
Summary:
The feature is off in production.
It calls the "scan changelog" code path in pullcreatemarkers.py, which
is also unused in production.
This allows us to remove a test that no longer passes with the mutation config.
Remove it.
Reviewed By: sfilipco
Differential Revision: D21913600
fbshipit-source-id: 23850fca2d1dc3d135d25954f00a08dc6d13972e
Summary:
The old code only compares successors without checking predecessors, and skips
creating markers even if predecessors do not match. Update it to also check
predecessors. This is needed to maintain the `x` commits in
test-fb-hgext-pull-createmarkers-hide-later.t when switched to use mutation.
Reviewed By: markbt
Differential Revision: D21913610
fbshipit-source-id: 1fec2f96544236dd675ceb8c1a399bcef6cd0ede
Summary:
They are no-op with mutation, which is enabled in production. Therefore remove
the template keywords and tests.
Reviewed By: sfilipco
Differential Revision: D21913602
fbshipit-source-id: 40ef3a915d591d6bcae2ca7931e388b5d5e00c25
Summary:
Pruned commits are handled by visibility. Ignore them when calculating
`obsolete()`.
This change makes transition to mutation smoother. The latter does not allow
obsoleting commits without successors.
Practically, this means some `x` commits will show as `o`s.
Reviewed By: sfilipco
Differential Revision: D21913596
fbshipit-source-id: 8a6495d040595ead1f6f08cf81e095e25cd8ff1f
Summary: This makes transition to mutation smoother.
Reviewed By: sfilipco
Differential Revision: D21913599
fbshipit-source-id: 74cc0b7f0608a952eded4a40291b56b291a221e5
Summary:
The code path printing that message is rarely used in production setup. This
makes transition to mutation easier.
Reviewed By: sfilipco
Differential Revision: D21913595
fbshipit-source-id: 3aa22575c11e38dbb7d4c4cbc7aad8dde2e755ed
Summary: This makes transition to mutation smoother.
Reviewed By: sfilipco
Differential Revision: D21913608
fbshipit-source-id: b9ba470572ed68dff75104bba9dbb5c8622dcfb0
Summary:
The summary callback is only used to display "obsoleted n changesets".
Remove it to make transition to mutation smoother.
Reviewed By: sfilipco
Differential Revision: D21913597
fbshipit-source-id: e47fa9df0033d1302ffc8dfa3b9885eb75861f4b
Summary: This is needed to enable mutation and disable the old obsstore in more places.
Reviewed By: sfilipco
Differential Revision: D21913607
fbshipit-source-id: 2e1ef1e7df58fb134d541f550b6fb90508b9289a
Summary:
This makes code relying on `repo.obsstore` work with the new mutation backend.
Namely, commands like `debugobsolete` will work in tests.
Reviewed By: sfilipco
Differential Revision: D21899149
fbshipit-source-id: b4906ededdc32cfd9c9b7efbf2c85600a0c4a8f4
Summary: `getpack` requires list and will crash on set.
Reviewed By: xavierd
Differential Revision: D21968128
fbshipit-source-id: 75956f5adfcdb8082608e65f041007e58fc36c5c
Summary:
Enables treemanifest for about 100 more tests. To make them pass I had
to expose the gettreepack capability from peers, which just works, and enable
treeonly and sendtrees by default in the tests, which I probably should've done
before anyway.
Reviewed By: quark-zju
Differential Revision: D21894955
fbshipit-source-id: 7a6a4d453824fb8c81a797a5487bf2ecc2b67761
Summary:
On Windows, if a file is memory mapped it cannot be truncated, unfortunately,
with the 00changelog.i being almost 500MB, this means that every time Mercurial
starts, the file needs to be read entirely. With the code being moved to Rust,
this read is done twice, resulting in a memory consumption of over 900MB.
Instead of always trying truncate the file in place, let's just try to truncate
it first, and then copy it, truncate it and then move it back in place. This
will allow us to memory map the 00changelog.i on Windows, which should
significantly reduce the memory consumption of Mercurial.
Reviewed By: DurhamG
Differential Revision: D21953553
fbshipit-source-id: e0f447fea017a34c8da8cdbbc6914cee7b5b2bee
Summary:
We need to support pushing legacy flat manifets commits without push
rebase. Currently we rebuild the tree on the server and recompute it's hash,
which can result in a tree hash instead of a flat hash for the pushed commit.
Since we're provided with the correct hash via the push, we should just use that
directly.
Since the hash isn't validated, it opens some opportunities for receiving
incorrect data from the server, but we can disable this functionality at some
point, once all legacy repos have been merged in. Then we can get rid of the
need for flat manifest hashes entirely once we switch to a new hash scheme.
Reviewed By: quark-zju
Differential Revision: D21962513
fbshipit-source-id: 8cdaf3a4e2aba73d5fc97fcb78821d2c88f5284f
Summary:
The Python 2-and-3 Thrift API is sort of deprecated and does not
handle binary data in `binary` fields. In advance of migrating to the
modern Python 3 API, remane eden.thrift to eden.thrift.legacy.
Reviewed By: fanzeyi
Differential Revision: D21889697
fbshipit-source-id: a745ee8977999acbfb383a4edebe81d8deb1734e
Summary:
Introduced a new local commit metadata storage system, smallcommitmetadata, which stores a simple local JSON file for a mapping of (node, category) -> value.
This data can be manipulated with the debugsmallcommitmetadata command, and can be consumed in the smartlog using the smallcommitmeta template func.
Total number of entries can be limited with smallcommitmetadata.entrylimit configuration option, which defaults to 100.
Reviewed By: DurhamG
Differential Revision: D21673611
fbshipit-source-id: 2239a47867118dd86b15944058505ddf67548549
Summary:
Let's record the caller of the hg command that's using deprecated
logic. In most cases the caller will be the unix username, but we'd like to get
services to set an environment variable with their oncall so we could associate
hg usage with specific oncalls and eventually automatically file tasks for using
deprecated functionality.
Reviewed By: markbt
Differential Revision: D21891753
fbshipit-source-id: a4de0d348c583777cc3eeb9be26510e6af8b3a27
Summary:
Marks a number of commands as deprecated. The default ui.deprecate()
behavior is to just log the usage to scuba, so this diff doesn't actually change
any behavior.
Reviewed By: markbt
Differential Revision: D21891192
fbshipit-source-id: 4611e31cf630eee4f07443fe242c759c3cb3fe31
Summary:
Adds a simple ui.deprecate() function for deprecating code paths. It
has several levels of deprecation and can optionally automatically escalate
through those levels across a specified time frame.
The levels are:
- Log - just logs the usage to scuba
- Warn - same as Log but also prints a warning to the user
- Slow - same as Warn but also sleeps for 2 seconds
- OptIn - throws an exception, but hints that the exception can be bypassed by
setting 'deprecated.bypass-XXXX=True'
- Block - throws an exception that cannot be bypassed
I also call it from a few locations that are expected to be deprecated already.
Reviewed By: markbt
Differential Revision: D21890496
fbshipit-source-id: faddb301888ef75cc71d46ffb7374f3fe3d044bd
Summary: This will be very useful when we migrate to Mononoke.
Reviewed By: StanislavGlebik
Differential Revision: D21912115
fbshipit-source-id: 1ed2204f17f90152a67fd4e10b0ae61aacfc41d7
Summary:
With the internal streampager, progress bars must be sent on a separate stream so that
streampager can render them correctly.
Reviewed By: quark-zju
Differential Revision: D21906173
fbshipit-source-id: eb41b0bf22807d9cae518b3f676996ab1c642c6e
Summary:
`index2` is the Rust revlog index implementation that has extra requirements,
namely, the revlog cannot be inlined. We have code to make sure changelog is
not inlined, but manifest or filelog can still be inlined.
`index2` is only needed for changelog for phase and visibility calculations.
Therefore, disable it for manifest and filelog.
Reviewed By: singhsrb
Differential Revision: D21917447
fbshipit-source-id: c45f955175c623092e6f728042dbfd3b942fe911
Summary:
It was turned on in production (facebook.rc) except for hg servers.
This mainly affects tests.
Reviewed By: markbt
Differential Revision: D21894313
fbshipit-source-id: 5f12620cfc11bb243e96fba12a07cbf0241c738b
Summary:
This is a followup from s195788 - this little check should be enough to prevent
us from having the paths in our DB being truncated on insert.
Reviewed By: markbt
Differential Revision: D21904281
fbshipit-source-id: c9306e0cca4a2e009bb50bc287190d8f7ad12be4
Summary:
Visibleheads (and even narrow-heads) are enabled by default except for hg
servers. No need to log them specially.
Reviewed By: markbt
Differential Revision: D21894308
fbshipit-source-id: 7ffe0977e51c17e743b62da0e2bfbe7618c64610
Summary: This is required to make some tests pass.
Reviewed By: markbt
Differential Revision: D21894312
fbshipit-source-id: 481bcc42f8f7fbb5c1707e66da31aee29932484c
Summary: Make `debugobsolete` also update visibility. This affects many tests.
Reviewed By: markbt
Differential Revision: D21894310
fbshipit-source-id: eba6ecb07fdd8f5a13085434b303581ec5acf463
Summary:
There's an issue where hg foo could spawn hg dynamicconfig which could
spawn hg version (via the telemetry wrapper) which could spawn hg dynamicconfig.
If the config generation fails then this could enter an infiniteloop, since the
mtime of the file would not be updated appropriately, so we will always think we
need to regenerate.
Let's prevent this by setting an environment variable when spawning the
background process.
Reviewed By: quark-zju
Differential Revision: D21885363
fbshipit-source-id: ba4938c926d1219985813a521fec412097df4b4a