comparison tests/test-commit.t @ 48876:42d2b31cee0b

tests: remove from __future__ from inline Python in tests This is no longer required since we require Python 3 and the linter no longer requires these statements. Differential Revision: https://phab.mercurial-scm.org/D12255
author Gregory Szorc <gregory.szorc@gmail.com>
date Sun, 20 Feb 2022 15:28:44 -0700
parents 45a073af50a2
children ccd76e292be5
comparison
equal deleted inserted replaced
48875:6000f5b25c9b 48876:42d2b31cee0b
643 643
644 644
645 645
646 verify pathauditor blocks evil filepaths 646 verify pathauditor blocks evil filepaths
647 $ cat > evil-commit.py <<EOF 647 $ cat > evil-commit.py <<EOF
648 > from __future__ import absolute_import
649 > from mercurial import context, hg, ui as uimod 648 > from mercurial import context, hg, ui as uimod
650 > notrc = u".h\u200cg".encode('utf-8') + b'/hgrc' 649 > notrc = u".h\u200cg".encode('utf-8') + b'/hgrc'
651 > u = uimod.ui.load() 650 > u = uimod.ui.load()
652 > r = hg.repository(u, b'.') 651 > r = hg.repository(u, b'.')
653 > def filectxfn(repo, memctx, path): 652 > def filectxfn(repo, memctx, path):
669 #endif 668 #endif
670 669
671 $ hg rollback -f 670 $ hg rollback -f
672 repository tip rolled back to revision 2 (undo commit) 671 repository tip rolled back to revision 2 (undo commit)
673 $ cat > evil-commit.py <<EOF 672 $ cat > evil-commit.py <<EOF
674 > from __future__ import absolute_import
675 > from mercurial import context, hg, ui as uimod 673 > from mercurial import context, hg, ui as uimod
676 > notrc = b"HG~1/hgrc" 674 > notrc = b"HG~1/hgrc"
677 > u = uimod.ui.load() 675 > u = uimod.ui.load()
678 > r = hg.repository(u, b'.') 676 > r = hg.repository(u, b'.')
679 > def filectxfn(repo, memctx, path): 677 > def filectxfn(repo, memctx, path):
689 [10] 687 [10]
690 688
691 $ hg rollback -f 689 $ hg rollback -f
692 repository tip rolled back to revision 2 (undo commit) 690 repository tip rolled back to revision 2 (undo commit)
693 $ cat > evil-commit.py <<EOF 691 $ cat > evil-commit.py <<EOF
694 > from __future__ import absolute_import
695 > from mercurial import context, hg, ui as uimod 692 > from mercurial import context, hg, ui as uimod
696 > notrc = b"HG8B6C~2/hgrc" 693 > notrc = b"HG8B6C~2/hgrc"
697 > u = uimod.ui.load() 694 > u = uimod.ui.load()
698 > r = hg.repository(u, b'.') 695 > r = hg.repository(u, b'.')
699 > def filectxfn(repo, memctx, path): 696 > def filectxfn(repo, memctx, path):