view tests/test-username-newline.t @ 14220:21b8ce4d3331

rename path_auditor to pathauditor The Mercurial 1.9 release is moving a lot of stuff around anyway and we are already moving path_auditor from util.py to scmutil.py for that release. So this seems like a good opportunity to do such a rename. It also strengthens the current project policy to avoid underbars in names.
author Adrian Buehlmann <adrian@cadifra.com>
date Fri, 06 May 2011 09:54:06 +0200
parents 3b165c127690
children 5ac845ca059a
line wrap: on
line source

  $ hg init
  $ touch a

  $ unset HGUSER
  $ echo "[ui]" >> .hg/hgrc
  $ echo "username= foo" >> .hg/hgrc
  $ echo "          bar1" >> .hg/hgrc

  $ hg ci -Am m
  adding a
  abort: username 'foo\nbar1' contains a newline
  
  [255]
  $ rm .hg/hgrc

  $ HGUSER=`(echo foo; echo bar2)` hg ci -Am m
  abort: username 'foo\nbar2' contains a newline
  
  [255]
  $ hg ci -Am m -u "`(echo foo; echo bar3)`"
  transaction abort!
  rollback completed
  abort: username 'foo\nbar3' contains a newline!
  [255]