[issue3050] hg grep when a file has no newline at the end.

John Lenz bugs at mercurial.selenic.com
Sat Oct 15 10:31:25 CDT 2011


New submission from John Lenz <lenz at math.uic.edu>:

Try

$ echo 'ABC' > foo
$ echo -n 'DEF' >> foo
$ hg add foo
$ hg ci -m "add foo"
$ hg grep A
foo:1:ABC
$ hg grep D
foo:1:DE

notice the missing F.  Seems like mercurial is eating the last character
when the file does not end in a newline.

----------
messages: 17642
nosy: johnlenz
priority: bug
status: unread
title: hg grep when a file has no newline at the end.

____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue3050>
____________________________________________________


More information about the Mercurial-devel mailing list