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
Summary:
We haven't used this for over a month, we're alive and well.
The raccoon asked me to remove this:
codecleanupracoon
Differential Revision: D7578280
fbshipit-source-id: ee522203095a213dc90d6146ce720b473ab5afe5
Summary:
Backports:
```
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@google.com>
# Date 1521175251 25200
# Thu Mar 15 21:40:51 2018 -0700
# Branch stable
# Node ID a046d6890761b6a99475f0e5bf9cce74715897ec
# Parent b9a6ee2066f9636265d812a3a8b82b02bc3223aa
rebase: avoid defining two lists with the same contents
In abort(), there's "dstates" and "rebased" that are identical, which
they seem to have been since 0806823370d8 (rebase: properly calculate
descendant set when aborting (issue3332), 2012-03-22). Let's
de-duplicate. I don't know what "dstates" means, but "rebased" makes
sense (it's the list of rebased revisions), so let's pick that.
Differential Revision: https://phab.mercurial-scm.org/D2878
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@google.com>
# Date 1521178507 25200
# Thu Mar 15 22:35:07 2018 -0700
# Branch stable
# Node ID 177f3b90335fc49c23a8880de57dc865f0832849
# Parent a046d6890761b6a99475f0e5bf9cce74715897ec
rebase: on abort, don't strip commits that didn't need rebased (issue5822)
I clearly missed adding this condition in 78496ac30025 (rebase: allow
rebase even if some revisions need no rebase (BC) (issue5422),
2017-05-11). Perhaps I should have opted for the "revdone" solution I
mentioned there...
Differential Revision: https://phab.mercurial-scm.org/D2879
```
Differential Revision: D7517675
fbshipit-source-id: c08206700f2a26a36785adf9df93176449a58376
Summary:
Backport from:
```
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1520766638 -32400
# Sun Mar 11 20:10:38 2018 +0900
# Branch stable
# Node ID eeb87b24aea7f547f6d95b812dd080dc6e9ab194
# Parent 9639c433be54191b4136b48fe70fc8344d2b5db2
amend: abort if unresolved merge conflicts found (issue5805)
It was checked by repo.commit() before e8a7c1a0565a "cmdutil: remove the
redundant commit during amend."
```
Differential Revision: D7517547
fbshipit-source-id: fd585bc4dceb837e8486b1285ed7ff14d24795d3
Summary:
The progress bar thread is a daemon thread, so that it doesn't need to be
deactivated manually. However, this means the thread terminates and the lock
is released during interpreter shutdown. Because Python clears module
attributes at the start of interpreter shutdown (see [1]), releasing the lock
fails as it can no longer get the thread identity.
To mitigate this, we register an atexit handler to terminate and join to the
progress bar thread.
[1] https://stackoverflow.com/questions/25649676/where-is-pythons-shutdown-procedure-documented
Differential Revision: D7568155
fbshipit-source-id: 85ef10af6c1576d5beceb78f8514e0e440cdab7f
Summary:
We disabled `runworker` for every importer (fastimport, syncimport, seqimport) when we hotfixed a customized file transaction breakage in fastimport D7108127.
Since
- we're not using fastimport, which relies on the customized file transaction
- seqimport does not rely on the customized file transaction mechanism
- syncimport is super slow without `runworker` and syncimport does not rely on the customized file transaction mechanism
- the manual work involved in adding mapping to ovrsource (we have to do that if we don't have syncimport) is not trivial
I think it's a good idea to bring back `runworker`, which is a configurable config, and it's explicitly set to `false` for fastimport and seqimport, `force` for syncimport.
This diff
- make the `useworker` config available again
- remove the unnecessary test on the customized file transaction, which is still broken with `runworker`
- log the time it takes to finish one sync import
Differential Revision: D7557856
fbshipit-source-id: 6d4105cc38b182e027512730901ce3b2a4e1d449
Summary: We want to know what is the reason why we think the lock file can't be removed.
Reviewed By: farnz
Differential Revision: D7513954
fbshipit-source-id: fd1668e7a614e5e24e250018fbc880ba87821aa8
Summary:
The goal of this diff is to introduce a central place for all logic related
to parsing and handling the contents of the lock files. The current state of
things is hard to manage and even harder to extend.
NB: the stack is not complete, the changes that actually use this refactoring are yet to come.
Reviewed By: quark-zju
Differential Revision: D7489326
fbshipit-source-id: aa79d964411e3f5b61e24aa9babece05d4f0bd60
Summary: We need this to support producing sparse profile stats in a null-revision working copy.
Reviewed By: quark-zju
Differential Revision: D7553022
fbshipit-source-id: b1643f443de5a748bf81ff2df16ace984d59a2c2
Summary:
hg sparse explain wasn't supposed to recurse, not without additional support.
It was the process of gathering stats that overwrote shared mutable structures.
Prevent this from happening again by making these structures immutable.
Differential Revision: D7516570
fbshipit-source-id: 247c60b4bd8d2d22b42c41871e1eb15988820025
Summary:
We were ignoring the actual profile data, and all profiles were given the same .hg/sparse-based hash signature instead.
Error introduced in D7415720
Differential Revision: D7514087
fbshipit-source-id: 56288aaaa2065b031318e7c065ec6310f6cecd37
Summary:
Our tests use features that are provided by the bash shell to function
properly. I ran into issues with our tests on Ubuntu because the default shell
was `dash` which did not even support the `source` command. Therefore, this
commit changes the default hg shell for the tests to `bash`. Clients can always
override the default hg shell for the tests to another shell.
Reviewed By: quark-zju
Differential Revision: D7563733
fbshipit-source-id: e9c16c002793a919a49292a9aa0a876ba232c293
Summary:
`run-tests.py` has an option to specify the shell for running the
tests. However, when run with the `--shell bash` configuration, several tests
fail with the `testrepohg: command not found` error. I could not find the
specific cause for this but changing the alias to a function resolved this
error. Also, fixed another related error by using double quotes during variable
expansion.
Reviewed By: quark-zju
Differential Revision: D7563731
fbshipit-source-id: 58e1b5b996ccdc20b8375dcd5f4f8e071bd9cdc1
Summary:
This allows us to turn on and off hgignore support directly without changing
files in the working copy (which could be hard to revert cleanly).
Reviewed By: mjpieters
Differential Revision: D7544529
fbshipit-source-id: 14cc41e2ae361070f91bf3b8aa28dd5808e7fe99
Summary: When I run this test (test-fb-hgext-p4fastimport-seqimport.t) on my dev server, which has the same `p4d` as what we have in prod (P59384966), it fails the test due to reading the file from a different source P59381563. Since both `p4` and `rcs` are valid options for a read, this diff updates the test to not restrict to `p4` only.
Differential Revision: D7556357
fbshipit-source-id: b82d254841a31fe447452ee408bdb8e157854aab
Summary:
Previously `hg graft -r 'ancestor::descendant` printed no error message at all.
This diff fixes it.
Reviewed By: mjpieters
Differential Revision: D7533498
fbshipit-source-id: 5c4e41ecc3178495ad2f41ef53ef65f7fbb70212
Summary:
A side effect is, the hint won't be printed out if fbamend is not enabled,
which is more "correct".
Reviewed By: markbt
Differential Revision: D7392130
fbshipit-source-id: 5b7aa4cc3083b03546c54965ce51040fab958b87
Summary: This allows people to silence the hint.
Reviewed By: markbt
Differential Revision: D7392127
fbshipit-source-id: ac16f952a178d567ce13e22946127456972ebe85
Summary:
This allows users to silence the "hide" advice.
In the future, we might want to change "hide/unhide" to only affect visibility
without changing obsolesce. So "strip" is not fully deprecated yet.
Reviewed By: markbt
Differential Revision: D7392131
fbshipit-source-id: 2448d4c91dffce31d29e2dd99078cb555c9a8f8c
Summary:
This allows people to silence hints as they like. It's done by modifying
user hgrc.
Reviewed By: markbt
Differential Revision: D7392133
fbshipit-source-id: 1365294217db92dfb3a0c81332a9fefd164795d4
Summary:
This allows us to have a unified way to print hint messages at the end of a
command. It would be helpful for feature discovery in general.
Reviewed By: mjpieters
Differential Revision: D7392132
fbshipit-source-id: 8b4e94cc2176266652459ecca3428bd86d95bfe2
Summary:
We bailifchanged() later on, but the abort does an `up -C originalwc` before that. Let's bailifchanged() immediately.
A better version: reset the transaction and clear the statefile, instead of calling `abort()`.
Reviewed By: quark-zju
Differential Revision: D7538017
fbshipit-source-id: 8c490b366e495bb269c4d8c75b6144c535c8d54f
Summary:
Minor fixes to how the `previous locations of %s` line is printed:
- Start the pager before printing this line, so it gets included in the pager
output correctly.
- Avoid printing this line when using a custom output template. Previously it
was only skipped when using the `json` template. This now matches the logic
used to skip the `no recorded locations` line that was recommended in
D7512030.
Reviewed By: ryanmce
Differential Revision: D7537661
fbshipit-source-id: eb695dd98c06149701cf96acf5ec2eb277ea9cf3
Summary:
Avoid printing "no recorded locations" directly to stdout when a format
template was specified. In particular this avoids printing non-JSON data
when using `-Tjson`.
We potentially could change this to print to stderr instead. However for now
I just followed the same pattern of checking the template as was done above for
the "previous locations" message.
Reviewed By: ryanmce
Differential Revision: D7512030
fbshipit-source-id: 2c32f07962fac4ca3d6bfd8f2ca3c4840b2a8a9b
Summary: When no cache has been set (`simplecache.caches=`) then there's no `name` set either. This exposed a logic error in this section of the code.
Reviewed By: ryanmce
Differential Revision: D7513976
fbshipit-source-id: ecbc7a8ac8c6eb23010d64ab8cbf9f9fb7d8f497
Summary:
move logic to update current rev to its new location (optional)
we are trying to update only if it is unambiguous
Reviewed By: DurhamG
Differential Revision: D7431940
fbshipit-source-id: 72e7fea7365a231c4d98ceb4cf4872a4db02d9ca
Summary:
[commitcloud] commit cloud recover state
`hg cloudrecover` command
It might be helpful to have a command like this in cases something goes wrong
with the local state
Reviewed By: DurhamG
Differential Revision: D7417147
fbshipit-source-id: 4b236f2753b1f212ff4881a649032e53e032c66c
Summary:
When pushing a backup bundle to the server, check if the response contains an
error, and fail the backup accordingly.
Differential Revision: D7498324
fbshipit-source-id: a08807ac54e9d3044ff1450e93d2a8ea9d6f767f