Commit Graph

45292 Commits

Author SHA1 Message Date
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
Arun Kulshreshtha
a4a155c025 edenapi: add configitem call for edenapi.url
Summary: We were reading the  `edenapi.url` config item without explicitly setting it up with the `configitem()` function. Not sure what negative impact this would have, but it's probably a good idea to have the explicit call in place.

Reviewed By: quark-zju

Differential Revision: D14075080

fbshipit-source-id: bb4e25de273341768f850f1d5aab6ac21e7f2fc5
2019-02-13 17:41:54 -08:00
Arun Kulshreshtha
c68b388bed edenapi: remove try around import
Summary: Now that the `edenapi` module in bindings is always available for all platforms, we no longer need a try block around the import.

Reviewed By: quark-zju

Differential Revision: D14075082

fbshipit-source-id: e3f45e67ef4572e58f85875af12390ea5d697d43
2019-02-13 17:41:54 -08:00
Wez Furlong
6e445711e6 hg: move scratch into hg code base
Summary:
This shouldn't change any behavior, but should allow
deploying scratch to mac and windows in D14060864

Reviewed By: simpkins

Differential Revision: D14060865

fbshipit-source-id: 8daf65739fa6835c6df682484a8f2dba432977dd
2019-02-13 17:19:46 -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
Arun Kulshreshtha
575e570a28 bindings: move pyedenapi into bindings crate
Summary: Move the edenapi Python bindings into the common `bindings` crate.

Reviewed By: quark-zju

Differential Revision: D13963179

