sapling/eden/scm/tests/test-fb-ext-treemanifest-bad-tree.t
Muir Manders 44343769f8 collapse edenscm.mercurial package into edenscm
Summary:
We want to rename away from "mercurial". Rather than rename the "mercurial" Python package, we opted to just collapse it into the parent "edenscm" package. This is also a step towards further organizing we want to do around the new project name.

To ease the transition wrt hotfixes, we now replace "edenscm.mercurial" with "mercurial" to fix imports within base64-python extensions.

Reviewed By: sggutier

Differential Revision: D38943169

fbshipit-source-id: 03fa18079c51e2f7fac05d65b127095da3ab7c99
2022-08-24 13:45:53 -07:00

48 lines
1.4 KiB
Perl

#chg-compatible
#debugruntest-compatible
$ setconfig experimental.allowfilepeer=True
$ . "$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 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['.'],), # 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],), # 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]