sapling/eden/scm/tests/test-dirstate-backup.t
Jun Wu 4ea261914c pager: replace fout and ferr of all ui objects
Summary:
The `ui` object is a bit messy - there are repo specific ui, and non-repo ui,
and ui can be copied around.

This diff changes `fout` and `ferr` to an indirect type that can be mutated
globally so the streampager can affect the `fout` and `ferr` of all related `ui`
objects instead of just one single `ui`.

Reviewed By: DurhamG

Differential Revision: D20903568

fbshipit-source-id: b2f139b91a39c20c22261e03ce50f3cc59074291
2020-04-15 18:23:12 -07:00

36 lines
471 B
Perl

#chg-compatible
#testcases v0 v1 v2
#if v0
$ setconfig format.dirstate=0
#endif
#if v1
$ setconfig format.dirstate=1
#endif
#if v2
$ setconfig format.dirstate=2
#endif
Set up
$ hg init repo
$ cd repo
Try to import an empty patch
$ hg import --no-commit - <<EOF
> EOF
applying patch from stdin
abort: stdin: no diffs found
[255]
No dirstate backups are left behind
$ ls .hg/dirstate* | sort
.hg/dirstate
.hg/dirstate.tree.* (glob) (?)