##// END OF EJS Templates
tests: update test-commit to pass our import checker
Augie Fackler -
r33953:335d45e7 default
parent child Browse files
Show More
@@ -642,9 +642,10 b' Test making empty commits'
642 642
643 643 verify pathauditor blocks evil filepaths
644 644 $ cat > evil-commit.py <<EOF
645 > from mercurial import ui, hg, context, node
645 > from __future__ import absolute_import
646 > from mercurial import context, hg, node, ui as uimod
646 647 > notrc = u".h\u200cg".encode('utf-8') + '/hgrc'
647 > u = ui.ui.load()
648 > u = uimod.ui.load()
648 649 > r = hg.repository(u, '.')
649 650 > def filectxfn(repo, memctx, path):
650 651 > return context.memfilectx(repo, path, '[hooks]\nupdate = echo owned')
@@ -666,9 +667,10 b' verify pathauditor blocks evil filepaths'
666 667 $ hg rollback -f
667 668 repository tip rolled back to revision 2 (undo commit)
668 669 $ cat > evil-commit.py <<EOF
669 > from mercurial import ui, hg, context, node
670 > from __future__ import absolute_import
671 > from mercurial import context, hg, node, ui as uimod
670 672 > notrc = "HG~1/hgrc"
671 > u = ui.ui.load()
673 > u = uimod.ui.load()
672 674 > r = hg.repository(u, '.')
673 675 > def filectxfn(repo, memctx, path):
674 676 > return context.memfilectx(repo, path, '[hooks]\nupdate = echo owned')
@@ -684,9 +686,10 b' verify pathauditor blocks evil filepaths'
684 686 $ hg rollback -f
685 687 repository tip rolled back to revision 2 (undo commit)
686 688 $ cat > evil-commit.py <<EOF
687 > from mercurial import ui, hg, context, node
689 > from __future__ import absolute_import
690 > from mercurial import context, hg, node, ui as uimod
688 691 > notrc = "HG8B6C~2/hgrc"
689 > u = ui.ui.load()
692 > u = uimod.ui.load()
690 693 > r = hg.repository(u, '.')
691 694 > def filectxfn(repo, memctx, path):
692 695 > return context.memfilectx(repo, path, '[hooks]\nupdate = echo owned')
General Comments 0
You need to be logged in to leave comments. Login now