sapling/eden/scm/tests/test-edit-tmp.t
Jun Wu 00ecfbb16c tests: opt-in new test runner for passing tests
Summary:
A lot of tests are passing with the new test runner.

This is done by `./edit-feature-header.py debugruntest` and paste
the `Passed:` section from `hg debugruntest -v test-*.t` output.

Note: some tests fail with this but pass with debugruntest. They
will be investigated as follow-up.

Differential Revision: D34931992

fbshipit-source-id: 99abc3d9800bb1dd3487dbfa15d715c0bd3ba878
2022-08-16 14:59:23 -07:00

37 lines
768 B
Perl

#chg-compatible
#debugruntest-compatible
$ newrepo
$ setconfig ui.allowemptycommit=1
$ enable amend
$ HGEDITOR=true hg commit -m 1 -e
$ HGEDITOR=true hg commit --amend -m 2 -e
$ HGEDITOR='echo 3 >' hg metaedit
All 3 files are here:
$ python << EOF
> import os
> names = os.listdir('.hg/edit-tmp')
> print(names)
> for name in names:
> os.utime(os.path.join('.hg/edit-tmp', name), (0, 0))
> EOF
['*', '*', '*'] (glob)
$ HGEDITOR=true hg commit -m 4 -e
Those files will be cleaned up since they have ancient mtime:
$ python << EOF
> import os
> print(os.listdir('.hg/edit-tmp'))
> EOF
['*'] (glob)
Verify that a folder in .hg/edit-tmp doesn't crash hg:
$ mkdir .hg/edit-tmp/foo
$ HGEDITOR=true hg commit -m 5 -e