Mercurial > hg
view tests/test-username-newline.t @ 24228:542c891274b2
lazymanifest: use a binary search to do an insertion
This makes insertions log(n) plus some memmove() overhead, rather than
doing an append followed by an n*log(n) sort. There's probably a lot
of performance to be gained by adding a batch-add method, which could
be smarter about the memmove()s performed.
Includes a couple of extra tests that should help prevent bugs.
Thanks to Martin for some significant pre-mail cleanup of this change.
author | Augie Fackler <augie@google.com> |
---|---|
date | Fri, 30 Jan 2015 21:30:40 -0800 |
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]