Fix path handling on Windows

Thomas Arendsen Hein thomas at
Mon Aug 15 12:56:28 CDT 2005

* Bryan O'Sullivan <bos at> [20050815 18:27]:
> On Mon, 2005-08-15 at 09:10 +0200, Thomas Arendsen Hein wrote:
> > Here are tabs hiding. Additionally this removes the last character
> > from the last line in .hgignore if it has no EOL.
> > 
> > Fix appended and pullable from me.
> Both of our fixes are wrong!  Yours nukes all trailing white space from
> a line, so I can't match "foo " or "bar\t" any longer.

This was intentional, because non-printable chars at the end of a
line are more often a user error than something desired.
If you _really_ want to match them, you can use ( ) or (<tab>)

> Really, we need
> something like Perl's chomp (which eats only trailing newline
> characters), which Python doesn't currently have.

Python has this: foobar.strip('\n')
or .strip('\n\r') if you want to kill windows line ends, too.


Email: thomas at

More information about the Mercurial mailing list