Commit Graph

13742 Commits

Author SHA1 Message Date
Arun Kulshreshtha
aaf26c23ca movement: pass --merge flag to update from prev/next
Summary: We weren't passing the `--merge` flag from `hg prev` and `hg next` to the underlying invocation of `hg update`. This diff fixes the problem so that `--merge` now works as expected.

Reviewed By: DurhamG

Differential Revision: D14154244

fbshipit-source-id: 4a2412cca714ec8f269eb5f2989e39821642fbb3
2019-02-20 13:49:08 -08:00
Durham Goode
1935d046b8 pushrebase: backout change to preload the manifest
Summary:
Backs out D13944829 that add preloading the manifest to pushrebase. In
a situation where you receive tree commits, but the repo is hybrid, this causes
it to try to lookup the bundled tree manifests in the flat manifest revlog.

Let's just back this out for now until we can come up with an appropriate fix,
or move all our repos to treeonly.

Reviewed By: quark-zju

Differential Revision: D14151876

fbshipit-source-id: 0f7419d5b9bcd9d7ce363f4349e9e2e4a86cf713
2019-02-20 13:44:51 -08:00
Mark Thomas
6ee252bb95 debugstatus: print the clock value stored in treestate
Summary: Add the current clock value to the output of `hg debugstatus`

Reviewed By: quark-zju

Differential Revision: D14150641

fbshipit-source-id: 917ac3095bc933c042c0f057d0dbda38ef710844
2019-02-20 11:01:52 -08:00
Kostia Balytskyi
33a83f729b replay: only expect timestamp and not timezone
Reviewed By: StanislavGlebik

Differential Revision: D14149972

fbshipit-source-id: 3cab55c9247fa06e3a01a5d4dda507d47a6ebf5e
2019-02-20 08:47:25 -08:00
Kostia Balytskyi
4a3a890f0d unbundlereplay: do not produce changegroup response part
Summary:
This is a perf optimization. `unbundlereplay.respondlightly` instructs the
server to not produce the pushback parts regardless of what `replycaps` part
of the incoming bundle says. This is important, since the mononoke-hg sync will
send all the bundles in a searialized way, so we want to optimize time where
possible.

Reviewed By: StanislavGlebik

Differential Revision: D14131575

fbshipit-source-id: afec15347d43fa52b1ec64b4ac8ece5b227ccf7d
2019-02-20 08:47:25 -08:00
Xavier Deguillard
966f142720 tests: make test-fb-hgext-remotefilelog-corrupt-cache.t reliable
Summary:
This test has been extremely flaky in the last few weeks, causing builds to not
being released, or just sandcastle jobs failing randomly. The reason for the
flakyness was due to the mtime stored in the dirstate being -1 instead of the
real mtime of the file.

The reason for the mtime to be -1 is to fix a race where a file is modified in
the same second the dirstate is updated. This can happen when a transaction
spans less than a second. By forcing a transaction to always last at least a
second, we can avoid this issue and make the test stable.

Reviewed By: quark-zju

Differential Revision: D14141924

fbshipit-source-id: ce151cd65d930f8c745633f7575ea006748af9b9
2019-02-19 16:24:38 -08:00
Kostia Balytskyi
2c56dd0930 unbundlereplay: add a missing bit to the test
Summary: Add the actual verification of the server-side repo after `unbundlereplay`

Reviewed By: StanislavGlebik

Differential Revision: D14131577

fbshipit-source-id: 18828479b07a110f26fd8adf108eb94a21d817c6
2019-02-19 08:22:24 -08:00
Kostia Balytskyi
da3e429150 wireproto: add unbundlereplay command
Summary:
This is to be used from Mononoke->hg sync.
Currently expects only `pushrebase` bundles, e.g. one head and one book to
move.

Reviewed By: StanislavGlebik

Differential Revision: D14116130

fbshipit-source-id: 959a6e51f51e21da5592c84188e294a33057ffaa
2019-02-19 01:57:39 -08:00
Mateusz Kwapich
4db0750027 fsmonitor: use correct length for number of files changed
Summary: When comparing the number of files changed, fsmonitor was incorrectly using the length of the result dict (always 4), rather than the number of files watchman returned.  Use the right list of files instead.

