Fix .hgignore parsing if last line has no EOL, ignore trailing white space.
authorThomas Arendsen Hein <thomas@intevation.de>
Mon, 15 Aug 2005 08:08:11 +0100
changeset 911 d46af8e6b858
parent 910 891b6a262c4b
child 912 302f83b85054
Fix .hgignore parsing if last line has no EOL, ignore trailing white space. (and don't use tabs in python code)
mercurial/hg.py
--- a/mercurial/hg.py
+++ b/mercurial/hg.py
@@ -311,8 +311,8 @@ class dirstate:
             try:
                 l = file(self.wjoin(".hgignore"))
                 for pat in l:
-                    if pat != "\n":
-			p = pat[:-1]
+                    p = pat.rstrip()
+                    if p:
                         try:
                             re.compile(p)
                         except: