Summary:
Previously we only enabled on demand tree generation when treeonly was
set, but we also need it when sendtrees is set since we'll need to generate
trees for sending.
Reviewed By: quark-zju
Differential Revision: D7927856
fbshipit-source-id: a69d6c7920a92e4f90bdcd1d04aad9ef59e9c778
Summary:
hgsql depends on repositories being byte for byte identical, but the
current pull after a streaming clone can cause the repository to be different
(like if different delta decisions were made, or the commits were ordered
slightly differently). Let's disable that pull when the repository is an hgsql
repo.
Reviewed By: ryanmce
Differential Revision: D7925300
fbshipit-source-id: 6eba7ad4ccdd37f6d7c5090522867d1a54f722b7
Summary:
The "sensitive config sections" was used because "hg serve" loading
different extensions are incompatible with each other. Now we neither load
extensions nor run their uisetups, and just use one chg server. So
sensitive config sections can be removed.
Reviewed By: singhsrb
Differential Revision: D7847149
fbshipit-source-id: 758c1df21d280bf0f88d91432e1201c8417df532
Summary:
This diff prepares the importer to cleanly handle moving files in perforce while
keeping the structure in hg untouched.
It introduces a magic string that has to be present in the changelist description:
`IMPORTER_IGNORE_REORG@`
When that is present, move/add move/delete actions where hg path is the same are
ignored.
Differential Revision: D7832814
fbshipit-source-id: e8323d0c3cc79ee81cb819bee63435f345069861
Summary:
Rework the commit cloud commands:
* Arrange them under a top-level `cloud` command.
* Make `join` call `register` if necessary and `sync`. This gives one-step
on-boarding.
* Add help text to all commands; clean up existing help text.
* Simplify output a little.
Differential Revision: D7876295
fbshipit-source-id: 1f7c0cabfa3d426ced34b90bdca64bef78d78211
Summary: This lets you find profiles that'll include a given filename.
Reviewed By: markbt
Differential Revision: D7876496
fbshipit-source-id: 3b375e5d8257a80853f854a6be27c74f805687e3
Summary:
The prompt was recently fixed to work with remotenames and we need to
update the test.
Reviewed By: ryanmce
Differential Revision: D7876171
fbshipit-source-id: 95ebc8d9d598cf943e67e1d38e9d7ee061882cca
Summary:
On systems with long TESTTMP paths, the test-subcommands test wraps the
filename in the help output. This means the TESTTMP matching no longer works,
and the test fails.
Move the alias definitions into the extension, where we can set the origin
manually.
Reviewed By: mjpieters
Differential Revision: D7859229
fbshipit-source-id: a3b62079ec302f7d6de1e4444a3d5bd740b39703
Summary:
Replace the monkey-patched subcommands in fbsparse with the new subcommand
infra.
Reviewed By: mjpieters
Differential Revision: D7849195
fbshipit-source-id: 7f1fc21f555dc2bea49d3a80efdbfd42a6e70cb5
Summary:
Add generalised support for subcommands. This is similar to the monkey-patched
version in `fbsparse`, but fully supported by the command infrastructure.
Subcommands are the same structure as normal commands, but are attached to a
table in the `subcommands` attribute of the main command. Normally, if no
subcommand is provided, the normal command function is called. This can be
made into an error by setting `subonly` on the top-level command.
In order to make `fbsparse` continue to work, I've temporarily hacked how it
handles help text. This will be fixed in a later diff that switches fbsparse
to use this infrastructure.
Reviewed By: mjpieters
Differential Revision: D7849476
fbshipit-source-id: b988edabb17da77bf91a278e0faa2feecd0c1db9
Summary:
Previously it is not actually used.
`test-hgext-repogenerator.t` changed because treedirstate uses random
number to generate file names.
`fakedirstatewritetime.py` was updated to be treedirstate-aware. This
makes test-revert.t test-merge-tools.t test-merge1.t pass.
Reviewed By: singhsrb
Differential Revision: D7844960
fbshipit-source-id: 33a1d0d4a8e22ea5e6bb6454956884571fcf6bab
Summary:
Either fix or ignore issues in `fb/` so the test is consistent if run
externally.
Reviewed By: DurhamG
Differential Revision: D7850647
fbshipit-source-id: 0f7faa3be2dff1dcf61a3b765c1827583fafc14f
Summary:
There is a proper way [1] to skip the dict check-code check. Let's use it.
[1]: a61ed1c2d7
Reviewed By: DurhamG
Differential Revision: D7831336
fbshipit-source-id: a5e654e9e94cbfb1c5a07b047eb6e5451904c48e
Summary:
This would make tests run on treedirstate.
To avoid issues with Eden pulling from a non-eden treedirstate repo,
treedirstate is changed to be "always on" and disables itself on an eden repo.
The extension list is changed to a set for efficient `__contains__` test.
Reviewed By: phillco
Differential Revision: D7769804
fbshipit-source-id: d328fe51ef67c4730cfc53f43bdfc48c2765c541
Summary: This lets you select on substrings in fields and paths.
Reviewed By: quark-zju
Differential Revision: D7788826
fbshipit-source-id: f92b8cc646fd36f4cb3b8a4dc6116576db80eb42
Summary: Calculation on how many profiles were hidden is only done when the hint is actually shown.
Reviewed By: quark-zju
Differential Revision: D7774192
fbshipit-source-id: a7196b2cc5640d0a7cb9c4d572e1a31ebfa41598
Summary:
This lets us produce a list of profiles with the title set, or find all profiles that are missing a description.
Convert the 'hidden' filter to use this feature, rather than special-case it in `_discover()`.
Reviewed By: quark-zju
Differential Revision: D7774029
fbshipit-source-id: 3bcba75e6da97bf0e560e11ce1ae7cbcee49ee45
Summary:
Infinitepush stores bundles uncompressed, which can make them quite large.
Enable zstd compression of bundles, both when sending them to the server during
backups, and when storing the bundle in the bundle store on the server.
Reviewed By: quark-zju
Differential Revision: D7777371
fbshipit-source-id: ef9360bf05bf2a6d2b76e26cd40ad1e4ee8ae076
Summary:
We currently call "p4 where" on all files in the new client spec, which is roughly O(all files in ovrsource), and it's only going to get worse as ovrsource grows :(
This diff makes the number of calls O(files added & removed between two client specs) by filtering them in the following way:
- get a full list of files from old client (L1)
- get a full list of files from new client (L2)
- files_added = L2 - L1
- files_removed = L1 - L2
- `p4 where` on (files_added + files_removed)
How much speedup do we get?
from
[2018-04-25 16:07:27,725]INFO:root: Start sync import in ovrsource-master
[2018-04-25 17:35:35,873]INFO:root: Finish sync import in ovrsource-master after 5288.147963762283 seconds
to
[2018-04-26 13:43:28,819]INFO:root: Start sync import in ovrsource-master
[2018-04-26 13:51:35,575]INFO:root: Finish sync import in ovrsource-master after 486.7560772895813 seconds
on this change D7722798
Differential Revision: D7772403
fbshipit-source-id: 05a16343264007ee3ee466621da9da888c2368d7
Summary:
We want to allow blocking full repo streaming clones in certain
repositories (since they can take the lock and take a very long time) unless the
client has explicitly asked for it. The existing stream_out wire protocol has no
way of passing an option, so let's create a new endpoint.
Reviewed By: quark-zju
Differential Revision: D7763717
fbshipit-source-id: eace47143f8fdcc4c6e302b5c26678ccf56ca5d4
Summary: This is needed to be able to list profiles via SCMQuery, where there is a working copy at the null revision.
Reviewed By: quark-zju
Differential Revision: D7745434
fbshipit-source-id: b5ac236c36f9bafc9e0f305bc0892e0cd8bec628
Summary: See the comments for more.
Reviewed By: quark-zju
Differential Revision: D7738340
fbshipit-source-id: 20660c2ff7fdba1850c0fb9f34548db0084abf3d
Summary: If there is a non-existing sparse profile active in .hg/sparse, skip it rather than bail out.
Reviewed By: quark-zju
Differential Revision: D7744957
fbshipit-source-id: 4e6a046c95f5fe6cf49a7093d3443340f70e8e2a
Summary: Curernt sync importer modifies mercurial storage data structures directly, which is error prone and hard to debug. This reimplements the sync importer with a higher level mercurial API (what `p4seqmport` uses).
Differential Revision: D7714322
fbshipit-source-id: 0269839b5ee3a4b45f166dce74dfd29c8ec5135a
Summary:
This logs timing data for:
- update
- merge.update
- mergedriver
- applyupdates
- workers
- fetches
- pulls
- remotefilelog prefetches
- treemanifest prefetches
- status
- dirstate walks
- fsmonitor walks
- watchman queries
Hopefully this will let us narrow down where time is going in a number of cases
where the profile data is ambigiuous or hard to come by.
Reviewed By: quark-zju
Differential Revision: D7681026
fbshipit-source-id: e6fe65c9a4d2f4e128f62ccb767a7cbe73b2649a
Summary:
when a user is joined to commitcloud workspace, we should provide
commit cloud related messages in the smartlog
Reviewed By: markbt, StanislavGlebik
Differential Revision: D7705709
fbshipit-source-id: ba2c246f115542e4f49446284cd831d8c266245f
Summary:
Make `hg getavailablebackups` limit the list to 5 (configurable) backups by
default. Add a new `--all` option to list them all.
Reviewed By: quark-zju
Differential Revision: D7671210
fbshipit-source-id: 743e0032e11b5d21b1544b695d28e8818c44085e
Summary: Add the `hg backupdelete` commands, that lets users delete their old backups.
Differential Revision: D7670524
fbshipit-source-id: d0a12e1aa7c770cf9313e792d859c9a76ff43d9f
Summary:
If the infinitepush backup state is empty (indicating this is probably a new
clone of a repository), and there are no commits or bookmarks to be backed up,
don't push a backupbundle that clears all the heads and bookmarks of any
backups that have the same servername and path. This might be a reclone of the
repository, and the user might want to restore the backup.
When the first commit or bookmark is made in the new repository, the old
backup will be cleared at that point.
Differential Revision: D7669728
fbshipit-source-id: bec859bbbbee6b631efb4483a8fedbad8f3bcbac
Summary:
We currently call p4 where with one path at a time, but it accepts a list.
This change takes advantage of that, batching p4 where calls, which speeds up
importing.
Differential Revision: D7676378
fbshipit-source-id: 4a6747458555a60dd5f385604f2a25d595af947d
Summary:
The merge process could be interactive, and tools like Hack wants to
scan changed files when the user is resolving conflicts. There is a
"hg.update" watchman state and "state-enter", "state-exit" events that help
detect the "update" process. However, the interactive "ui.merge" process is
inside the "update" process and cannot be easily decoupled confidently (i.e.
hard to end "update" state before doing the merge).
It's also hard to have a general "merge" state due to the current watchman
design. Because a merge might be across multiple hg processes (ex.
non-interactive ui.merge, hg exits, returns to the shell, and the user invokes
`hg resolve --mark` to end the merge state), and the current watchman
implementation will force end all states associated with a watchman socket
connection. If a hg process exits, it will disconnect from the watchman socket
and the merge state will be forced terminated, although there is still
unresolved conflicts. Previous attempt on this is D7286181.
This patch adds a "hg.filemerge" watchman state that could make watchman
users aware of ongoing interactive merge resolutions. The event fires when an
external merge tool is called, per conflicted file. It is strictly a sub
interval of an "update" state, which is within a single process. So it does not
have the problem that a "merge" state has.
Differential Revision: D7648929
fbshipit-source-id: 858beba1bff261e8da5bd4d8b08a388dcbc8a9ef
Summary:
Python dict is unordered. This is a naive filter that helps stabilizing the
test output. It's used in the next patch.
Reviewed By: mjpieters
Differential Revision: D7648927
fbshipit-source-id: ad51f83c6f8d3a29cc0ee26afef73669302632c3
Summary:
This has been commented out for ages
It is not needed, and it refers to self._parsed which does not exist.
Differential Revision: D7625105
fbshipit-source-id: 908809b5b31e104b01b49558febed5adbfdcd143
Summary: D7676184 changes the sync importer tests to use `p4seqimport` instead of `p4fastimport`, but there's one left. This fixes the leftover one.
Differential Revision: D7687451
fbshipit-source-id: a7f4c4fa93f5a2a52a99cd1d8263718fc656f683
Summary: Improve message to suggest user to run the right command
Reviewed By: markbt
Differential Revision: D7668587
fbshipit-source-id: 903d9fc62fb2018847d81112ff62a76f337cdd18
Summary: Since `p4seqimport` reaplces `p4fastimport`, the test for `p4syncimport` (which currently uses `p4fastimport`) should be updated to use `p4seqimport` as well.
Differential Revision: D7676184
fbshipit-source-id: 4273975159190933a71a1fe538dfddfbe4eb8a91
Summary:
In an upcoming diff I want to add more timing measurements for various
parts of the Mercurial code (like how long status takes, vs checkout, vs
prefetch, etc). Let's rename the logblockedtimes logic to be more generic, since
it is doing basically the same thing.
Reviewed By: singhsrb
Differential Revision: D7676406
fbshipit-source-id: 9aa8c90ce562fa3ad5b654f7b3191b2c16a440c2
Summary:
```
$ hg sparse explain some/profile
[...]
hint[sparse-explain-verbose]: use 'hg sparse explain --verbose some/profile' to include the total file size for a give profile
hint[hint-ack]: use 'hg hint --ack sparse-explain-verbose' to silence these hints
```
Differential Revision: D7669896
fbshipit-source-id: c700fbc2f42044a9b15371278305f03e9e6c989f
Summary: Tweak the help output to reflect the now-complete subcommand information.
Differential Revision: D7667900
fbshipit-source-id: a5a04e8bcbfe4a90266c30e25ffd705de0bdc8a9
Summary: Let's report that this lock cannot be read by Mercurial
Reviewed By: markbt
Differential Revision: D7653196
fbshipit-source-id: c5b7889cdde9c0ecc03a8c961aeba92f426648b1
Summary:
`install_requires` is not well supported. And the subverty detection is not
meaningful - it checks at package build time, not package install time.
```
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires'
warnings.warn(msg)
```
Reviewed By: markbt
Differential Revision: D7626055
fbshipit-source-id: 061147f02698ad46561c95d2039f0a8ad26182d2
Summary:
Some log messages might not end with "\n". Append it automatically so it
looks good in blackbox.log.
Reviewed By: singhsrb
Differential Revision: D7648930
fbshipit-source-id: f5262e0c77a3bde952c3963ac5298b850f38d9db
Summary:
There are certain code paths that passes an empty `msg` that would crash
blackbox code:
```
error in exit handlers:
Traceback (most recent call last):
File "mercurial/dispatch.py", line 73, in _runexithandlers
func(*args, **kwargs)
File "hgext/sampling.py", line 118, in telemetry
generaldelta=str('generaldelta' in repo.requirements).lower())
File "hgext/blackbox.py", line 170, in log
formattedmsg = msg[0] % msg[1:]
IndexError: tuple index out of range
```
Fix it by ignoring those messages.
Reviewed By: singhsrb
Differential Revision: D7648932
fbshipit-source-id: be9f8327fd476399e4b762c92ea5f31cb174e189