Reviewed By: markbt

Differential Revision: D14123604

fbshipit-source-id: 94684f1f189d045b2f6a880180b15e52ba9bba8c
2019-02-18 10:03:12 -08:00
Mateusz Kwapich
9e35a167ef fsmonitor: show that we don't update watchman clock as often as we wish
Summary:
This subtle bug shows only when the watchman-changed-file-threshold is set to a
value higher than 4.

Reviewed By: markbt

Differential Revision: D14123605

fbshipit-source-id: 51ff3172fef5bc65fb9f68bb34826a9181fd64a9
2019-02-18 10:03:12 -08:00
Kostia Balytskyi
a61dbb725b branches: delete hgsubversion test related to branches
Summary: It fails the build currently.

Reviewed By: quark-zju

Differential Revision: D14108628

fbshipit-source-id: 5721a3513c5234df1c96756a3ab48b3b6c9c350f
2019-02-15 11:26:56 -08:00
Liubov Dmitrieva
4454d6eeb5 pushbackup: fix early exit logic
Summary:
the early exit logic was incorrect, basically if there is at least 1 bookmark
in the repo and the backup state was not empty, it didn't catch that nothing has been changed.

bookmarks are dicts, so it is fine to compare them

if any bookmarks in the repo, everytime `hg pushbackup` established a connection to mercurial

Reviewed By: quark-zju

Differential Revision: D14103938

fbshipit-source-id: 0edc4d9e186199670765fd2362236330e831c7d9
2019-02-15 10:04:00 -08:00
Jun Wu
f752c4dd75 commands: deprecate "hg id -b"
Summary:
There are still users of "hg id -b", namely shell prompt scripts.
However, it seems fine to remove "branch" from the formatted (JSON or other
formats) output.

Reviewed By: ikostia

Differential Revision: D14076296

fbshipit-source-id: a77f4b9e73161d322da3f1bdec993082ac463939
2019-02-14 17:44:40 -08:00
Jun Wu
dc38aa9d7a commands: remove "clone --branch" flag
Differential Revision: D14076299

fbshipit-source-id: dafbb7866e12e551b162a20ee048264866b67c96
2019-02-14 17:44:40 -08:00
Jun Wu
e257757924 commands: remove "bundle --branch" flag
Summary: Named branches are going away.

Differential Revision: D14076297

fbshipit-source-id: b68356f7075a6a8787cf0d2aa972bb27e1ef9bb1
2019-02-14 17:44:40 -08:00
Jun Wu
37af1cfda3 commands: remove "commit --close-branch" flag
Summary: Without named branch, it is not meaningful to close a branch.

Differential Revision: D14076295

fbshipit-source-id: 527ae457cb14f9415fa7269b7dc123252e7d6867
2019-02-14 17:44:40 -08:00
Jun Wu
35a58e8c24 commands: replace "branch" command with deprecation warnings
Summary:
Unfortunately, there are still users of the "hg branch" command so we cannot
remove it right now. But I'm updating internal tools to not call it.

Reviewed By: ikostia

Differential Revision: D14076300

fbshipit-source-id: a5322d9c9ce8148c6ad0800653bd829736556386
2019-02-14 17:44:40 -08:00
Jun Wu
82b4be9a7f config: hard-code ui.allowbranches=False
Summary: Since it's always False, remove the config option.

Reviewed By: ikostia

Differential Revision: D14076304

fbshipit-source-id: 2cc6409355a0c4514a62bc764e1deec0af1bd3a1
2019-02-14 17:44:40 -08:00
Jun Wu
9a87d9567c commands: remove "branches" command
Summary:
It seems nobody uses it from dev_commands logging. Search for "allowbranches"
in all internal repos suggests nobody turned it on. The tests were also
migrated to not use the command so let's just remove it.

Reviewed By: ikostia

Differential Revision: D14076298

