tests/test-commit.t
branchstable
changeset 23599 6dad422ecc5a
parent 23598 c02a05cc6f5e
child 23602 a4679a74df14
equal deleted inserted replaced
23598:c02a05cc6f5e 23599:6dad422ecc5a
   472   $ $PYTHON evil-commit.py
   472   $ $PYTHON evil-commit.py
   473   $ hg co --clean tip
   473   $ hg co --clean tip
   474   abort: path contains illegal component: .h\xe2\x80\x8cg/hgrc (esc)
   474   abort: path contains illegal component: .h\xe2\x80\x8cg/hgrc (esc)
   475   [255]
   475   [255]
   476 
   476 
   477   $ cd ..
   477   $ hg rollback -f
       
   478   repository tip rolled back to revision 1 (undo commit)
       
   479   $ cat > evil-commit.py <<EOF
       
   480   > from mercurial import ui, hg, context, node
       
   481   > notrc = "HG~1/hgrc"
       
   482   > u = ui.ui()
       
   483   > r = hg.repository(u, '.')
       
   484   > def filectxfn(repo, memctx, path):
       
   485   >     return context.memfilectx(repo, path, '[hooks]\nupdate = echo owned')
       
   486   > c = context.memctx(r, [r['tip'].node(), node.nullid],
       
   487   >                    'evil', [notrc], filectxfn, 0)
       
   488   > r.commitctx(c)
       
   489   > EOF
       
   490   $ $PYTHON evil-commit.py
       
   491   $ hg co --clean tip
       
   492   abort: path contains illegal component: HG~1/hgrc
       
   493   [255]
       
   494 
       
   495   $ hg rollback -f
       
   496   repository tip rolled back to revision 1 (undo commit)
       
   497   $ cat > evil-commit.py <<EOF
       
   498   > from mercurial import ui, hg, context, node
       
   499   > notrc = "HG8B6C~2/hgrc"
       
   500   > u = ui.ui()
       
   501   > r = hg.repository(u, '.')
       
   502   > def filectxfn(repo, memctx, path):
       
   503   >     return context.memfilectx(repo, path, '[hooks]\nupdate = echo owned')
       
   504   > c = context.memctx(r, [r['tip'].node(), node.nullid],
       
   505   >                    'evil', [notrc], filectxfn, 0)
       
   506   > r.commitctx(c)
       
   507   > EOF
       
   508   $ $PYTHON evil-commit.py
       
   509   $ hg co --clean tip
       
   510   abort: path contains illegal component: HG8B6C~2/hgrc
       
   511   [255]