Commit Graph

15 Commits

Author SHA1 Message Date
Mark Juggurnauth-Thomas
0ec7d7de75 make it possible to access Mononoke repos with slashes in their names
Summary:
Mononoke repo names are permitted to contain slashes, however currently Sapling's URL parsing doesn't understand this, and instead has a bunch of hacks designed to work around misunderstandings of URIs.  As a result, Sapling can't currently clone them.

You can look at resources like [Wikipedia's artical on URIs](https://en.wikipedia.org/wiki/Uniform_Resource_Identifier) if you are not familiar with how uniform resource identifier syntax should work.

We fix this by handling the `mononoke` and `fb` URI schemes specifically.

* For the `mononoke` scheme, the authority is the Mononoke server and the path is the name of the repository, with any leading or trailing slashes removed.

* For the `fb` scheme, the path is the name of the repository, and there should be no authority as the server is implicit.   This means a valid `fb` scheme URI is of the form `fb:reponame`.  Unfortunately, since people misunderstand `://` to be a single token, existing `fb` URIs exist of the form `fb://reponame`.  This is a problem, as if the repo name has a slash in it, it becomes `fb://firstpart/secondpart`, where `firstpart` is the authority and `secondpart` is the path.  We handle this specially by taking the scheme-specific part as a whole and removing all leading and trailing slashes.

In order to fix the second in the long-term, we must also fix up how the `schemes` extension handles URIs like the `fb` scheme.  In a similar vein, we substitute the full scheme-specific part in the target URL.  This will allow us to migrate from `fb://reponame` to `fb:reponame`, at which point we can use correct URI parsing in the `fb` scheme, as we do for the `mononoke` scheme.

Reviewed By: yancouto

Differential Revision: D41771964

fbshipit-source-id: e93060afe316f4b965a6d1770b1b88a8d60e5f5c
2022-12-08 06:43:09 -08:00
Jun Wu
fb54354c64 tests: move "inprocess-hg-incompatible" to a feature header
Summary:
Make it possible to mark a test as incompatible with "in-process-hg"
by using the `#inprocess-hg-incompatible` header without depending
on `features.py`.

Reviewed By: sggutier

Differential Revision: D35118755

fbshipit-source-id: 125c98b42e9598378fc2b586944c75b4f660a065
2022-08-17 19:18:02 -07:00
Jun Wu
00ecfbb16c tests: opt-in new test runner for passing tests
Summary:
A lot of tests are passing with the new test runner.

This is done by `./edit-feature-header.py debugruntest` and paste
the `Passed:` section from `hg debugruntest -v test-*.t` output.

Note: some tests fail with this but pass with debugruntest. They
will be investigated as follow-up.

Differential Revision: D34931992

fbshipit-source-id: 99abc3d9800bb1dd3487dbfa15d715c0bd3ba878
2022-08-16 14:59:23 -07:00
Jun Wu
e41d5cd495 changegroup: drop "added x changesets with y changes to z files" message
Summary:
Our current `hg pull` in production typically shows:

  % hg pull
  pulling from mononoke://...
  connected to ... session ...
  imported commit graph for ... commits (1 segment)

There is no "added x changesets ..." message. Drop it from tests.

This also makes it easier to migrate tests to remotefilelog repos, since
with remotefilelog it will show "0 changes to 0 files".

Differential Revision: D32570597

fbshipit-source-id: aa660e2cbd9bc07caa74f0126e152589b08e5c57
2021-12-14 22:16:15 -08:00
Durham Goode
12d0ab70a0 incoming: delete hg incoming/outgoing
Summary:
These have been disabled since 2019. Let's delete their logic and their
tests.

Reviewed By: quark-zju

Differential Revision: D31580603

fbshipit-source-id: 037f76fcbfd45a857f408c673c2fe0a932e40048
2021-10-18 14:50:54 -07:00
Durham Goode
e9e0539cc1 filepeer: disable use of filepeer by default
Summary:
We want to remove filepeer as part of removing server logic in the
client. To start with, let's disable it by default and only enable it in tests
that need it. The next step will be to update those tests.

Reviewed By: quark-zju

Differential Revision: D30977765

fbshipit-source-id: c56016f017e894a15bf43fb7a8d3a0a417663ad9
2021-09-22 18:03:29 -07:00
Liubov Dmitrieva
6db6f36ed8 Clean Up: remove infinitepush path
Summary: Clean Up: Once we migrated to Mononoke we can remove the infinitepush path because it creates extra complexity in remotenames, infinitepush and commitcloud extensions

Reviewed By: yancouto

Differential Revision: D30277402

fbshipit-source-id: 1708a71eb33dc9a9b509bdc1b03bed08073b6152
2021-08-12 08:07:30 -07:00
Liubov Dmitrieva
99ff270a78 Clean Up: remove everything about the infinitepush write path
Summary:
Remove everything about the infinitepush write path.

Infinitepush path has been splitted into 2 for migration purpose. It is now time to clean up.

Reviewed By: StanislavGlebik

Differential Revision: D29711414

fbshipit-source-id: c61799fe124e2def4254cdd45e550c82c501e514
2021-07-15 07:37:55 -07:00
Johan Schuijt-Li
e57f819b6e rage/debug output for schemes
Summary:
Add debug output to rage to make sure we have the relevant information in case
we need to debug issues with schemes.

Reviewed By: quark-zju

Differential Revision: D28222910

fbshipit-source-id: 9499c736d61b2c0e4568e05a3afc0ae9730acedf
2021-05-06 04:39:19 -07:00
Johan Schuijt-Li
c120560edf integrate hgext schemes into fb mercurial
Reviewed By: liubov-dmitrieva

Differential Revision: D28185505

fbshipit-source-id: 1eed74bf492c5f22abb7d616b9492eb2a549aead
2021-05-06 04:39:19 -07:00
Durham Goode
c90936941f schemes: remove schemes extension
Summary:
This is unused code. It broke a test while I was doing python 3 work,
so let's just delete this.

Reviewed By: quark-zju

Differential Revision: D24063953

fbshipit-source-id: 323b323ff2b9717c9c16eed54adac467a321e2ae
2020-10-02 07:27:08 -07:00
Durham Goode
6678f088c8 hgweb: disable hgweb
Summary:
Disables 'hg serve' being able to start a web server. This can be
worked around temporarily by setting web.allowhgweb=True, but we should remove
that workaround soon so we can deleted all the code.

Reviewed By: xavierd

Differential Revision: D20951800

fbshipit-source-id: e0d5017647a073b5ede3b0bbc4dd745fabeac816
2020-04-10 10:59:51 -07:00
Zeyi (Rice) Fan
92f6f35e7a mark all tests requiring Python 2
Summary:
This diff marks **ALL** mercurial tests requiring Python 2 feature.

After you fixes some tests, simply remove the `py2` feature requirement and that tests will be continuously run after your diff is landed.

To bypass this feature requirement, run the tests command with `HGTEST_FORCE_PY2=1`. For example:

```
HGTEST_FORCE_PY2=1 buck test //eden/scm/tests:hg_run_tests
```

or

```
HGTEST_FORCE_PY2=1 python run-tests.py
```

----

Basically this diff are created with the following commands:

```
$ sed -i 's/import feature\(.*\)$/import feature\1\n\nfeature.require(["py2"])/' test-*-t.py
$ sed -i '1s/^/#require py2\n/' test-*.t
$ ls | grep -P "^test.*(?<\!-t)\.py$" > list && vim -p $(cat list)
# manually adding feature requires for these Python tests.
```

(Note: this ignores all push blocking failures!)

ignore-conflict-markers

Reviewed By: singhsrb

Differential Revision: D19655148

fbshipit-source-id: 985e3ccb4010cc559049f1d89f8909bc2d9b5e20
2020-01-30 18:49:21 -08:00
Jun Wu
75a8173a10 tests: enable chg for 572 tests
Summary:
Add `#chg-compatible` to 572 tests that seem to pass with chg enabled.
This should make them run faster.

Reviewed By: xavierd

Differential Revision: D18870507

fbshipit-source-id: fe895e733efffc9286cd3d17c7a156c803124395
2019-12-09 15:26:29 -08:00
Adam Simpkins
ab3a7cb21f Move fb-mercurial sources into an eden/scm subdirectory.
Summary:
In preparation for merging fb-mercurial sources to the Eden repository,
move everything from the top-level directory into an `eden/scm`
subdirectory.
2019-11-13 16:04:48 -08:00