fbshipit-source-id: a1cb03b2da289c01b15f0580ffe77531941be213
2019-02-14 17:44:40 -08:00
Jun Wu
20da8e235a test-hgsubversion-unaffected-core: remove tests using named branches
Differential Revision: D14063219

fbshipit-source-id: 80cad750bfc5c0ef66d545e4a6be56342a195f8e
2019-02-14 17:44:39 -08:00
Jun Wu
702ed9a453 test-revset: do not use "hg branch" directly
Summary:
Migrate away from using the "hg branch" command to "hg commit --extra branch="
instead. In the future the branch namespace would be removed, so we create
local tags instead.

`test-revset2` was split from `test-revset` and has the same header. Do the
same change to it. Besides, de-duplicate tests about the `tag()` revset.

Reviewed By: ikostia

Differential Revision: D14058435

fbshipit-source-id: b59fadc43939d85d14bbf9f81227c523b65557a0
2019-02-14 17:44:39 -08:00
Jun Wu
338fe1197f dirstate: add more logging to debug T39234759
Summary:
"st_size" returned by watchman is sometimes 0. We suspect it's incorrect.
It could be the file on disk is actually empty, or the kernel made it
look empty to watchman in the past, or there is something wrong with
serialization, etc. Let's first add a real os.stat to test if the file
is really empty.

Reviewed By: phillco

Differential Revision: D14090851

fbshipit-source-id: bd75cf86bfd117285658ad0dd7fb28d0e8b5585c
2019-02-14 16:29:46 -08:00
Phil Cohen
50ebbbbb86 hook: print exception message on load failure
Summary: Otherwise mergedrivers become impossible to debug if they don't import correctly.

Reviewed By: ikostia

Differential Revision: D14071200

fbshipit-source-id: 3e677089e6b008d892158290c392e1f9d68a67ae
2019-02-14 16:22:22 -08:00
Kostia Balytskyi
2da9689539 test-hggit: yet another fix
Differential Revision: D14091401

fbshipit-source-id: f712c7796ff3cbd66a0249ba6aeb2405a18ffc68
2019-02-14 14:08:27 -08:00
Mateusz Kwapich
4f58ae8678 config: stop lying about the config locations
Summary:
Since september (D9840431) rcutil.rccomponents is no longer source of truth
about which config files we load. In fact we use it only in the
`hg config --debug`. This leads to situations where the debug command mentions
loading a specific config file and then ignores it completely which is very
confusing.

Let's remove it.

Reviewed By: suitingtseng

Differential Revision: D14083220

fbshipit-source-id: 362fd9bf574e24639f99a1203206184da42d1e24
2019-02-14 09:31:58 -08:00
Johan Schuijt-Li
09d54f3cf4 remotenames: treat query strings and fragments as parameters
Summary:
When using query strings or fragments in an URL we should treat repository paths
as the same repo. This allows servers to use query strings for metadata, without
treating the urls as different servers. By introducing normalization in our grouping,
we will consider the normalized result to be the qualifier for what is the same repo,
rather then the full absolute path - which includes query strings and fragments.

Reviewed By: DurhamG

Differential Revision: D14051479

fbshipit-source-id: c82fe041467f6bd6af210688c0be873e2da93781
2019-02-14 03:21:53 -08:00
Johan Schuijt-Li
8b2b9f0878 tests: dummyssh should have same behavior as hg-ssh-wrapper
Summary: We're using query strings to provide metadata to the server, but they should be stripped before they actually reach the core Mercurial handling. Let's update the tests to simulate this behavior.

Reviewed By: DurhamG

Differential Revision: D14051480

fbshipit-source-id: a9b448fd193f17aeab93c4886efdec3fda533c4d
2019-02-14 03:21:53 -08:00
Kostia Balytskyi
c2d9319e02 test-hggit-clone: fix on OSX
Summary: Yet another unnoticed equivalent to D14074466

Reviewed By: StanislavGlebik

Differential Revision: D14080462

