Summary:
`tip` and `default` are changed to `master` (bookmark) to make it more
explicit. `log --hidden` was changed to `log -r predecessors(all())`.
I didn't investigate why `(+1 heads)` message get missing. I think we
should probably just remove the message.
Reviewed By: sfilipco
Differential Revision: D17199838
fbshipit-source-id: 0dbe982300f4c4c5e7429c0bf017e0cc97af6872
Summary:
Use narrow-heads for the test so we get some confidence that it works with our
production setup.
Some test changes:
- `predecessors()` revset now shows all commits regardless of "hidden" or not.
Reviewed By: sfilipco
Differential Revision: D17244564
fbshipit-source-id: 9053adbbb913c28d1e7b421155e6325c15790fc5
Summary:
Use narrow-heads for the test so we get some confidence that it works with our
production setup.
A `master` bookmark was added to mark commit public on the server repo.
Reviewed By: sfilipco
Differential Revision: D17244551
fbshipit-source-id: bf65c3aaf0a2fb46c9e7f1af36cc845ae40f44c6
Summary:
If `narrow-heads` is turned on, there are no "filtered revs", and `cl.hasnode`
returns Ture for previously "filtered revs". By definition, `cl.hasnode` should
check `::head()`.
I looked at users of `cl.hasnode` and other users seem to be unaffected. This
diff changes mutation's usecases of `cl.hasnode` to use `::head()` instead.
`::head()` is practically `draft() + public()`. The phases revsets are
pre-calculated. Therefore use them to speed up the calculation.
Reviewed By: sfilipco
Differential Revision: D17264381
fbshipit-source-id: a1bef495d74ade8f074855c149748c999ad246f6
Summary:
To preserve the `--hidden` behavior, make `cl.headrevs` return all heads ever
tracked. Besides, phase revsets like `draft()` also requires extra calculation
if `--hidden` is set.
Reviewed By: sfilipco
Differential Revision: D17264380
fbshipit-source-id: 3590e993f745dce8b1718af4fb12308b2fbf1549
Summary:
This will be used to preserve the `--hidden` behavior by using a more complete
list of heads.
A test introduced by 6563438219
was removed as it does not make sense to me to force changing read size from 65536 to 1.
That commit itself does not have useful commit message, and I cannot find email review thread for it.
Reviewed By: sfilipco
Differential Revision: D17264382
fbshipit-source-id: cc17e98eef4a4743e5207795a7054db59aa71fc0
Summary:
This test is causing trouble in upcoming changes. We don't really care about
the code path - they are migrating *ancient* formats to some formats that we've
been using for years.
For modern migration, like flat dirstate -> tree dirstate, we have seperate
code paths and seperate tests.
Reviewed By: sfilipco
Differential Revision: D17581267
fbshipit-source-id: 7154489ccf46bb4add1c1ec882eafae507af94d3
Summary:
D17429691 made blackbox reuse session_id unconditionally. That has an
undesirable side effect that chg processes are all logged as a same session id.
Fix that by detecting pid change and avoid reusing session_id in that case.
Reviewed By: singhsrb
Differential Revision: D17532555
fbshipit-source-id: cf11bb66f7d7242429b90ab5e5ea85ca307f92c3
Summary:
Sandcastle folks have recently seen the number of unhealthy host going up due
to `hg repack` failing when a corrupted packfile is present on disk. When a
corrupted packfile is detected, let's simply ignore the failure.
Reviewed By: DurhamG
Differential Revision: D17582128
fbshipit-source-id: 64a589a165605791d207e4029cccb93a8bcd3c24
Summary:
Add some context around "invalid read offset" to make errors slightly more
useful.
Reviewed By: xavierd
Differential Revision: D17577202
fbshipit-source-id: d51ba30abf6c462102be8bec1b60668ee66e07f2
Summary:
Instead of removing them unconditionally, keep one copy that failed to `open`
so we can have a look later.
Reviewed By: xavierd
Differential Revision: D17576432
fbshipit-source-id: 4f967d61aa602e6d3cac90d411e1971893c162bd
Summary:
Revise some error handling details so it covers corner cases more acurately and
provides more detailed error messages.
Since D16554090, RotateLog::open unconditionally attempts to create an empty
log at 0/ and reset latest to 0 if read_latest_and_log fails. That could be
undesirable if latest can be read but logs cannot, since it can silently reset
latest to 0 and might cause trouble in the future (For example, failed to
create an empty log at 1/ because it already exits).
This diff splits read_latest_and_log to read_latest and read_logs and handles
their errors individually.
The table summaries changes:
| latest | logs | old behavior | new behavior |
| okay | okay | return both | return both |
| okay | error | create log 0 | create log latest+1 |
| missing | whatever | create log 0 | create log 0 |
| error | whatever | create log 0 | error |
Reviewed By: xavierd
Differential Revision: D17576431
fbshipit-source-id: c9ab1fca5fb60eecf9e326baf90dfa98560a2b32
Summary:
It's possible for a file to appear in the `added` list but is not actually
changed. In that case the Rust manifest has a different behavior that returns
None that breaks the code. Fix it by "correcting" to p1 manifest node.
Reviewed By: sfilipco
Differential Revision: D17512350
fbshipit-source-id: 7c74ffb4e73ed1af5378fe509ed4f06a512995ae
Summary:
Walker should own matcher instead of storing a reference, so the walker can be
stored as a member of a struct by itself
Reviewed By: xavierd
Differential Revision: D17511588
fbshipit-source-id: 039c6c3cced7feec4e9141c31e5333c43879484a
Summary: It will be needed to sync snapshots while bypassing the `sync` transaction.
Reviewed By: markbt
Differential Revision: D17571650
fbshipit-source-id: ff6c0382a1b1e763c3e37610d188f5bbfb382510
Summary:
The current way of opening the lock file and creating it on demand is racy.
Fix it by making it one operation.
Reviewed By: singhsrb
Differential Revision: D17552687
fbshipit-source-id: 5469862902ccab2d317f2c0ac61867c365e22aba
Summary:
AR/VR Engineering does AOSP development using Git and Google Repo. This is rough at times because FB Dev Infra doesn't support these tools in a lot of critical use cases. This commit contains a very rough prototype of a hg convert extension to support Google Repo as a source.
What this commit does:
1. Finds all of the heads in all of the git projects in the Grepo and imports their commit histories into mercurial.
2. Merges those commits into a single commit history that represents the default manifest in the current branch.
What this commit doesn't do:
1. Explore the space of all manifests that have ever existed in the manifest project and update directory branches based on those.
Reviewed By: tchebb
Differential Revision: D14944252
fbshipit-source-id: b292025ccac06d02b347e35839215eedfd151a5d
Summary:
Finalize is asking the cursor to traverse into directories that haven't changed.
This is bug introduced when updating finalize to support being called on
"Durable" nodes. Until then directories would always be traversed if they were
in the processing path. The path would only be chosen for "Ephemeral"
directories which we knew were different from a parent that is assumed to be
"Durable". I later learned that `finalize` is expected to return the manifests
that are directly fetched from storage. The update meant that we would skip
the directory that is processed if the "Node" (hash) is present and matches a
parent. The problem is that didn't update the point at which the parent cursor
is advanced.
Reviewed By: xavierd
Differential Revision: D17537448
fbshipit-source-id: 9c71a8f8f5a70c600031bc9d32535e59f2f32700
Summary:
Now we can show test status of a diff in super-smartlog!
Users can customize this by tweaking their `.hgrc`:
For example, if the want to use Emojis (and their terminal supports it), they can add the following lines to their `.hgrc`:
```
[templatealias]
sl_signal_warning = "⚠️"
sl_signal_in_progress = "⌛️"
```
{F211469447}
(Unfortunately my set up does not handle some of the Emojis properly :( This is the best I can get)
If they dislike fancy Unicode characters, they can switch back to plan old text as well:
```
[templatealias]
sl_signal_okay = "Okay"
sl_signal_failed = "Failed"
sl_signal_warning = "Warning"
sl_signal_in_progress = "In Progress"
```
Reviewed By: quark-zju
Differential Revision: D17540182
fbshipit-source-id: fdaf87f2f4e0977ca0b171c0b48514e764c57553
Summary:
This updates readauthforuri to allow for multiple credentials for the same
host, with a preference for credentials that do exist on the filesystem, and
otherwise a fallback to configurable priorities.
Reviewed By: farnz
Differential Revision: D17528631
fbshipit-source-id: 0b8f255572415b9f60c1aa687728282451f637c4
Summary:
By ignoring unknown working parent, and treating working parent as `null`,
various operations wouold be painfully slow, because `status` would return the
entire working copyp as "untracked".
I hit it today due to some transaction related issues. What I did:
- `hg commit` from one terminal, keeping the editor
- `hg revert -i` from another terminal, waiting for lock
- `hg commit` completed
- `hg revert -i` appears to have loaded the updated dirstate, but not the
updated changelog. So it cannot find the new commit and prints the `ignoring
unknown working parent` message.
It's very hard to reason about the current related code. We'll probably get a
better transaction model to make this less likely to happen. So I didn't write
a test for the legacy code.
Reviewed By: xavierd
Differential Revision: D17532554
fbshipit-source-id: a06b56d78ef4cc129ee7d302c179668747881a69
Summary:
The `import gdbm` statement may or may not be enough to detect missing
modules, let's try to access the `open` method to force load it.
Reviewed By: quark-zju, singhsrb
Differential Revision: D17539167
fbshipit-source-id: be0271224b28afb5f0a525d86420c1a12994c0d2
Summary: This will be used to store "invisible heads".
Reviewed By: sfilipco
Differential Revision: D17264837
fbshipit-source-id: a450b5c10cc961d43ec8eb852cb2fb22849a8c00
Summary:
The new `narrow-heads` feature only makes sense for new clients. The hg servers
have hard dependency on revlog (because of hgsql) and cannot be migrated to any
fancier changelog structure easily. Therefore just unconditionally disable
`narrow-heads` for them. This makes it easier to change tests.
Reviewed By: sfilipco
Differential Revision: D17244554
fbshipit-source-id: ee6e7e8cab726ccb27814683447ea6271e41cc3e
Summary:
Phases are going to be defined by remote names. That means `hg phase -f` no
longer works. To workaround it, add a debug command to mangle remote names.
Reviewed By: sfilipco
Differential Revision: D17244553
fbshipit-source-id: efca1be22f5ab2ff9f39965ed0e98712cc944d1c
Summary:
`hg log` without arguments are used frequently in tests. Use `all()` to hide
invisible commits.
Note: this does not change end-user behavior, since tweakdefaults adds `-f`
and `log` without arguments will be logging `:.` instead (which, should
probably be changed to log `::.`).
Reviewed By: sfilipco
Differential Revision: D17244555
fbshipit-source-id: d5a0da0355ece850f4969cb244f4ebf23da040d1
Summary:
With 'narrow-heads', repoview filtering is bypassed. So we need another
way to make 'invisible' commits disapper from 'all'.
Reviewed By: sfilipco
Differential Revision: D17244549
fbshipit-source-id: 6fd4d4ff5ca96f300a5d79a796fb643060662e9b
Summary:
With 'narrow-heads', repoview filtering is bypassed. So we need another
way to make 'invisible' commits disapper from 'children'.
Reviewed By: sfilipco
Differential Revision: D17244556
fbshipit-source-id: 47d6f59523d910e5d9865d40251954d8de0ee055
Summary:
This resolves an issue where commits get selected incorrectly in the `x::`
case.
Reviewed By: sfilipco
Differential Revision: D17244561
fbshipit-source-id: e9e633509c0e335d24e13cef0ac06e242816e479
Summary:
I'm removing the `depth` support for `descendants` and `ancestors`, since the
new DAG code doesn't implement them - they cannot be sped up by using high
level segments. Let's use `limit` instead.
Reviewed By: xavierd
Differential Revision: D17244552
fbshipit-source-id: f474c5171c84542dbe6d7a606f75089cb37e2c4f
Summary:
See the test change. Basically, phases are defined by visibility heads and
remotenames. This resolves the issue after disabling repoview, `draft()`
contains unwanted commits.
Reviewed By: sfilipco
Differential Revision: D17244558
fbshipit-source-id: 84fc4a8b7830d613babf101079cb3c5b7909f23f
Summary:
The SpanSet can include a large amount of revs. Iterating through it by putting
everything in a PyList is suboptimal. Therefore add a dedicated native iterator
for it. This speeds up iteration greatly, which can be verified via debugshell:
Before:
In [1]: s=m.smartset.spansset(b.dag.spans(xrange(5000000)))
In [2]: %time s.slice(0,10)
CPU times: user 135 ms, sys: 42.9 ms, total: 178 ms
Wall time: 180 ms
After:
In [1]: s=m.smartset.spansset(b.dag.spans(xrange(5000000)))
In [2]: %time s.slice(0,10)
CPU times: user 49 µs, sys: 6 µs, total: 55 µs
Wall time: 58.2 µs
Reviewed By: sfilipco
Differential Revision: D17305350
fbshipit-source-id: 0db00aa57fb6bf2141ccea94b2536da78f103cef
Summary:
For some reason, `null` appears in `obsolete()`:
% hg log -Gr 'obsolete() & null'
x changeset: 0000000000000000000000000000000000000000
user:
date: Wed, 31 Dec 1969 17:00:00 -0700
That's undesirable because `null` should be considered immutable, public.
public commits are not obsolete.
Reviewed By: xavierd
Differential Revision: D17531824
fbshipit-source-id: 69c83be0c24bec179ffcd64ea264aa9208a5fe21
Summary:
The fbcode runtime Python unfortunately isn't compiled with the _bsddb module
in, and thus when using the packman built Mercurial binary, renaming a file and
performing an amend will cause it to crash. Unfortunately, we can't simply use
gdbm everywhere as Windows doesn't support it, so let's hack around this by
trying both anydbm and gdbm.
Reviewed By: quark-zju
Differential Revision: D17512253
fbshipit-source-id: 3717b691e715084b7c3488425ae20dcf7e9ad2bd
Summary: Updated help text for hg journal
Reviewed By: quark-zju
Differential Revision: D17400420
fbshipit-source-id: 877ccb45fe2a3833daa9aad7bd4e72091b2fab62
Summary:
Snapshots are essentially hidden commits that can be backed up/synced via infinitepush.
When we back up the repo state, we want it to access snapshots without explicitly specifying that they are hidden.
Differential Revision: D17260966
fbshipit-source-id: aa7f24043dddb052cab89c1ba939440887e99339
Summary:
We decided not to re-serialize the existing metadata files.
Even though CBOR is good, multiple cycles of serialization can lead to ambiguous encoding.
Thus, the bundle part would look like that:
```
{
"metadatafiles": {
<metadata oid>: {
"content": <binary CBOR-serialized metadata content>,
},
. . .
},
"auxfiles": {
<file oid>: {
"content": <binary file content>,
},
. . .
}
}
```
Reviewed By: quark-zju
Differential Revision: D17466032
fbshipit-source-id: 6d81aacbe76e2037b4b9acae760b759f1c31ecac
Summary: This is better that `json` because it will allow to store any binary data inside the metadata (e.g. file content).
Reviewed By: quark-zju
Differential Revision: D17464502
fbshipit-source-id: 3d559f390cc7827300fc51c23f004f1d833f0ab4
Summary:
it is needed for the snapshot extension
changeset `b6387a65851d4421d5580b1a4db4c55366a94ec8`
Removed the `pycompat.long: streamencodeint,` from the `STREAM_ENCODERS`.
Reviewed By: quark-zju
Differential Revision: D17420869
fbshipit-source-id: 388a05c79c830c32aa67259713bf076a5505b8c4
Summary: They became redundant and impose restrictions on the code.
Reviewed By: quark-zju
Differential Revision: D17463968
fbshipit-source-id: 83cb8d9dca037747e62f9e8c41a4081259c92e91
Summary: Do not keep a reference to the repo and provide a better API.
Reviewed By: quark-zju
Differential Revision: D17463871
fbshipit-source-id: d54256208b5f571ca8a4f4e2d07353edd9e825b2
Summary:
This config prints out data written by the sampling extension.
The motivation behind this is, we want the Rust code to also be able to
generate data that can be sent to our remote logging infra (scuba).
Right now, the only way to do that is to go through sampling.py, and
use the `ui.log` API. I'm looking to change it to use Rust code and
blackbox data instead. To get some confidence about the upcoming Rust
code, I need a way to easily compare data using production setup.
Reviewed By: singhsrb
Differential Revision: D17494927
fbshipit-source-id: 0b10562925ec82dbd67f18996d7bfeab8cfd81ee
Summary: This allows pure Rust commands to actually write logs to blackbox.
Reviewed By: xavierd
Differential Revision: D17467213
fbshipit-source-id: 63436f6a57ea43e4872084060c1beec09fe9d5e1
Summary:
This is consistent with the Python code `repo.sharedvfs` and makes it easier to
use.
Reviewed By: xavierd
Differential Revision: D17467215
fbshipit-source-id: 4284ae602ffa4ea55a58dd8f102bf9d35ff244ad