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:
`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:
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:
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:
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:
`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
Summary:
The cycle tests will break with an upcoming change. Our desired cycle
handling behavior is different from upstream, and our main 2nd-order
history storage is the mutation store, which has its own cycle tests
in test-mutation-loops.t. Therefore remove this test section.
Reviewed By: singhsrb
Differential Revision: D17608331
fbshipit-source-id: 658b04cf9c30811a12614cef822a1cdf80551e67
Summary:
When there's a change in a binary file, it's useful for it to appear
in the output of hg diff in some format. The options today are just to get
a text message saying that there is a change or a large binary blob of the
change. This introduces a middleground where we see the hash of the final
binary.
Reviewed By: quark-zju
Differential Revision: D17579217
fbshipit-source-id: ca204bb0ee28bfef327d57eea8236d7421bf933f
Summary:
Storing nodes in a `set` does not make much sense because of possible aliases etc.
It is possible to remove duplicates via `util.removeduplicates` function.
List, on the other hand, preserves order and there will be less conversions during sync (later in the stack).
Differential Revision: D17397594
fbshipit-source-id: ba76e0a1f53516544f055355356d0beaf1c8bfa8
Summary:
Right now `hg pull -r REV` marks all pulled revs as visible.
This makes sense for regular commits (if they exist in the cloud, then they are not hidden).
For snapshots, it is wrong, thus we need not to mark snapshots as visible when pulling.
Differential Revision: D17289438
fbshipit-source-id: d16237b9e471f49bb44317104bc445472bedc16c
Summary:
Add a warning when a user enables a sparse profile on the command line that does not exist.
Triggering the check from multiple places, to not have to clutter the `_config` function. The `_config` function is called from other places as well (eg cloning a sparse repo) and I didn't want to add another guard parameter to it for such a benign functionality.
Besides the `_checknonexistingprofiles` function is only called in 3 situtations:
1. `hg sparse {enable|enableprofile}`
2. `hg sparse --enable-profile` (which is actually deprecated)
3. `hg clone --enable-profile`
Special care has been taken when cloning a sparse repo to do the check after the clone.
Reviewed By: markbt
Differential Revision: D17571442
fbshipit-source-id: 882dbe8b142bf192754dd17d0729d1bb0b472a83
Summary: Make the test use the modern features.
Reviewed By: sfilipco
Differential Revision: D17199835
fbshipit-source-id: 7301b6178e20b6286d765f12ffadb111bb348113
Summary:
With visibility and narrow-heads, undo can just track visible heads and replace
visible heads without messing up with mutation records. This diff implements
that.
Support for `--branch` is dropped. If it is actually used, we can implement a
visible head-based version in the future.
Reviewed By: sfilipco
Differential Revision: D17244563
fbshipit-source-id: 55b62a277018f456fa88903d9cc7c0edc9f7006b
Summary:
Copy the test with modern configs: visibility, mutation, remotenames, and
narrow-heads.
It does not pass right now, which will be fixed by upcoming diffs.
Reviewed By: sfilipco
Differential Revision: D17244559
fbshipit-source-id: 178a105d28dd6064ea040b2baba303493c700e25
Summary:
`tip` and `default` are changed to `master` (bookmark) to make it more
explicit. `log --hidden` was changed to `log -r predecessors(all())`.
I didn't investigate why `(+1 heads)` message get missing. I think we
should probably just remove the message.
Reviewed By: sfilipco
Differential Revision: D17199838
fbshipit-source-id: 0dbe982300f4c4c5e7429c0bf017e0cc97af6872
Summary:
Use narrow-heads for the test so we get some confidence that it works with our
production setup.
Some test changes:
- `predecessors()` revset now shows all commits regardless of "hidden" or not.
Reviewed By: sfilipco
Differential Revision: D17244564
fbshipit-source-id: 9053adbbb913c28d1e7b421155e6325c15790fc5
Summary:
Use narrow-heads for the test so we get some confidence that it works with our
production setup.
A `master` bookmark was added to mark commit public on the server repo.
Reviewed By: sfilipco
Differential Revision: D17244551
fbshipit-source-id: bf65c3aaf0a2fb46c9e7f1af36cc845ae40f44c6
Summary:
This will be used to preserve the `--hidden` behavior by using a more complete
list of heads.
A test introduced by 6563438219
was removed as it does not make sense to me to force changing read size from 65536 to 1.
That commit itself does not have useful commit message, and I cannot find email review thread for it.
Reviewed By: sfilipco
Differential Revision: D17264382
fbshipit-source-id: cc17e98eef4a4743e5207795a7054db59aa71fc0
Summary:
This test is causing trouble in upcoming changes. We don't really care about
the code path - they are migrating *ancient* formats to some formats that we've
been using for years.
For modern migration, like flat dirstate -> tree dirstate, we have seperate
code paths and seperate tests.
Reviewed By: sfilipco
Differential Revision: D17581267
fbshipit-source-id: 7154489ccf46bb4add1c1ec882eafae507af94d3
Summary:
It's possible for a file to appear in the `added` list but is not actually
changed. In that case the Rust manifest has a different behavior that returns
None that breaks the code. Fix it by "correcting" to p1 manifest node.
Reviewed By: sfilipco
Differential Revision: D17512350
fbshipit-source-id: 7c74ffb4e73ed1af5378fe509ed4f06a512995ae
Summary:
AR/VR Engineering does AOSP development using Git and Google Repo. This is rough at times because FB Dev Infra doesn't support these tools in a lot of critical use cases. This commit contains a very rough prototype of a hg convert extension to support Google Repo as a source.
What this commit does:
1. Finds all of the heads in all of the git projects in the Grepo and imports their commit histories into mercurial.
2. Merges those commits into a single commit history that represents the default manifest in the current branch.
What this commit doesn't do:
1. Explore the space of all manifests that have ever existed in the manifest project and update directory branches based on those.
Reviewed By: tchebb
Differential Revision: D14944252
fbshipit-source-id: b292025ccac06d02b347e35839215eedfd151a5d
Summary:
This updates readauthforuri to allow for multiple credentials for the same
host, with a preference for credentials that do exist on the filesystem, and
otherwise a fallback to configurable priorities.
Reviewed By: farnz
Differential Revision: D17528631
fbshipit-source-id: 0b8f255572415b9f60c1aa687728282451f637c4
Summary:
By ignoring unknown working parent, and treating working parent as `null`,
various operations wouold be painfully slow, because `status` would return the
entire working copyp as "untracked".
I hit it today due to some transaction related issues. What I did:
- `hg commit` from one terminal, keeping the editor
- `hg revert -i` from another terminal, waiting for lock
- `hg commit` completed
- `hg revert -i` appears to have loaded the updated dirstate, but not the
updated changelog. So it cannot find the new commit and prints the `ignoring
unknown working parent` message.
It's very hard to reason about the current related code. We'll probably get a
better transaction model to make this less likely to happen. So I didn't write
a test for the legacy code.
Reviewed By: xavierd
Differential Revision: D17532554
fbshipit-source-id: a06b56d78ef4cc129ee7d302c179668747881a69
Summary:
With 'narrow-heads', repoview filtering is bypassed. So we need another
way to make 'invisible' commits disapper from 'all'.
Reviewed By: sfilipco
Differential Revision: D17244549
fbshipit-source-id: 6fd4d4ff5ca96f300a5d79a796fb643060662e9b
Summary:
With 'narrow-heads', repoview filtering is bypassed. So we need another
way to make 'invisible' commits disapper from 'children'.
Reviewed By: sfilipco
Differential Revision: D17244556
fbshipit-source-id: 47d6f59523d910e5d9865d40251954d8de0ee055
Summary:
This resolves an issue where commits get selected incorrectly in the `x::`
case.
Reviewed By: sfilipco
Differential Revision: D17244561
fbshipit-source-id: e9e633509c0e335d24e13cef0ac06e242816e479
Summary:
See the test change. Basically, phases are defined by visibility heads and
remotenames. This resolves the issue after disabling repoview, `draft()`
contains unwanted commits.
Reviewed By: sfilipco
Differential Revision: D17244558
fbshipit-source-id: 84fc4a8b7830d613babf101079cb3c5b7909f23f
Summary:
Snapshots are essentially hidden commits that can be backed up/synced via infinitepush.
When we back up the repo state, we want it to access snapshots without explicitly specifying that they are hidden.
Differential Revision: D17260966
fbshipit-source-id: aa7f24043dddb052cab89c1ba939440887e99339