fbshipit-source-id: e5a25e4eb0080fd00df84515cc704ca9e7901334
2019-02-14 00:58:07 -08:00
Kostia Balytskyi
e6620b81ec test-hggit-push: fix
Summary: Same as D14074466, I did not notice this failure at first.

Reviewed By: stashuk

Differential Revision: D14078919

fbshipit-source-id: 3da9de3f1a2d29efe7a9f11809b4a950b4c06b67
2019-02-13 20:08:23 -08:00
Kostia Balytskyi
8fa8c5ce45 test-hgweb-json: make output more predictable
Summary: Followed quark-zju's advice to get stable passing of the test

Reviewed By: quark-zju

Differential Revision: D14075062

fbshipit-source-id: 0ed0d5597d1be25607f93a527b27b37e89702c81
2019-02-13 16:25:41 -08:00
Kostia Balytskyi
0e8bb9052d test-hggit-pull: fix the test on OSX
Summary: Who knows why the percent-encoding became lowercase on OSX.

Reviewed By: strager

Differential Revision: D14074466

fbshipit-source-id: 75918a4558a2ea362efa857840606af89919d202
2019-02-13 16:15:27 -08:00
Jun Wu
685282f716 test-push-race: remove the test
Summary:
The test uses named branches in an extensive way that is hard to fix. In
production we have been using different code paths for years: hgsql +
pushrebase has its own locking to avoid race conditions. Mononoke would
have its own way of handling concurrent pushes. Therefore remove the test to
make the named branches deprecation easier.

Logic related to the push-race test is not removed in this diff, in the future
we'll probably just replace server-side logic entirely in the code base so I'm
not dealing with the "to-be-replaced" code right now.

Differential Revision: D14059833

fbshipit-source-id: de20e8fc93ff1253d03ad9397a7490052a54b43c
2019-02-12 21:45:13 -08:00
Jun Wu
61b3505e30 test-completion: do not use named branches
Differential Revision: D14059837

fbshipit-source-id: 214e585408c5d11693fd4940f7c8b527f8ed6d51
2019-02-12 21:45:13 -08:00
Jun Wu
9d21b98c57 convert: drop monotone support
Summary:
Monotone repos are rare these days. Drop support for it.
This also solves an issue that test-convert-mtn.t uses named branches.

Differential Revision: D14059836

fbshipit-source-id: 1e9d4fe6fdc295393ff67c5e068b230b9ed0c0af
2019-02-12 21:45:13 -08:00
Jun Wu
d4b5e57141 test-hgweb-json: stop using named branches
Summary: Use bookmarks instead.

Differential Revision: D14030468

fbshipit-source-id: e3ebce2712bc7a49f19ffa6ab93823d35fb41975
2019-02-12 21:45:12 -08:00
Jun Wu
ce58d8c7a8 test-hgweb-commands: stop using named branches
Summary: Make it future-proof.

Differential Revision: D14030467

fbshipit-source-id: 73e22dca569fd7b879abcceaa7e6db8a7fef348f
2019-02-12 21:45:12 -08:00
Jun Wu
3ee3ad8d77 test-hgweb-filelog: stop using named branches
Summary: Use bookmark instead.

Differential Revision: D14030472

fbshipit-source-id: 3f4f61ea8fc8bbff4155162634a41c07943867c7
2019-02-12 21:45:12 -08:00
Jun Wu
30ba0e6839 test-clone: stop using or testing named branches
Summary: Make it future proof.

Differential Revision: D14030469

fbshipit-source-id: 84369a7870bcb5703194f2e8cc140b54ce6de458
2019-02-12 21:45:12 -08:00
Jun Wu
e21b3c5432 test-command-template: do not use named branches
Summary: Use bookmarks instead.

Differential Revision: D14030470

fbshipit-source-id: 13ede04d4552b401b34b02c5b36978f1db063951
2019-02-12 21:45:12 -08:00
Jun Wu
9316f5817d test-log: do not use named branches
Summary: Use bookmarks instead and remove parts related to named branches.

Differential Revision: D14000989

