Summary: This makes it clear that the new behavior is different.
Reviewed By: sfilipco
Differential Revision: D17584605
fbshipit-source-id: 59573dfa14b4eb7a4a9c5bce6ae7340f408035da
Summary:
When migrating down from narrow-heads, we need to restore phase roots. Use a
repo requirement to track the migration state, and perform migrations on
demand.
Reviewed By: sfilipco
Differential Revision: D17584604
fbshipit-source-id: 36c04b0385dd94481f5340a3ecd8eeef3506c765
Summary:
I think we moved the last perforce based repository into `fbsource`.
From the Scuba logs, this doesn't seem to be used any more:
https://fburl.com/scuba/lc6vgy3v. We can revive the extension if required for a
future Perforce repository import.
Reviewed By: quark-zju
Differential Revision: D17630314
fbshipit-source-id: e3ca1a97974aff5fc262b8c724b70d4548280325
Summary: Move ipdb logic so it wouldn't be triggered for common errors like error.Abort.
Reviewed By: xavierd
Differential Revision: D17628968
fbshipit-source-id: fae390d56203d8362a10a75acaa67901279656cf
Summary:
The test is mostly automatic conversion and easy fixes.
No refactoring to simplify code, on the contrary, more
direct printing.
Reviewed By: quark-zju
Differential Revision: D17630869
fbshipit-source-id: 45e57de5fd965d0cc913c2612a6f52cb3c8bd977
Summary:
Filename expansion is probably used a lot in our tests. I think that our
migration path is going to be simplified if we do filename expansion as
part of shobj. The current implementation works for the test that I was
migrating, test-revert.
Reviewed By: quark-zju
Differential Revision: D17630872
fbshipit-source-id: b8312e3d1fee9d331a661849a4cc5ef06ed5b091
Summary: Following a similar implementation to `chmod +x`.
Reviewed By: quark-zju
Differential Revision: D17630871
fbshipit-source-id: 115fe8fd0cca214f7f739bec66301c9116edb250
Summary: I would like to call into this script directly from dott tests.
Reviewed By: quark-zju
Differential Revision: D17630870
fbshipit-source-id: 169ab3f1706d77cb1cdc1461b2a6fce2bc77a877
Summary:
Renaming it to `generateworkingcopystates`. This is a valid module name.
The goal is to convert this script to a module. While we are converting
tests it needs to be accessible in both script form and module.
Reviewed By: singhsrb
Differential Revision: D17611370
fbshipit-source-id: 0b2d0de71f0da7cd6efd7874c505d9aa77f7b296
Summary:
This test checks that a directory without modifications between tree
and parent is not going to be materialized.
Reviewed By: quark-zju
Differential Revision: D17540173
fbshipit-source-id: 465f1e0410c42a55665bcd6903d75266c61d5e80
Summary:
`util.hgcmd()` can report an incorrect hg path in the buck build case, since
the buck target is a wrapper script.
Fix it by setting the executable path explicitly.
Reviewed By: simpkins
Differential Revision: D17632684
fbshipit-source-id: d6c208fa1981180f6248bf7b57cc57031f53946e
Summary: Remove the DFS diff implementation and replace it with the BFS implementation.
Reviewed By: xavierd
Differential Revision: D17618818
fbshipit-source-id: d486642caae924f866a200d3c82fa5a4cb7d5286
Summary: In order to support efficient data fetching, eventually BFS diff will need to be the default diff algorithm. As an initial step towards this, enable `treemanifest.bfsdiff` by default to validate that the BFS diff algorithm works as a drop-in replacement for the existing diff algorithm. Once we have confidence in this, we can land the next diff in this stack wherein we remove DFS diff entirely.
Reviewed By: xavierd
Differential Revision: D17618819
fbshipit-source-id: 444cb05874913e4eb267a24bd0596e6dde2e099e
Summary: To ensure feature parity between BFS diff and DFS diff, copy the DFS tests into the BFS module and ensure they pass.
Reviewed By: xavierd
Differential Revision: D17618820
fbshipit-source-id: b516abbfa4e231fdc383293d94d8965333f2ab99
Summary:
This test is currently failing and its not worth fixing since we only
needed this during the `WWW` Subversion deprecation which has already happened.
Reviewed By: quark-zju
Differential Revision: D17629893
fbshipit-source-id: 60f56b84a3cdcd8ddc56d46a155b1f14f2c00646
Summary:
The use of `fdopen` was to change the buffer size. It's not fatal if buffer
size cannot be changed. This fixes a crash in `nohup hg root`.
Reviewed By: aditya7fb
Differential Revision: D17628883
fbshipit-source-id: 58f75e8e99fbe4cea8da2e3b48a092ee1331db6f
Summary: Python binding for working copy rust library. Walker is initialized with the root of the repo and the python matcher, iteratively returns the matching files in the working copy. Modified Walker and PythonMatcher to allow Walker to have Send trait.
Reviewed By: xavierd
Differential Revision: D17403235
fbshipit-source-id: b8b84928aac7c79c4388a8ba8aa5475aac0c5219
Summary:
Remove py from python matcher, because of RC, so python matcher will have send trait.
The python matcher needs to be stored by the python walker, and pyclasses can only
store data that is Send + 'static. Python pathmatcher methods should only be called
by python methods.
Reviewed By: xavierd
Differential Revision: D17511705
fbshipit-source-id: 00a4938fb00c30244ae04cb38362e8875c72fa47
Summary:
Define the `with_chg` feature when building hg_rust, and link in the chg C
code.
Reviewed By: ikostia
Differential Revision: D17109105
fbshipit-source-id: b8e210df19ff5695553d54047ed561cf7397738f
Summary:
Change the `//scm/hg:hg` target to use an `sh_binary()` rule that invokes the
`:hg_rust` binary with the proper environment so it can find its dependencies,
rather than copying the binary and all of its dependencies into a new
subdirectory.
In dev mode builds the `hg_rust` binary isn't guaranteed to work anywhere
other than its original location, due to the way that dev mode builds use
`$ORIGIN` in the binary's `RPATH` setting. This happened to work up until now
as the hg_rust binary did not have any separate libraries, but I plan to add
one on the `chg` library.
Reviewed By: quark-zju
Differential Revision: D17109104
fbshipit-source-id: ae8bb1126969f012d1d2fb7d04e80867a310b9a8
Summary:
According to the [manifest specification][1], the `path` attribute of a
`<project>` is "An optional path ... If not supplied the project name is
used". Respect this when we parse manifests ourselves.
We may want to consider importing the manifest-parsing module from `repo`
itself and using that instead of rolling our own parsing code. That would
prevent bugs like this from happening at all.
[1] https://gerrit.googlesource.com/git-repo/+/master/docs/manifest-format.md
Reviewed By: mwdevine
Differential Revision: D17542715
fbshipit-source-id: 13d963f4d9b8bf30bcd5f5593aef0ad9da90e7ec
Summary:
Python doesn't recursively import submodules, so we need to specify the
exact module we're using if we want to be able to access it. I don't know
why this works in Michael's development environment, but running the
converter fails locally for me unless I do this.
Reviewed By: mwdevine
Differential Revision: D17542716
fbshipit-source-id: 5b769e193a964f8499ee35033e61d71cf0ccef90
Summary:
Both xavierd and I noticed that characters typed in the terminal sometimes got
eaten. In my case, killing the background cloud sync processes solves it.
It turns out that the cloud sync erroed out like:
ServiceError: service error: 500 ...: Mysql error 1062. Duplicate entry 'fbsource-user/quark/default-remote-fbobjc/stable' for key 'PRIMARY' to db ...
And the `cloud sync` command started ipdb, which starts eating characters :/.
D17621846 should have fixed it. Let's just make it safer by redirecting
stdin of background processes to /dev/null.
Reviewed By: xavierd
Differential Revision: D17622250
fbshipit-source-id: d804aea4aa0aeb50bba0307f93a41eb94e8529fc
Summary:
xavierd encountered an issue where the user name becomes `test`. It turned out
to be chgserver was started using the `TESTTMP` environment and `util.getuser`
got defined wrong.
Fix it by making `util` redefine those functions for every chg invocation.
Reviewed By: xavierd
Differential Revision: D17622095
fbshipit-source-id: e12665317957eeeb85a1796c2bc252a487805cef
Summary:
It turns out that `ui.interactive()` only checks if input is a tty or not,
we also need to check output. That's `ui.formatted()`.
Reviewed By: xavierd
Differential Revision: D17621846
fbshipit-source-id: 5ed30e3dfd59ed8e50261d0b085fbfded43b1c19
Summary:
We want to get rid of `hgsubversion` now that Subversion is almost
dead. Lets move the functionality still provided by the `hgsubversion`
extension to the `globalrevs` extension.
Reviewed By: quark-zju
Differential Revision: D17611443
fbshipit-source-id: 31e1b5a80ecf453e70a7e4ca929d805865579ab3
Summary:
Make the Python test pass, mainly:
- avoid `grep`, use `hg log -T` instead
- rewrite shell `for` loops
- rewrite `python foo.py` to inline python function
Remove a few less important, and hard-to-translate cases.
Reviewed By: xavierd
Differential Revision: D17611805
fbshipit-source-id: a2cd5de8815b60e632b3f46b8d4493575f9388f8
Summary:
The Python test only supports HGEDITOR=cat. Therefore update all HGEDITOR
usecases to `cat`.
Reviewed By: xavierd
Differential Revision: D17611801
fbshipit-source-id: f1fc4ed95bb424fbb1cb717ed8174fee1415ab9f
Summary:
Those tests use HGEDITOR in a weired way that cannot be simply migrated to
Python tests.
Those are subtle cases that don't really belong to the "import" feature.
We already have ideas changing how transaction work, in a way that in-memory
content always gets flushed to disk before running external processes. That
will make the related "in-memory state" less relevant.
Reviewed By: xavierd
Differential Revision: D17611800
fbshipit-source-id: c5bf9dc36362174dc42a16c91b7065a150e93220
Summary: Migrate to Python so the test runs faster (70s down to 4s).
Reviewed By: singhsrb
Differential Revision: D17608330
fbshipit-source-id: 9a2e21774ba8f2f18a14d45bbd640ada76070481
Summary:
We should be always using `globalrevs` in `crdump` instead of
`hgsubversion` but we had code supporting both the `hgsubversion` and
`globalrevs` during the `WWW` Subversion deprecation.
Reviewed By: quark-zju
Differential Revision: D17610488
fbshipit-source-id: e1cafa25bbc981cf6a2286ee1e6418194fec7853
Summary: We do not have network access in Sandcastle but Mercurial needs some external crates to build. So we download the tp2 crates io tar from LFS and set up cargo to be able to find external crates from it.
Reviewed By: wez
Differential Revision: D17407962
fbshipit-source-id: 4fe6be42d52c79340b33687d13723fcbcd63754e
Summary:
StringIO in Python3 expect strings, while we use it with bytes, the pycompat
module handles the difference properly.
Reviewed By: ikostia
Differential Revision: D17609687
fbshipit-source-id: 16a06c8ffceaed3d3c4acf93b94102e3c9d5c11d
Summary: The xrange function doesn't exist in python3, use the pycompat version instead.
Reviewed By: ikostia
Differential Revision: D17607522
fbshipit-source-id: c7b992071ad7933372033892ca99e240aa11ccba
Summary:
`hg hide <snapshot id>` should remove it from the list of snapshots (=> no sync and not shown in smartlog).
`hg unhide <snapshot id>` should restore the snapshot in the list, but do not unhide the underlying commit.
Reviewed By: markbt
Differential Revision: D17570798
fbshipit-source-id: 895f7b53464860b80f4f2498ea97f8db270b4d67
Summary:
The script does:
- Run the Python translate script.
- With `--verify` so the test will be disabled if it does not pass.
- With `--black` so the test file is formatted.
- With `--hgmv` so the test is marked as a "rename", and `hg log` on it can
trace back to the old history.
- Make a commit, so the manual edits are easier to review.
Reviewed By: xavierd
Differential Revision: D17609337
fbshipit-source-id: 0ce61e8a2e1a1d4424b1d3f15426f44a6fcaa739
Summary:
Change `debugobsolete` to take revsets so we don't need to use the shell
substitution feature. This makes it easier to migrate the test to Python.
Reviewed By: singhsrb
Differential Revision: D17608329
fbshipit-source-id: 5f1201b8f16aebe39de14fdbda17a7bfc485dba2