Summary:
Similar to the previous patch, this allows us to get more information about
conflicts being resolved.
Reviewed By: phillco
Differential Revision: D7648933
fbshipit-source-id: 5b8c3dde385ace4c2a7cff7455e11436e5afd8cd
Summary:
This helps debugging watchman related issues. In particular, the order of
watchman state-enter/leave events and other events.
Reviewed By: singhsrb
Differential Revision: D7648928
fbshipit-source-id: 527a7bef9a07c2526bdd40ad802d5ba06bc27226
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
Summary:
This was broken by D7604500 because the format for infinitepush
bookmark names doesn't expect a double slash when the reporoot begins with a
slash. For instance, the bookmark name is
`infinitepush/backups/UNIXNAME/HOST/path/to/repo/heads/...` but we were querying
for `infinitepush/backups/UNIXNAME/HOST//path/to/repo/heads...`.
Reviewed By: singhsrb
Differential Revision: D7647924
fbshipit-source-id: 11abc38e44998d9164b474b9acce7bef7a011fe1
Summary: Commit 23f4cd4264ef broke a bunch of tests. Let's back it out.
Reviewed By: singhsrb
Differential Revision: D7646736
fbshipit-source-id: ace9b7be2c50f64ea382eaa72a350ead67b2a2a6
Summary: These matchers provide better values than the default now provided by mercurial.match.basematcher.
Reviewed By: quark-zju
Differential Revision: D7635868
fbshipit-source-id: c826390b3a5e3a2da897eeb54be22850e14403f6
Summary:
A previous diff (143ad029b) lost these lines due to run-tests.py -i overwriting
them. We're seeing flakey test failures, so let's add them back.
Reviewed By: singhsrb
Differential Revision: D7641613
fbshipit-source-id: 4f0807ae88f442cfa3c84106e800ce9eba81e99e
Summary: Let's report that this lock cannot be read by Mercurial
Differential Revision: D7617178
fbshipit-source-id: 23f4cd4264ef6c685762d8f89e2c24ed2f224211
Summary:
The recent changes to Mercurial made us less tolerant to wrongly-formatted
lock files.
Reviewed By: farnz
Differential Revision: D7586684
fbshipit-source-id: d7fa2151b8bb20f49c83941f7d3ef751fdbab2de
Summary:
{F123775861}
Improve smartlog extension for Commit Cloud Users.
The difference with the current smartlog implementation is that in Commit Cloud world
a commit can be modified by a sequence of operations on another host and smartlog doesn't handle it.
After `hg cloudsync` run command we should be able to 'explain' in smartlog what has happened
this is important for user who opt out from 'updateonmove' feature because they will see two version of their stack all the time.
Reviewed By: DurhamG, quark-zju
Differential Revision: D7492969
fbshipit-source-id: 9ac2180f9abaa9ae596620b7f25d9ad8212deb28
Summary:
Previously, when searching for base trees (i.e. trees that we already
have that we can tell the server so it can send us only parts we don't have) we
did a naive changelog scan for public commits. If the phases were messed up and
a local commit was marked public, this would result in us sending the server a
base commit it didn't have which would error out.
Let's make two changes to fix this.
1. Let's scan by history instead of by revision number. This will
work in the future when we don't have rev numbers, and will hopefully also get
us closer base trees. It should also mean that if we fetch a server commit we
are less likely to encounter a local accidentally-public commit.
2. Let's only use commits that are ancestors of a remotename. This will help us
avoid local accidentally-public commits as well.
Reviewed By: quark-zju
Differential Revision: D7593363
fbshipit-source-id: 1df8f4fbc56a4c11ccb6d444c3d08297206ad91f
Summary:
Currently if there is a bookmark ends with *, adding and removal such
a bookmark, removes all the bookmark with the same prefix from the table.
I made similar url encoding encode.
Reviewed By: StanislavGlebik
Differential Revision: D7631967
fbshipit-source-id: 607a37bd7761d65e0f3a21c44fb137a98a79a1bf
Summary:
Make it clear that all that messages are about autobackup (in background)
Even if it is disabled, manual `hg pushbackup` works
Also, since we announced publicly about renaming infinitepush we should not use it in user facing messages.
Also, that commands enable/disable background cloudsync, probably later we should check if cloudsync is enabled and improve messages to be more precise.
Reviewed By: StanislavGlebik
Differential Revision: D7635640
fbshipit-source-id: 2461b1b45e181c6e24b59f707a17f2fd60d4bb0e
Summary:
Replace the background `hg pushbackup` with a background `hg cloudsync` when
the repo is connected to a workspace.
Reviewed By: StanislavGlebik
Differential Revision: D7586412
fbshipit-source-id: 667ce46ffe83c654b642872633d9b86f29a2d788
Summary:
Make commitcloud push unsynced commits to the server before modifying the cloud
state.
At the moment, this uses an infinitepush push, calling the underlying push
functions directly (since commitcloud knows exactly which commits to push,
there is no point performing discovery to calculate them). Infinitepush pushes
require the full draft stack to be included, but in the future, this will be
replaced with an even smaller push of just the changed commits to Mononoke.
The re-use of infinitepush's internal functions is a bit hacky. Later on I
will refactor the common functionality out to a utility library.
Reviewed By: StanislavGlebik
Differential Revision: D7535890
fbshipit-source-id: 975028a63bd6d9377a37e224a0cfd95ae1f1e16d
Summary:
We may want to use an experimental store for remotefilelog data. This store may
return incorrect data, and cache is going to be poisoned. To prevent it from
hapenning let's add an option that makes it possible to prevent cache
poisoning.
Reviewed By: farnz
Differential Revision: D7615453
fbshipit-source-id: 0ade7407b92a3a32c841f6f0214dc353c30bff59
Summary:
The changes in this diff comments out unused parameters.
This will allow us to enable -Wunused-parameter as error.
Reviewed By: yfeldblum
Differential Revision: D7634823
fbshipit-source-id: fed215b805e9396d14feada19a6e959a180218d4
Summary:
fsmonitor relies on `repr(match)` to check ignore changes. `__repr__` is not
defined by `negatematcher`. That leads to unnecessary fsmonitor state
invalidation.
This diff fixed that by defining `__repr__` on the base matcher class.
Reviewed By: singhsrb
Differential Revision: D7619774
fbshipit-source-id: df55390411cdb2d8e22e65efdeeb3b1db3bfa284
Summary: It is no longer used after D6745865. This diff removes it from the test.
Reviewed By: singhsrb
Differential Revision: D7619689
fbshipit-source-id: 0b023eb210a92ab132ad4e5df7a30af8a7f30e45
Summary:
The hg servers were having trouble bootstrapping the .hg/git directory
because hggit was creating a bare repo and then later git fetches were super
slow. Those .hg/git directories should be managed by infra outside of hg, so
let's add a config knob to prevent hggit from creating a .hg/git repo.
Reviewed By: quark-zju
Differential Revision: D7586441
fbshipit-source-id: 7c2578123428aadaa6a94484e45dda6bd6b5a42d
Summary:
Some tools parse the output of hg, and the addition of the `connected to
hostname` line breaks them.
Fix this by changing the default behaviour of clienttelemetry to output
to stderr, but only when plain and quiet are not set, and when stderr
is a tty.
Differential Revision: D7616326
fbshipit-source-id: 6eb329c75a7e8cf6e5ab43aa5ac36be82d1d2e7d
Summary:
filter host/reporoot in mysql if they are explicitly defined
With OnDemand developers often change hosts,
so it is better to return only revevant backups if options are provided
Reviewed By: StanislavGlebik
Differential Revision: D7604500
fbshipit-source-id: 4fdde451c4c99e3ebbaecb142c353d820c0214a1
Summary:
Add a new `--remote` option to `hg isbackedup`. If the commit is recorded as
backed up locally, this additionally checks the server to see if the commit is
available there.
Reviewed By: mjpieters
Differential Revision: D7599763
fbshipit-source-id: d344f187d6f8989f7b4dcd9fa47c1ec99e68d7d5
Summary: Yes, the path to the script is hardcoded, because we want to make sure we test the right version, and not anything else found on the path.
Reviewed By: DurhamG
Differential Revision: D7600431
fbshipit-source-id: d08a2e98fa40823412e3d2925a3b2862ffb0f1a2
Summary:
Add a new config option `treedirstate.verify`, which, when set to true,
verifies the treedirstate tree after each update by re-opening it.
Differential Revision: D7599546
fbshipit-source-id: f4101a1eba1fc46dd08d8886918417520b7fbf53
Summary:
When appending to the dirstate tree file, treedirstate flushes all data, and
then calls `sync_data` to ensure the data has made it to the disk. This ought
to be sufficient, as the data won't be used until the dirstate file has been
updated to include the new root, which happens via atomic rename later on.
We've seen some cases where the dirstate file contains an invalid root id.
Attempt to mitigate this by syncing all data when we flush the dirstate. There
is a performance penalty to this, but it shouldn't be too much.
Differential Revision: D7599547
fbshipit-source-id: 9d55b80d04833d2a73f058487a62eab2da802214
Summary: This makes it much easier to restore it manually.
Reviewed By: ryanmce
Differential Revision: D7585131
fbshipit-source-id: f7ee14b2411a73ab51563653932c48d29b36e7a3
Summary: This way it's even more clear
Reviewed By: ryanmce
Differential Revision: D7585130
fbshipit-source-id: ce9e535f88f794fd19d7fd3db5171263fcd7865a
Summary: Mercurial adds new requirements (generaldata + remotefilelog) to the temp file created by the wrapper. Needed for Rust migration
Differential Revision: D7586451
fbshipit-source-id: d9c3454055a76cafa7a0f93238bc837eba8e4a48
Summary:
These stats are hard-coded for now but will in a future diff be fetched from a regularly-updated source.
```
fbclone fbsource --dry-run
usage: fbclone REPO [options]
fbclone: error: fbsource is too large to clone without a sparse profile
Please use one of the following profile switches:
--fbandroid: The full FBAndroid profile, for general development on Android apps.
file count: 644324 (35.83%) size 10.3 GB
--fbcode: The full FBCode profile, for general development on backend code.
file count: 950490 (52.85%) size 14.8 GB
--fbobjc: The full FBObjC profile, for general development on iOS apps.
file count: 620154 (34.48%) size 9.18 GB
--xplat: The base profile for xplat development, separate from other profiles that include xplat
file count: 269858 (15.01%) size 4.41 GB
Or use --everything to get a full-size working copy
```
Differential Revision: D7502448
fbshipit-source-id: e37e4e31d355251e9dd2c390e3de7643fa38b80b
Summary:
There are tests in fb/tests we don't run as part of the test suite. Update the makefile and add buck infrastructure to run them.
- Update the test-common-commands-hg.t test
- Re-generate the fbcode/.hgignore file from the updated .gitignore
Reviewed By: quark-zju
Differential Revision: D7584511
fbshipit-source-id: d85800dccf0eb569a68db4b9e1d9796e3d7ac957
Summary:
The megarepo generator now adds new directories and files automatically. We now pick folders and paths randomly, with a configurable number of subdirectories and a configurable length for the leaf filename, and a fixed alphabet.
The array of directories and leaf filenames are prorated: they start out constrained and grow as we approach our desired number of commits to generate (`repogenerator.numcommits`), so as not to be too sparse initially.
The directory array is randomized initially, so the above proration doesn't lead to a trivial edit pattern (e.g. everything in a/* initially.)
Lastly, we now stop generation when we hit our goal.
Reviewed By: quark-zju
Differential Revision: D7572968
fbshipit-source-id: b60d60b6262962ee114cb19b0989e6a1af8c0549
Summary:
The AuthorMap in hgsubversion is currently derived from BaseMap which
has some strange behavior. During long running conversions, this caused some
names to be mangled. For instance, if a long running conversion encounter a
commit with author 'abc' with converted name 'abc@uuid' and then later an author
'abcx' came along, it would convert the later name to 'abc@uuidx' because
BaseMap would match the prefix 'abc' with the beginning of the author name and
then reuse 'abc@uuid'. It then swapped the substring 'abc' from 'abcx' with
'abc@uuid' which resulted in the corrupt 'abc@uuidx'.
The fix is to add beginning and end markers to the regex name. The regex support
seems to be based around the ability to define custom regular expressions in
files to manipulate author/branch/tag names. In those cases the dictionary
__setitem__ call is passed a regular expression as a value. Since this patch
only affects the case where a string is passed, the regular expression scenario
will still work.
Reviewed By: singhsrb
Differential Revision: D7592383
fbshipit-source-id: 250b32d56782a6ec905cbd6620e0289fbdb523f0
Summary:
Removes bundlev1 from the supported outgoing versions, but keeps a flag
around to force enable it if tests need it.
Reviewed By: quark-zju
Differential Revision: D7591176
fbshipit-source-id: 280cbbbe87848e3d6c9d448ce4f87c5eadeff720
Summary:
Bundle1 is being deprecated. These tests use it but don't need to, so
let's change them to use bundle2.
Reviewed By: quark-zju
Differential Revision: D7591178
fbshipit-source-id: 3fd46d3bbab9f7acd2f63dfb4f10c21b6d2c35e9
Summary:
The commit interactive test was creating a bundle to test committing
binary files. It had no reason to need bundle1, so let's update it to bundle2.
Reviewed By: quark-zju
Differential Revision: D7591170
fbshipit-source-id: 964cd2cfc4368a89c956b30389ca74ab0b87a486
Summary:
These tests use hard coded url's that don't include bundlecaps, so it's
difficult to convert them to use the right bundlecaps for bundle2.
Reviewed By: quark-zju
Differential Revision: D7591165
fbshipit-source-id: 3424c448be8c713cac5b876438745414a59b7230
Summary: We're deprecating bundlev1, so let's update this test to not use it.
Reviewed By: quark-zju
Differential Revision: D7591169
fbshipit-source-id: c3bd3496e46c57365beb6cc8380ed6d13110f7b3
Summary:
We weren't passing bundlecaps to the backfill pull, so we were getting
bundle1. Let's fix that
Reviewed By: quark-zju
Differential Revision: D7591167
fbshipit-source-id: 111e2967190dca17764c84e6d7be850644f222fd
Summary:
Pushrebase previously defaulted to bundlev1. Now that the server can
support v2, let's default to v2.
Reviewed By: quark-zju
Differential Revision: D7591174
fbshipit-source-id: bc5448490ff319543baedf3f5a1aab160a73ed27
Summary:
Bundlev1 is old and really shouldn't be used anywhere. Let's default to
v2.
Reviewed By: quark-zju
Differential Revision: D7591172
fbshipit-source-id: 2699e0b4dd8d1c1951f9dd92f0d9d300d935a04b
Summary:
We want to deprecate the bundlev1 format, so let's start by adding a
develwarn. Later diffs will update the tests to not use v1, then remove v1 as a
supported outgoing bundle entirely.
Reviewed By: quark-zju
Differential Revision: D7591166
fbshipit-source-id: 143ad029bfe4d141f91d6d5077342dfa44ad2944