Summary:
Update `contrib/check-code.py` to Python 3.
Mostly it was already compatible, however stricter regular expression parsing
revealed a case where one of our tests wasn't working, and as a result lots of
instances of `open(file).read()` existed that this test should have caught.
I have fixed up most of the instances in the code, although there are many
in the test suite that I have ignored for now.
Reviewed By: quark-zju
Differential Revision: D21427212
fbshipit-source-id: 7461a7c391e0ade947f779a2b476ca937fd24a8d
Summary:
We've had cases where a git commit goes in that shouldn't be translated
to Mercurial. Let's add an option to skip the commit. Instead of skipping it
entirely (which would require complicated logic to then parent the following
commit on the last converted commit), let's just convert the skipped commit as
an empty commit. This should cover the cases we've encountered so far.
Reviewed By: krallin
Differential Revision: D20261743
fbshipit-source-id: da401863b09c2ac727aae1ceef10a0e8d8f98a7e
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
Summary:
The sources are opened in byte mode, therefore the regexp needs to be a byte
one.
Reviewed By: singhsrb
Differential Revision: D19655928
fbshipit-source-id: 79b54cc5016dc47aee4fe6cf053f28bf04ba630c
Summary:
The Rust bindings now provide a subset of time parsing features. Replace the
old Python implementation. This has multiple benefits:
- Strong gurarnatee that Rust and Python behave the same.
- Parse relative time (ex. `5 minutes ago`)
- Parse date beyound i32 range (ex. >= year 2038)
Reviewed By: DurhamG
Differential Revision: D18946332
fbshipit-source-id: 721f47bc5b2835d7ca0a05ab34ea4faa1a411a4e
Summary: This keep failing due to single line changes. Let's make it more robust.
Reviewed By: kulshrax
Differential Revision: D18963816
fbshipit-source-id: c56748560b619c4c682e8cc9e5710c607aa363fb
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
Summary:
This is not available on Python3, instead stat.ST_MTIME and friends should be
used to get an integer time. This is achieved by wrapping the output of the
stat function and overriding the st_[acm]time properties.
Reviewed By: quark-zju
Differential Revision: D18819679
fbshipit-source-id: 2911f3d47506456e927872d57f69253d903618e2
Summary:
Since it's not calling conduit anymore we can remove all conduit related
functions.
Reviewed By: quark-zju
Differential Revision: D18733121
fbshipit-source-id: 20a6022d9ac7ae6e9afea2791a8daac57cefb22c
Summary:
conduit is going away, phabricator team wants us to stop using
it in hg.
Reviewed By: quark-zju
Differential Revision: D18732257
fbshipit-source-id: c4faf83e36af80fc616e91adede141ba12de5446
Summary:
In preparation for merging fb-mercurial sources to the Eden repository,
move everything from the top-level directory into an `eden/scm`
subdirectory.