sapling/eden/scm/tests/test-fb-hgext-treemanifest-bad-tree.t
Jun Wu 75a8173a10 tests: enable chg for 572 tests
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
2019-12-09 15:26:29 -08:00

46 lines
1.4 KiB
Perl

#chg-compatible
$ . "$TESTDIR/library.sh"
$ newserver master
$ clone master client
$ cd client
$ echo a >> a
$ hg commit -Aqm a
Create an empty commit with a misconstructed memctx in the same transaction as a normal commit
$ cat >> $TESTTMP/repro.py <<EOF
> from edenscm.mercurial import context, registrar
> cmdtable = {}
> command = registrar.command(cmdtable)
>
> @command("^repro", [], "")
> def repro(ui, repo, *pats, **opts):
> def getfile(repo, memctx, path):
> if "path" == "a":
> return "d"
>
> return None
>
> with repo.wlock(), repo.lock(), repo.transaction('tr'):
> p1 = context.memctx(
> repo, # repository
> (repo['.'].node(), None), # parents
> "valid commit", # commit message
> ["a"], # files affected by this change
> getfile, # fn - see above
> user="author", # commit author
> ).commit()
>
> context.memctx(
> repo, # repository
> (repo[p1].node(), None), # parents
> "empty commit", # commit message
> ["fake"], # files affected by this change
> getfile, # fn - see above
> user="author", # commit author
> ).commit()
> EOF
$ hg repro --config extensions.repro="$TESTTMP/repro.py" 2>&1 | grep SystemError
[1]