sapling/eden/mononoke/tests/integration/test-pushrebase-block-casefolding.t
Thomas Orozco 72b949340f mononoke: pretty-print root-cause
Summary:
Right now, we debug-print the root cause and pretty-print everything else. This
is pretty bad because the root cause is usually the one thing we would want to
pretty print so we can add instructions there (such as "your hooks failed, fix
it").

This fixes this so we stop pretty-printing the root cause, but also debug print
the whole error, which gives us more developer-friendly context and is easier
for automation to match on.

This is actually in common/rust ... but we're the only people using it AFAICT.

Reviewed By: StanislavGlebik

Differential Revision: D21522518

fbshipit-source-id: 10158811574b56024e14852229e4541da19d5609
2020-05-12 07:59:42 -07:00

61 lines
2.4 KiB
Perl

# Copyright (c) Facebook, Inc. and its affiliates.
#
# This software may be used and distributed according to the terms of the
# GNU General Public License found in the LICENSE file in the root
# directory of this source tree.
$ . "${TEST_FIXTURES}/library.sh"
$ DISALLOW_NON_PUSHREBASE=1 BLOB_TYPE="blob_files" default_setup
hg repo
o C [draft;rev=2;26805aba1e60]
|
o B [draft;rev=1;112478962961]
|
o A [draft;rev=0;426bada5c675]
$
blobimporting
starting Mononoke
cloning repo in hg client 'repo2'
$ hg up -q master_bookmark
Create commit which only differs in case
$ touch foo.txt Foo.txt
$ hg ci -Aqm commit1
Push the commit
$ hgmn push -r . --to master_bookmark
pushing rev 143fbdc73580 to destination ssh://user@dummy/repo bookmark master_bookmark
searching for changes
remote: Command failed
remote: Error:
remote: Error while uploading data for changesets, hashes: [HgChangesetId(HgNodeHash(Sha1(143fbdc73580e33c8432457df2a10e1038936a72)))]
remote:
remote: Root cause:
remote: CaseConflict: the changes introduced by this commit have conflicting case. The first offending path is 'foo.txt'. Resolve the conflict.
remote:
remote: Caused by:
remote: While creating Changeset Some(HgNodeHash(Sha1(143fbdc73580e33c8432457df2a10e1038936a72))), uuid: * (glob)
remote: Caused by:
remote: While computing changed files
remote: Caused by:
remote: CaseConflict: the changes introduced by this commit have conflicting case. The first offending path is 'foo.txt'. Resolve the conflict.
remote:
remote: Debug context:
remote: Error {
remote: context: "Error while uploading data for changesets, hashes: [HgChangesetId(HgNodeHash(Sha1(143fbdc73580e33c8432457df2a10e1038936a72)))]",
remote: source: SharedError {
remote: error: Error {
remote: context: "While creating Changeset Some(HgNodeHash(Sha1(143fbdc73580e33c8432457df2a10e1038936a72))), uuid: *", (glob)
remote: source: Error {
remote: context: "While computing changed files",
remote: source: InternalCaseConflict(
remote: MPath("foo.txt"),
remote: ),
remote: },
remote: },
remote: },
remote: }
abort: stream ended unexpectedly (got 0 bytes, expected 4)
[255]