fbshipit-source-id: 802f5c7273b7ac5d9347e68a0f7dd25d9ae48222
2019-02-12 21:45:12 -08:00
Jun Wu
484f9e3c42 test-convert-datesort: do not use branches
Summary: Create the repo without using named branched.

Differential Revision: D14000990

fbshipit-source-id: e84ee80ae25c4cbf2776da500bde840d028ae4d8
2019-02-12 21:45:12 -08:00
Jun Wu
d197692cc9 test-fetch: remove parts related to named branch
Summary: Named branches are going away.

Differential Revision: D14000991

fbshipit-source-id: 0528b24dd72579a3a49336378af095c0b503c7b1
2019-02-12 21:45:11 -08:00
Jun Wu
a93a452024 test-convert-filemap: remove parts related to named branches
Summary: Named branches are going away.

Differential Revision: D14000988

fbshipit-source-id: 8a60707278eaa06cccb30fe5732bf1ced7ed608d
2019-02-12 21:45:11 -08:00
Jun Wu
ab0f9bc480 test-graft: do not use named branches
Summary: Use `debugsetparents` to create a merge commit instead.

Differential Revision: D14000098

fbshipit-source-id: a954b7a1aa29dc531bf6af19641d0a089e5e2e36
2019-02-12 21:45:11 -08:00
Jun Wu
4cd0b5c098 transplant: remove the extension
Summary:
The (disabled by default) `transplant` command is similar to `graft` or
`rebase`. It makes sense to removeit.

This diff removes the extension.

Reviewed By: singhsrb

Differential Revision: D14000099

fbshipit-source-id: a03e4925cefa4236bd9d62cfe9d33d140707bd7c
2019-02-12 21:45:11 -08:00
Jun Wu
8fd207a853 revset: stop supporting origin() and destination()
Summary: They will be replaced by successors and predecessors.

Reviewed By: singhsrb

Differential Revision: D14000097

fbshipit-source-id: 07f0c97edd7eb16ad665c00886c00212d516ae72
2019-02-12 21:45:11 -08:00
Jun Wu
9210419543 test-graft: rewrite test cases to use smaller repo
Summary:
Rewrite "graft --force" and "empty graft" test cases to not depend on the
previous repo state. Remove the "same origin policy" test since eventually
we'll use mutation history to test origins and the code path here would be
rewritten.

This makes it easier to change the rest of the test.

Differential Revision: D14000100

fbshipit-source-id: 26002774c370a965a9bca157e08246c89aa5e274
2019-02-12 21:45:10 -08:00
Jun Wu
7ed91e39b1 test-commit-amend: rewrite the entire test
Summary:
The test has many problems. Namely, it depends too much on previous repo state,
uses legacy features like named branches, revision numbers, unsafe strip, and rollback,
and is too verbose and over-testing a lot of things (ex. test commit template
many times, test diff output many times, test bundle debug output
unnecessarily, etc).

Rewrite the test to solve all of the above issues:
- Every individual test case uses separate small repos.
- Do not use revision numbers.
- Do not use legacy strip.
- Do not use named branch.

This also reveals that amending a merge commit is buggy in many ways. We can
probably fix them up when cleaning up the commit/merge logic.

Differential Revision: D13993825

fbshipit-source-id: 9e1ff8054741b4356319ce37daea3c5184933927
2019-02-12 21:45:10 -08:00
Jun Wu
c8868a0d31 test-commit-interactive: avoid using branches
Summary:
The use of branches is only to create a merge commit. Use drawdag to do that
instead.

Differential Revision: D13993829

fbshipit-source-id: b5f217e7d9ba535b7fd379ec4ca31b899350de02
2019-02-12 21:45:10 -08:00
Jun Wu
cd10b49318 test-push-warn: remove the test
Summary:
The test is mainly about warnings of new heads, which we might want to remove
entirely (see D8148016). The test is also deeply coupled with named branches,
which will be removed.

Differential Revision: D13993828

fbshipit-source-id: 950f0cb98cd6cb2c8192f1ff36ce2d6b642d1225
2019-02-12 21:45:10 -08:00