fbshipit-source-id: 76dead82af992615a9e452ee6fbb9f66639c822c
2019-02-13 16:07:00 -08:00
Arun Kulshreshtha
127ca1a990 edenapi: use rustls instead of openssl
Summary:
Switch from using OpenSSL (via `native-tls`) to [Rustls](https://github.com/ctz/rustls), a pure-Rust TLS implementation based on the `ring` crypto crate.

Unlike `native-tls`, Rustls supports ALPN, which means it can be used along with Hyper to perform HTTP/2 requests over TLS. (OpenSSL also supports ALPN, but older versions of Windows' `schannel` library do not, and as such `native-tls` doesn't support ALPN either regardless of platform.)

Rustls also builds on Windows without any special configuration, sidestepping the issues we've been having with OpenSSL in the Windows build.

Reviewed By: quark-zju

Differential Revision: D14070084

fbshipit-source-id: 25268c58a88177f4708370696d326b4c0bdc89a0
2019-02-13 16:07:00 -08:00
Arun Kulshreshtha
1d00a343e4 bindings: add init module
Summary:
Add a new `init` module to the `bindings` crate. This is intended as a place to put global Rust initialization code for Mercurial's Rust extensions. Ordinarily, such code would go at the start of `main()`, but since `hg` doesn't have a Rust main, putting initialization here at least guarantees that it will happen before any of the Rust extension code runs.

Right now, the only thing initialized in the new module is `env_logger`.

Reviewed By: quark-zju

Differential Revision: D14072560

fbshipit-source-id: 0f2770d0a3a6e9c6b7fe68eb62007cc091adad59
2019-02-13 16:07:00 -08:00
Phil Cohen
b4237e4392 setup: include fb.mergedriver package in the build
Summary: This wasn't being included before.

Reviewed By: vipannalla, quark-zju

Differential Revision: D14071697

fbshipit-source-id: 15f78c74a9629a8000ec1125c3e9e30e124c3d51
2019-02-13 15:44:14 -08:00
Jun Wu
0986982f71 Makefile: fix "make clean"
Summary: Files were moved around and Makefile needs update.

Reviewed By: ikostia

Differential Revision: D14062591

fbshipit-source-id: 5478cf75bc3ff431fc7b24fe7df03e9599c0817f
2019-02-13 13:57:07 -08:00
Liubov Dmitrieva
380f425385 infinitepush: fix issue with discovery
Summary:
if server already have everything, the function should return True

otherwise we treat it as fail to backup in pushbackupbundlestacks function

failed to push stack bundle rooted at ...

Reviewed By: quark-zju

Differential Revision: D14048141

fbshipit-source-id: 288291db2f31b0d284c97fecbd61049a58c045de
2019-02-13 08:20:17 -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
Jun Wu
ef58a086e5 test-tag: replace the test with a simple local tag test
Summary:
test-tag.t uses named branches too much. Since global tags are also going away,
replace the test with a simple one about local tags. The local tag portion in
test-tag.t is not too much, though.

Differential Revision: D13993827

fbshipit-source-id: b3a86fa1e07b945fc2926f00ef9de31a4506ba37
2019-02-12 21:45:10 -08:00
Jun Wu
688f14a527 test-shelve: remove test cases about named branches
Summary: They won't pass with the new code.

Differential Revision: D13993826

fbshipit-source-id: e5156da05ef922940198c2fcf7458a086ce23bb4
2019-02-12 21:45:10 -08:00
Jun Wu
87b87d5490 rebase: remove --keepbranches flag
Summary: Branches are going away. Remove related features.

Differential Revision: D13993824

fbshipit-source-id: 8afb01912df016bda08be5bc22ac52be7f5168eb
2019-02-12 21:45:10 -08:00
Jun Wu
e8b4af8f69 test-rebase-collapse: rewrite the entire test
Summary:
Rewrite the test:
- Use drawdag to create test repos.
- Use commit hash instead of revision numbers for new test cases.
- Remove unrelated test cases (ex. strip, branch heads).
- Remove use of named branch.

Differential Revision: D13993823

fbshipit-source-id: d20954dec1b39313f08699f796d5db167dfee641
2019-02-12 21:45:10 -08:00
Jun Wu
5310a34e3f test-rebase-cache: remove the test
Summary:
The "cache" refers to branch and tag caches. Both of them are planned for
removal. Therefore remove the test.

Reviewed By: singhsrb

Differential Revision: D13978569

fbshipit-source-id: 8593f54af4ecd3fb759d2a3a0fe00eb9d8505112
2019-02-12 21:45:10 -08:00
Jun Wu
140d127066 test-strip: remove tests about branches
Summary: Branches are going away.

Differential Revision: D13978567

fbshipit-source-id: a071d7bc032a456a4eb69587152f85fd772f014f
2019-02-12 21:45:10 -08:00
Jun Wu
ab062b1fc8 test-url-rev: do not use named branches
Summary: Use bookmarks instead.

Differential Revision: D13978564

fbshipit-source-id: 9ffe90500addbb6c82cb1a5d12d2d72216f00da0
2019-02-12 21:45:10 -08:00
Jun Wu
fbccd19ed7 patchbomb: remove the extension
Summary:
`test-patchbomb.t` uses named branches and does not look simple to fix.
We don't use email patches internally, and it's not hard to write scripts
around `hg export`. Therefore drop the extension and its tests.

Reviewed By: singhsrb

Differential Revision: D13978577

fbshipit-source-id: 19867ae68c19c996bfce064eb2234705939db9ea
2019-02-12 21:45:10 -08:00
Jun Wu
64c43d2eab import: remove the --import-branch flag
Summary: Branches are going away.

Reviewed By: singhsrb

Differential Revision: D13978568

fbshipit-source-id: b9b4f3d2755757c0d3780bbb10c4579bf8d15fef
2019-02-12 19:54:31 -08:00
Jun Wu
56039b2d0b test-import-bypass: rewrite parts using named branches
Summary: Make it future-proof.

Differential Revision: D13978574

fbshipit-source-id: 7128223113415316af636b4e7437e7cb34f72e6e
2019-02-12 19:54:31 -08:00
Jun Wu
9b4859b2d1 test-rebase-newancestor: rewrite parts using named branches
Summary: Make it future-proof.

Differential Revision: D13978565

fbshipit-source-id: 7816762ba482b6ff2be4a9ce6e921d7e518f3614
2019-02-12 19:54:31 -08:00
Jun Wu
9f9c514b0f test-encoding: avoid using named branches
Summary: Make it future-proof.

Reviewed By: singhsrb

Differential Revision: D13978576

fbshipit-source-id: 3ac619a0856a567f34d3a78cd5c333b3a68a91d4
2019-02-12 19:54:31 -08:00
Jun Wu
275bc9b8e5 test-ssh-bundle1: remove the test
Summary:
The test uses named branches so it will break without modification in the
future. Since bundle1 and ssh are "unloved" features, remove the test instead
of fixing it.

Reviewed By: singhsrb

Differential Revision: D13978573

fbshipit-source-id: d5446685056457766d1752446de9d842f40f3ebf
2019-02-12 19:54:31 -08:00
Jun Wu
5785d860ff test-clone-update-order: remove the test
Summary:
The test uses named branches extensively, partically because there are multiple
ways to specify where to update:

  hg clone URL#NAME1 -b NAME2 -u NAME3
              ^^^^^^    ^^^^^    ^^^^^
         branch name    |        |
           branch name, again!   |
                  revset, can also be a branch name

In the long run, we'll kill NAME1 (`#...` syntax) and NAME2 (`clone -b` flag).
So the (undesirable) complexity will be gone. Remove the test to make the
transition easier.

The `clone -u REV` feature is still tested in `test-clone.t`.

Reviewed By: singhsrb

Differential Revision: D13978578

fbshipit-source-id: 839ad39779c4526e4be48e133610bdb46f57fc93
2019-02-12 19:54:30 -08:00
Jun Wu
c74e2991dc test-revset-outgoing: stop using '#branchname' in path
Summary: This makes it compatible with future releases.

Reviewed By: singhsrb

Differential Revision: D13978572

fbshipit-source-id: 9394a811b848f1160aaa54be0d09dfc2ea142e81
2019-02-12 19:54:30 -08:00
Jun Wu
4e5a678efb test-remotenames-basic: avoid using branches
Summary: Make it future proof.

Differential Revision: D13978566

fbshipit-source-id: 8c6ecb3f4d94212e49f7041492abbe3d06b0a2bc
2019-02-12 19:54:30 -08:00
Jun Wu
04f6795519 remotenames: remove logic about named branches
Summary: Named branches are going away. Remove the logic around it.

Reviewed By: phillco

Differential Revision: D13978575

fbshipit-source-id: d6e28d7cadffa612f74a2afc12800829d6113dfa
2019-02-12 19:54:30 -08:00
Jun Wu
b88c0ebb91 test-infinitepush-delscratchbookmarks: do not use branches
Summary:
The test uses branches to name commits server-side and isolate them from the
bookmark namespace. Branches are going away. Use local tags instead.

Reviewed By: phillco

Differential Revision: D14057253

fbshipit-source-id: 33b8ab63027042eb5e244187874190bdd31e62d1
2019-02-12 19:54:30 -08:00