This is an archive of the discontinued Mercurial Phabricator instance.

tests: restore phabricator tests and regenerate the recordings
ClosedPublic

Authored by mharbison72 on Jan 16 2020, 8:19 PM.

Details

Summary

These contain the new API chatter. Most of the changes are because some new
commits were created, but they're pretty obviously equivalent. I have no idea
why the last recording contains real data, whereas it previously looked fake.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

mharbison72 created this revision.Jan 16 2020, 8:19 PM

I did hg phabread D7920 | hg import --bypass - on another Windows system, and it gives the following error when running the test (omitting the cascading failures):

--- d:/mercurial/tests/test-phabricator.t
+++ d:/mercurial/tests/test-phabricator.t.err
@@ -56,7 +56,10 @@
   $ echo alpha > alpha
   $ hg ci --addremove -m 'create alpha for phabricator test Ç'
   adding alpha
-
+  transaction abort!
+  rollback completed
+  abort: decoding near 'ator test \x80': 'utf8' codec can't decode byte 0x80 in position 34: invalid start byte! (esc)
+  [255]
 A bad .arcconfig doesn't error out
   $ echo 'garbage' > .arcconfig
   $ hg config phabricator --debug

ERROR: test-phabricator.t output changed

So I'm not sure if there is a phabsend or phabread issue.

I did hg phabread D7920 | hg import --bypass - on another Windows system, and it gives the following error when running the test (omitting the cascading failures):

--- d:/mercurial/tests/test-phabricator.t
+++ d:/mercurial/tests/test-phabricator.t.err
@@ -56,7 +56,10 @@
   $ echo alpha > alpha
   $ hg ci --addremove -m 'create alpha for phabricator test Ç'
   adding alpha
-
+  transaction abort!
+  rollback completed
+  abort: decoding near 'ator test \x80': 'utf8' codec can't decode byte 0x80 in position 34: invalid start byte! (esc)
+  [255]
 A bad .arcconfig doesn't error out
   $ echo 'garbage' > .arcconfig
   $ hg config phabricator --debug
ERROR: test-phabricator.t output changed

So I'm not sure if there is a phabsend or phabread issue.

It looks like it only complains on py2.7.15, but both py27 and py37 fail the import checker on this system:

--- d:/mercurial/tests/test-check-module-imports.t
+++ d:/mercurial/tests/test-check-module-imports.t.err
@@ -37,3 +37,18 @@
   > -X tests/test-imports-checker.t \
   > -X tests/test-verify-repo-operations.py \
   > | sed 's-\\-/-g' | "$PYTHON" "$import_checker" -
+  Traceback (most recent call last):\r (esc)
+    File "d:\\mercurial\\tests/../contrib/import-checker.py", line 820, in <module>\r (esc)
+      sys.exit(int(main(sys.argv)))\r (esc)
+    File "d:\\mercurial\\tests/../contrib/import-checker.py", line 787, in main\r (esc)
+      for src, modname, name, line in sources(source_path, localmodname):\r (esc)
+    File "d:\\mercurial\\tests/../contrib/import-checker.py", line 765, in sources\r (esc)
+      for script, modname, t, line in embedded(f, modname, src):\r (esc)
+    File "d:\\mercurial\\tests/../contrib/import-checker.py", line 731, in embedded\r (esc)
+      for name, starts, ends, code in testparseutil.pyembedded(f, src, errors):\r (esc)
+    File "d:\\mercurial\\contrib\\testparseutil.py", line 186, in embedded\r (esc)
+      for lineno, line in enumerate(lines, 1):\r (esc)
+    File "c:\\Program Files\\Python37\\lib\\codecs.py", line 322, in decode\r (esc)
+      (result, consumed) = self._buffer_decode(data, self.errors, final)\r (esc)
+  UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 2164: invalid start byte\r (esc)
+  [1]

All tests ran cleanly on the original system. The *.t was resurrected by reverting to the parent of the revision that deleted it.

I did hg phabread D7920 | hg import --bypass - on another Windows system, and it gives the following error when running the test (omitting the cascading failures):

Nevermind this. If I set HGENCODING=utf-8 before doing the phabread and import, it runs fine, so it's got the right data in phabricator.

This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.