##// 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 verify pathauditor blocks evil filepaths
643 verify pathauditor blocks evil filepaths
644 $ cat > evil-commit.py <<EOF
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 > notrc = u".h\u200cg".encode('utf-8') + '/hgrc'
647 > notrc = u".h\u200cg".encode('utf-8') + '/hgrc'
647 > u = ui.ui.load()
648 > u = uimod.ui.load()
648 > r = hg.repository(u, '.')
649 > r = hg.repository(u, '.')
649 > def filectxfn(repo, memctx, path):
650 > def filectxfn(repo, memctx, path):
650 > return context.memfilectx(repo, path, '[hooks]\nupdate = echo owned')
651 > return context.memfilectx(repo, path, '[hooks]\nupdate = echo owned')
@@ -666,9 +667,10 b' verify pathauditor blocks evil filepaths'
666 $ hg rollback -f
667 $ hg rollback -f
667 repository tip rolled back to revision 2 (undo commit)
668 repository tip rolled back to revision 2 (undo commit)
668 $ cat > evil-commit.py <<EOF
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 > notrc = "HG~1/hgrc"
672 > notrc = "HG~1/hgrc"
671 > u = ui.ui.load()
673 > u = uimod.ui.load()
672 > r = hg.repository(u, '.')
674 > r = hg.repository(u, '.')
673 > def filectxfn(repo, memctx, path):
675 > def filectxfn(repo, memctx, path):
674 > return context.memfilectx(repo, path, '[hooks]\nupdate = echo owned')
676 > return context.memfilectx(repo, path, '[hooks]\nupdate = echo owned')
@@ -684,9 +686,10 b' verify pathauditor blocks evil filepaths'
684 $ hg rollback -f
686 $ hg rollback -f
685 repository tip rolled back to revision 2 (undo commit)
687 repository tip rolled back to revision 2 (undo commit)
686 $ cat > evil-commit.py <<EOF
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 > notrc = "HG8B6C~2/hgrc"
691 > notrc = "HG8B6C~2/hgrc"
689 > u = ui.ui.load()
692 > u = uimod.ui.load()
690 > r = hg.repository(u, '.')
693 > r = hg.repository(u, '.')
691 > def filectxfn(repo, memctx, path):
694 > def filectxfn(repo, memctx, path):
692 > return context.memfilectx(repo, path, '[hooks]\nupdate = echo owned')
695 > return context.memfilectx(repo, path, '[hooks]\nupdate = echo owned')
General Comments 0
You need to be logged in to leave comments. Login now