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
Summary: Commit 23f4cd4264ef broke a bunch of tests. Let's back it out.
Reviewed By: singhsrb
Differential Revision: D7646736
fbshipit-source-id: ace9b7be2c50f64ea382eaa72a350ead67b2a2a6
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:
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:
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: 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:
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: 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:
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:
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:
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
Summary:
infinitepush: MRU order of listing hosts and repo roots to show host/repos with most recent first
this is for improving ux for those who have a lot of backups (T27713908)
Reviewed By: StanislavGlebik
Differential Revision: D7568128
fbshipit-source-id: 65bb6a4759298268fbd3109df57a2b9e198bd4c0
Summary:
This is meant to replace `arc cleanup`. Normally the commits corresponding
to landed Differential Revisions disappear on `hg pull` unless:
* there's a bookmark pointing to a commit
* the commit is currently checkout out
This command makes it easy to deal with such commits. Just run `hg hide -c`
Reviewed By: ryanmce
Differential Revision: D7350794
fbshipit-source-id: 3b77acbca01edc5bffda53023687f268dc8edb08
Summary:
I know that `hg undo` is useful for undoing most of the commands
but hide is the one that a bit more sensitive because it's
the command to remove commits from your smartlog.
Also I'm planning on introducing additional, more powerful options
for hide and that could be useful for undoing them.
Reviewed By: ryanmce
Differential Revision: D7350795
fbshipit-source-id: fbc42674fe0ca4ac6300c08095897f624d41a2f3
Summary:
Users would feel more comfortable using this command if they knew what it's
doing for them. Use `--quiet` to disable verbosity
Reviewed By: quark-zju
Differential Revision: D7380617
fbshipit-source-id: 0de46a858ec9c1c4a8cd9a55a5760bdcd8723424