##// END OF EJS Templates
test-obsolete-bounds-checking: make the test compatible with chg...
test-obsolete-bounds-checking: make the test compatible with chg This test fails when run with chg because the error message starts with "ProgrammingError" instead of "mercurial.error.ProgrammingError". Therefore, globing the "mercurial.error." to ensure that the test is compatible with chg. Test Plan: Ran the test 'test-obsolete-bounds-checking.t' with and without the '--chg' option. Differential Revision: https://phab.mercurial-scm.org/D1127

File last commit:

r34791:81977423 default
r34791:81977423 default
Show More
test-obsolete-bounds-checking.t
23 lines | 1.2 KiB | text/troff | Tads3Lexer
/ tests / test-obsolete-bounds-checking.t
Create a repo, set the username to something more than 255 bytes, then run hg amend on it.
$ unset HGUSER
$ cat >> $HGRCPATH << EOF
> [ui]
> username = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa <very.long.name@example.com>
> [extensions]
> amend =
> [experimental]
> stabilization=createmarkers,exchange
> EOF
$ hg init tmpa
$ cd tmpa
$ echo a > a
$ hg add
adding a
$ hg commit -m "Initial commit"
$ echo a >> a
$ hg amend 2>&1 | egrep -v '^(\*\*| )'
transaction abort!
rollback completed
Traceback (most recent call last):
*ProgrammingError: obsstore metadata value cannot be longer than 255 bytes (value "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa <very.long.name@example.com>" for key "user" is 285 bytes) (glob)